yolov5-face icon indicating copy to clipboard operation
yolov5-face copied to clipboard

Train 'yolov5s-face.pt'

Open razvan-tanase opened this issue 1 year ago • 0 comments

Is there any way I can train a pretrained model like 'yolov5s-face.pt' using the train.py script from this repo on a custom dataset? I would like to conduct an experiment to see if I can improve, even by a small amount, the inference results. 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 train(hyp, opt, device, tb_writer, wandb) File "train.py", line 187, in train dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, File "C:\YOLOv5\yolov5-face\utils\face_datasets.py", line 62, in create_dataloader dataset = LoadFaceImagesAndLabels(path, imgsz, batch_size, File "C:\YOLOv5\yolov5-face\utils\face_datasets.py", line 166, in init labels, shapes = zip(*cache.values()) ValueError: not enough values to unpack (expected 2, got 0)

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.

razvan-tanase avatar Aug 05 '22 12:08 razvan-tanase