Different results from detect vs val, "no detections" #12861
Unanswered
PeterKBailey
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I hope I'm asking this in the right place but I'm new to YOLO and have been trying to determine if I have properly built and structured my dataset.
I used the following command to first train the model on a very small data subset (222 images)
python yolov5/train.py --img 640 --batch 16 --epochs 3 --data dataset.yaml --weights '' --cfg yolov5n.yaml
I also included a validation directory which contains the exact same images in my training set. All I'm trying to do right now is see that I can make a model which overfits / perfectly predicts for this training data.
After having completed the training I did two things:
python detect.py --weights best.pt --img 640 --data dataset.yaml --source image.jpg --conf-thres 0.01
and
python .val.py --weights best.pt --img 640 --data dataset.yaml
with the following results: (output from detect on left, and output from val on the right)
Please excuse the resolution, this is a cropped in screenshot but is only meant to show that the validation batch worked as expected but that detection on the image apparently did not.
Things I have tried:
I'm not sure where to go from here so advice would be greatly appreciated! Thanks!
OS: Windows 10
YOLOv5 v7.0-295-gac6c4383 Python-3.11.6 torch-2.2.1+cpu CPU
Edit with additional things I have tried:
I have also double checked my bounding boxes with the YoloBBoxChecker and am certain that my text files are correct. I didn't doubt this particularly given that val is successful but figured it was one more item on the list.
![image](https://private-user-images.githubusercontent.com/70305799/318311699-0cf7ca4e-fd69-4b4b-b291-58f89375fe8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4OTgyMTgsIm5iZiI6MTcxODg5NzkxOCwicGF0aCI6Ii83MDMwNTc5OS8zMTgzMTE2OTktMGNmN2NhNGUtZmQ2OS00YjRiLWIyOTEtNThmODkzNzVmZThiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDE1MzgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyZTQ1NzUyMWQ2Y2FiOTE4Yjc1MmM4YTQwYzgyZWI0MTVkODAwNzg4MmY4NzY1MGNhOGMxYTIwYWU5MjMyMGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qL1XIAeHcX3VE6BdGiQMkKKOQvOLGNNs52PtX3U-VKI)
Beta Was this translation helpful? Give feedback.
All reactions