Closed valentinitnelav closed 1 year ago
@valentinitnelav I hope these weights work, best case is that weights can be used for pytorch and darknet as well.
I had the same issue with YOLOv4 (see #44). I remember I had some darknet weights but were not compatible with the Pythorch framework. i will try nevertheless, but I do not have high hopes.
@valentinitnelav ok.... do we have any idea what to do if this doenst work?
another link to some tiny weights (found in this issue)
That is indeed the correct link. I do not know why I didn't use the yolov7-tiny.pt
from the start. Thanks for your patience.
I think that somehow I presumed at that time that yolov7.pt
are the smallest pretrained weights. I looked at this table in the README file which is actually about general performance metrics and not about all available weights.
Also, I double-checked and we do not need to use the --cfg
argument in the train.py
if we do not train from scratch. As long as we use the --weights
argument, then the model architecture is presumed from that. --cfg
must be mentioned when training from scratch - see Train Custom Data - 3. Train
Train a YOLOv5s model on COCO128 by specifying dataset, batch-size, image size and either pretrained
--weights yolov5s.pt
(recommended), or randomly initialized--weights '' --cfg yolov5s.yaml
(not recommended)
and this comment of Glenn Jocher
--cfg
will cause a new model to be constructed from scratch. Any matching layers in--weights
will be transferred.
Also, to be extra sure, I checked in the .err cluster file and I can see that the printed model architecture matches the yolov7-tiny.yaml which uses LeakyReLU
.
I'll have updated results for YOLOv7 in the coming days.
FYI
In the *.log file I get a download error for the weights even though I made sure that I downloaded them manually before running the script yolov7_train_tiny_640_rtx.sh
Downloading https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-tiny.pt to /home/sc.uni-leipzig.de/user/pai/detectors/yolov7/weights_v0_1/yolov7-tiny.pt...
Download error: [Errno 2] No such file or directory: '/home/sc.uni-leipzig.de/user/pai/detectors/yolov7/weights_v0_1/tmpjok410lv'
ERROR: Download failure: /home/sc.uni-leipzig.de/user/pai/detectors/yolov7/weights_v0_1/yolov7-tiny.pt missing, try downloading from https://github.com/WongKinYiu/yolov7/releases/
The problem is that the path is corrupted because somehow it uses pai
instead of PAI
. This is done internally/on the fly and not from yolov7_train_tiny_640_rtx.sh
, so not sure where the bug happens.
However, this error didn't break the training process and we might neglect it. I just document it here for now.
Fresh results with YOLOv7-tiny (results from 191623_yolov7_img640_b8_e300_hyp_custom)
@valentinitnelav really cool. Thank you so much for putting in the effort to run this.
Make sure to use the tiny weights and the yolov7-tiny.yaml cfg file for a fair comparison with YOLOv5 n & s models.
Are there tiny COCO weights for the Pythorch implementation? The confusion started from there I think.