Object Detection and False Detection Evaluation
English translation
More detections do not necessarily mean a better setting. Compare with known circle positions and sizes to identify false detections.
Before practice
01 Does detecting more circles mean better detection?
Description
Consider missed circles, duplicates, false detections, and center/radius errors together.
02 Does reducing noise always improve detection?
Description
Preprocessing may reduce noise while blurring boundaries, so compare against the same ground truth.
Execution conditions
Use opencv-python-headless, NumPy, and Matplotlib.
1. Create an image with ground truth
Starting conditions
Draw circles in a 160×200 grayscale image with centers (50,50), (140,70), (90,120) and radii 15,20,12.
Procedure
- Apply HoughCircles to the provided circle image.
- Overlay detection results on the original image and match them to actual circles.
Results to retain
- Ground truth/detection comparison image and an error table for each circle.
Items to record and points to check
- Circle
-
- True center/radius
-
- Detected center/radius
-
- Error [pixel]
-
Points to check
- Have you avoided recording a missed detection as error 0?
- Have you avoided duplicate matching of nearby circles?
2. Change one detection criterion
Starting conditions
Compare param2=15 and 25. Keep the same image and radius range.
Procedure
- Count detections, missed circles, duplicates, and false detections separately.
- Define a match as a detection with center error within 5 pixels and radius error within 4 pixels.
- Judge which criterion is better by the types of errors, rather than the detection count.
Results to retain
- Detection images and a matching table for the two settings.
Items to record and points to check
- param2
-
- Matched circle
-
- Missed circles
-
- False detection
-
- Center error
-
Points to check
- Did you use the same matching criteria for different thresholds?
- Have you avoided counting multiple detections of one circle as separate correct detections?
3. Find failures under blur and noise
Starting conditions
Add image noise with seed=7 and standard deviation 15, and apply the same settings.
Procedure
- Choose either a median or Gaussian filter before detection.
- Compare detections and computation time before and after filtering.
- Define one condition in which detection cannot be trusted for image-based control.
Results to retain
- A preprocessing comparison on noisy images and validity criteria.
Items to record and points to check
- Preprocessing
-
- Detection count
-
- Successful match
-
- Processing time [ms]
-
Points to check
- Did you limit values to 0…255 before converting to uint8?
- Have you avoided treating a single timing measurement as the algorithm's general speed?
Official examples and data