An object counter for a factory camera

The problem

Build a plain-Python pipeline that takes small greyscale images of parts on a conveyor belt, with uneven lighting and noise, and reports how many parts there are, where they are and whether any are too small.

Requirements

Technologies

Step by step

  1. Write a generator for test images, with known part positions saved as ground truth.
  2. Build and test each stage on one image, printing the image after every stage as text shading.
  3. Add Otsu's threshold and compare it with a fixed threshold on images with different lighting.
  4. Label the parts and compute their measurements.
  5. Compare the found parts with the ground truth using bounding-box IoU and count misses and false alarms.
  6. Tune the filter sizes and element sizes and record which settings work best.

Expected result

A counter that finds every part in noisy, unevenly lit images, with a report of its measurements and an accuracy check against ground truth.

How it is evaluated

Ways to improve it