Small Part Inspection Cameras AI Vision Solution
Roboflow runs on almost any camera, which is useful once you have one and unhelpful when you are choosing. For fasteners, connectors, machined components, stampings and electronic parts, the camera is chosen by one number: the size of the smallest defect you need to catch. Work backwards from it and the sensor, lens, lighting and compute follow.
Resolution: Start From the Smallest Defect
Two pixels across a feature is the minimum for finding an edge with excellent contrast; three to four pixels is what you want for a model to detect it reliably, and three to five per stroke for reading codes or text. Divide the defect size by that pixel count to get the resolution you need per pixel, then divide your field of view by it to get the sensor width in pixels. A 0.25 mm pinhole at 4 pixels needs 0.0625 mm per pixel, so a 40 mm field needs about 640 pixels across, and an 8 MP sensor at 3840 pixels wide can cover a 240 mm field at the same resolution. Treat the result as a floor: lighting, optics and part variation usually push you higher.
Lens: Working Distance and Field of View
The focal length bridges the working distance your station allows and the field of view you sized above; shorter focal lengths give a wider view. Choose a lens rated for your sensor size or larger so the image circle covers the whole sensor. A smaller aperture gives more depth of field for parts that sit at different heights, at the cost of light. For dimensional checks, a telecentric lens keeps magnification constant across the field and removes perspective error.
Lighting: Match the Light to the Defect
Lighting decides whether the defect is visible at all. The lighting types that matter most for small parts:
- Ring light: the default for small, flat parts; even, on-axis and easy to mount around the lens
- Dome or coaxial: curved or reflective parts and polished metal, where a dome removes hotspots and coaxial light makes a flat surface uniform
- Dark field: low-angle light so only scratches, burrs and raised edges catch the light and show bright on a dark part
- Backlight: a silhouette for holes, gaps, edges and dimensional checks
- Polarizer: a filter on the lens and light to cut glare from metal, plastic and glass
If parts move past the camera, add a hardware trigger and strobe so every frame is sharp, and mount the camera rigidly at its final distance before you collect training images.
Compute: Where the Model Runs
For a single station, Roboflow AI1 is the reference setup in one housing: an 8 MP sensor at 4K and 30 fps, a 4 mm lens with electronic focus, a built-in ring light, an NVIDIA Jetson Orin NX with 8 GB of memory, M12 Gigabit Ethernet, 24V DC power and an IP54 rating. Mount it closer for smaller defects. When the resolution math calls for a larger sensor, a telecentric lens or several cameras on one cell, pair GigE Vision cameras from makers such as Basler, Lucid or IDS with a Roboflow edge device: RF-NX16 runs one to four streams over PoE, and RF-AGX64 runs four or more with line scan support.
How Roboflow Works with Small Part Inspection Cameras
- Collect: Capture good and defective parts with the production camera, lens and lighting, and upload them to Roboflow
- Label and train: Label the defects and train a model such as RF-DETR, so it learns from the same frames it will see on the line
- Deploy: Run the model with Roboflow Inference on the edge device, and send pass or reject to your PLC before the part reaches the reject point
Want AI without the integration work? Roboflow's AI1 deployment device packages onboard AI compute, integrated lighting, and an industrial camera into a plug-and-play system for real-time computer vision, with no separate camera, lighting, or edge computer to spec.