SaILaIDiN / Spine-Detection-with-CNNs

3 stars 2 forks source link

How to use IoU as metric instead of the default IoM? #8

Open randcraw opened 4 months ago

randcraw commented 4 months ago

Is there a runtime flag or config parameter than will universally switch the match metric from the default Intersection over Minimum to instead be Intersection over Union? The code design appears to support this but I don't see an entry point to enable this choice. Thanks.

SaILaIDiN commented 3 months ago

Hello randcraw, the IoU-metric is defined in the function "calc_metric_xy(...)" found in "src/spine_detection/utils/data_utils.py".
When you are using "src/spine_detection/utils/tracker.py", calc_metric_xy(...) is called in the class CentroidTracker. CentroidTracker is instantiated in "src/spine_detection/tracking_mmdet.py" as CT where you can define the metric in the function call of tracking_main(...) via argparse. This would be your asked runtime flag. (--metric iou)

Best regards