Which model path should be provided for dynamic thresholds for variable-speed inference step?
mansi-aggarwal-2504 opened this issue · comments
In the dynamic thresholds for variable-speed inference step:
python get_dynamic_thres.py --device 0 --batch-size 1 --img-size 640 --cfg cfg/dy-yolov7-step2.yaml --weight weights/dy-yolov7.pt --data data/coco.yaml --task val
Which weights file is the command pointing to? Intuitively, could it be the best weights from step2 training?
Thanks!
Hi @mansi-aggarwal-2504
Please provide the last-epoch weight of the step2!
Thanks, for inference (detect.py
) as well?
Yeah, please using step2 weight for inference!
The weights/dy-yolov7.pt
on the provided commands is the step2 weight we released~
Hello, I trained the model on a relatively smaller dataset and it couldn't make inference on fresh COCO images or some other stock images from the internet (conf
for all predictions was 0).
However, I also tried to run detect.py
using the weights/dy-yolov7.pt
that you released - the inference results are still poor with 0% conf
.
python ../DynamicDet/detect.py --img-size 640 --conf-thres 0 --iou-thres 0 --cfg ../DynamicDet/cfg/dy-yolov7-step2.yaml --weight dy-yolov7.pt --source inference/images --dy-thres 0.5 --save-txt --save-conf --name inference-results
What could the reason for this be?
@mansi-aggarwal-2504
It is strange. Please try
python ../DynamicDet/detect.py --cfg ../DynamicDet/cfg/dy-yolov7-step2.yaml --weight dy-yolov7.pt --source ../DynamicDet/demo/demo.jpg --dy-thres 0.5
Okay, so I tried the inference on demo.jpg
and it seems to be working fine.
I also tried the released weights on my dataset and it seemed to be working well - just had to remove the conf
and iou
thresholds.
But my weights from train step2 aren't able to detect anything with confidence - I do agree that I trained on a relatively smaller coco dataset , which could be the issue.
If I train on a custom dataset (not coco) do you recommend a training/validation data size and other custom settings - I want to train on particle-picking images with a low signal-to-noise ratio (which makes inference more difficult).
@mansi-aggarwal-2504
I'm sorry that I have no idea about the custom settings on a private dataset. However, I suggest that you take a step back, start with training a great model on the yolov7 repo first, then migrate that configuration to DynamicDet.