Closed razvan-tanase closed 2 years ago
Hey! This repo is designed for model inference purposes. You should use original repo for training you own model and than you can save it as pytorch state dict and inference with my interface.
Is there any way I can train a pretrained model like 'yolov5s-face.pt'? I would like to conduct an experiment to see if I can improve, even by a small amount, the inference results. I already tried on the original repo, with this command:
python train.py --data .\data\face_train.yaml --weights '.\yolov5s-face.pt'
but I get the following error:
Traceback (most recent call last):
File "train.py", line 634, in
I also tried to use the train.py script from the deepcam/yolov5-face repo, but they have 0 guidance on this topic and I keep getting the following errors:
This when there is no label.cache file in the train directory:
WARNING: Ignoring corrupted image and/or label C:\YOLOv5\datasets\ICC_set\train\images\0596_00000005.png: labels require 15 columns each
Which I assume is because it expects a different format for the annotation files from the standard one from YOLO (yolov5pytorch) .
When there is a label.cache file in the train directory:
Traceback (most recent call last):
File "train.py", line 512, in
And this is probably because it cannot extract something useful for what is expecting. Please, if you are kind, help me with this issues, or redirect me to someone or something that can resolve my problems. Thank you very much.
I tried deepcam-cn guide for training and it seems to work. 1) You have to download widerface dataset and combine it with annotations they provide https://drive.google.com/file/d/1tU_IjyOwGQfGNUvZGwWWM4SwxKp2PUQ8/view?usp=sharing should look like this 2) You need to go yolov5-face/data and run train2yolo.py and val2yolo.py with a path to dataset from p1. 3) You need to download one of their pretrained models. 4) You can start training with train.py with params, something like this:
python3 train.py --data data/widerface.yaml --cfg models/yolov5n.yaml --weights weights/yolov5n-face.pt
But all in all, i'm not sure you would get better results without adding extra data in dataset or some training tweaks.
Thank you for your response! Fortunately, I managed to start a training session too, but thanks for the detailed explanation. In order to improve the training results it is normal to add another set of data, which I was planning to do, but before doing so I wanted to test that the script works as they described. The only problem is that the label files along with the directory structure are different from the conventional ones used in the original yolov5 repo. What is most disturbing is that in the case of label files, there is no documentation on how they are constructed or what the values for each image mean, which prevents you from building a dataset for training yourself. If you have related information on this aspect, I would be very grateful if you could share it.
Hello,
Is there any support for training / fine-tune weights on personal datasets? Or I should use the train script from the deepcam repository? Thank you in advance.