YOLOv6
YOLOv6 copied to clipboard
assert osp.exists(label_dir), f"{label_dir} is an invalid directory path!"
Hello All, I have followed the https://github.com/meituan/YOLOv6/blob/main/docs/Train_custom_data.md tutorial for my custom data Training. But could not able to Train I am getting below error.
Folder structure:
Training command: !python tools/train.py --batch 256 --conf configs/yolov6s_finetune.py --data /content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/data/data_1.yaml --device cpu
Yaml:
dataset.py failed line: /content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/yolov6/data/datasets.py
Using CPU for training... training args are: Namespace(batch_size=256, check_images=False, check_labels=False, conf_file='configs/yolov6s_finetune.py', data_path='/content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/data/data_1.yaml', device='cpu', dist_url='env://', epochs=400, eval_final_only=False, eval_interval=20, gpu_count=0, heavy_eval_range=50, img_size=640, local_rank=-1, name='exp', output_dir='./runs/train', rank=-1, resume=False, save_dir='runs/train/exp12', workers=8, world_size=1)
Image path: /content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/data/images/train
Label dir path: /content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/data/labels/train
Traceback (most recent call last):
File "tools/train.py", line 114, in
Can you try this one? https://github.com/meituan/YOLOv6/issues/336
Hi Arunavameister,
I tried above suggestion. Still same issue exist.
Hi, do you have the directory /content/drive/MyDrive/Ineuron_DeepLearning/YOLO_6/YOLOv6/data/labels/train
in your computer?
Solved: After ensuring the below points
Ensure that data.yaml is correct format.
- Example End folder should not /
- There should be space b/w train: /
- If it's full path we need to specify / not ./