meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.72k stars 1.03k forks source link

Finetuning model with custom dataset still gives classes of coco dataset #282

Closed sangramdogra closed 2 years ago

sangramdogra commented 2 years ago

I am trying to train model on custom dataset as below:

!python "/content/gdrive/MyDrive/gitrepo/YOLOv6/tools/train.py" --batch 256 --conf "/content/gdrive/MyDrive/gitrepo/YOLOv6/configs/yolov6s_finetune.py" --data "/content/gdrive/MyDrive/gitrepo/YOLOv6/data/dataset.yaml" --device 0


Where dataset.yaml file is changed as below:


Please insure that your custom_dataset are put in same parent dir with YOLOv6_DIR

train: "/content/gdrive/MyDrive/gitrepo/YOLOv6/custom_dataset/images/train" # train images val: "/content/gdrive/MyDrive/gitrepo/YOLOv6/custom_dataset/images/val" # val images test: "/content/gdrive/MyDrive/gitrepo/YOLOv6/custom_dataset/images/test" # test images (optional)

whether it is coco dataset, only coco dataset should be set to True.

is_coco: False

Classes

nc: 1 # number of classes names: ['pistol'] # class names


But output generated is referring class from COCO dataset armas (1853)

Is there anything else that needs to be changed in code?

sangramdogra commented 2 years ago

This is resolved. We hace to add yaml file as parameter --yaml.