Open bekhzod-olimov opened 1 year ago
Hello!
I would suggest to debug the getitem()
to double check. And maybe also check that you’re selecting the correct box_format
parameter.
The FLIR version that I used only had person and car classes (all I remember). Make sure you download them with coco format (labels in txt files).
And regarding YOLOv5 weights, if they are not available on Ultralytics/YOLOv5 hub I don’t really know.
@AlessandroMondin, thank you very much for your reply! As you mentioned, debugging getitem function solved the problem. It was due to box_format. By default, box_format is "coco" and changing it to "yolo" worked pretty well. Unfortunately, I was unable to find weights (for v6.0) in the Ultralytics hub and without the pretrained weights the model's performance is quite poor.
I think they might be these
@AlessandroMondin I am afraid these weights are for v8 (below ones for v7). When I tried these weights it threw an error as below.
I though it is because architecture you explained is YOLOV5 v6.0 and the later versions have different architecture; so they do not match (as error comes from torch.serialization.py as can be seen in the image). Btw, I have tried to copy the checkpoint to the root folder where train.py located (and changed torch.load path), still the same error.
@AlessandroMondin , there was the same issue in here. I guess I need to git clone Ultralytics/YOLOv5 to the folder where the train script is located.
Did you convert Ultralytics weights to my architecture with https://github.com/AlessandroMondin/YOLOV5m/blob/main/ultralytics_files/state_dict_loading.py? You need to uncomment it but this files loads Ultralytics weights to my architecture
@AlessandroMondin Uncommenting did not result in any change; the code keeps raising the same error (no module named 'models'). I am wondering whether you had cloned Ultralytics/YOLOv5 repo to the folder you wrote the code?
@AlessandroMondin Could you please describe everything step by step on how to run your code? It will be more helpful if you provide a command line too.
https://github.com/ultralytics/yolov5/releases/tag/v6.0 ... it is the YOLOv5M checkpoint 😄
@AlessandroMondin I am afraid these weights are for v8 (below ones for v7). When I tried these weights it threw an error as below.
I though it is because architecture you explained is YOLOV5 v6.0 and the later versions have different architecture; so they do not match (as error comes from torch.serialization.py as can be seen in the image). Btw, I have tried to copy the checkpoint to the root folder where train.py located (and changed torch.load path), still the same error.
"I encountered the same error. Could you please help me resolve this issue?"
I would suggest to attempt to find such weights in their repo.. I will try to check if I still have them locally but I do not guarantee it :) Besides that, another approach could be to load YOLOV5mV7 by setting strict=False in torch.load
Dear author I train your model from scratch but the performence is quite poor,the map0.5 is only 0.01 when fitting.The loss I use is Yolo_Loss,and I use rect_train.So can you explain why this happen. Hope your answer
Hi! First of all, thank you very much for your effort in explaining such a complex and complicated YOLOv5 architecture! I have tried to reproduce your results reported in your repo but faced several problems as below:
I will be looking forward to hearing from you soon!