the results of coco evaluate of sahi and test.py of mmdetection are different? #639
-
mmdetection: coco evaluate: parameters used in coco evaluate are the same as mmdetetion command, by the way , I add --no_sliced_prediction command, so the results should be same, I can't figure out why, even change --postprocess_match_metric and --postprocess_type, it doesn't work. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
maxDets param is different for both eval, you should take eval at same maxDets value (100, 500 or 1000) |
Beta Was this translation helpful? Give feedback.
-
thanks a lot, but still, |
Beta Was this translation helpful? Give feedback.
-
What do you use as the input? Do you use coco formatted results.json as input or you perform prediction with sahi? |
Beta Was this translation helpful? Give feedback.
-
yes, as for sahi coco evaluate,i use results.json got by sahi coco prediction as input, on the other hand, i use test.py to get results.pkl, but they turn out to be different. |
Beta Was this translation helpful? Give feedback.
-
That is normal as test.py and sahi predict outputs are different (bounding box integer casting, postprocessing functions and parameters etc) Can you tell me what is your postprocessing parameters in test.py from mmdet? (iou and conf thresholds) You should use NMS as postprocess_type in SAHI by adding You should also lower the confidence threshold. Its 0.01 by default in mmdet but 0.25 in sahi . Add |
Beta Was this translation helpful? Give feedback.
-
After setting the --model_confidence_threshold 0.01, and --postprocess_type NMS, the results, |
Beta Was this translation helpful? Give feedback.
-
There is only 0.009 AP difference in AP@50 which is more acceptable considering sahi casts prediction boxes into integers. |
Beta Was this translation helpful? Give feedback.
-
Thanks, reasonable answer. |
Beta Was this translation helpful? Give feedback.
That is normal as test.py and sahi predict outputs are different (bounding box integer casting, postprocessing functions and parameters etc)
Can you tell me what is your postprocessing parameters in test.py from mmdet? (iou and conf thresholds)
You should use NMS as postprocess_type in SAHI by adding
--postprocess_type NMS
into thesahi predict
command.You should also lower the confidence threshold. Its 0.01 by default in mmdet but 0.25 in sahi . Add
--model_confidence_threshold 0.01
into thesahi predict
command.