ultralytics / yolov3

YOLOv3 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
10.16k stars 3.44k forks source link

Train a custom data set (flower), and use the trained weight file to detect objects. The result is wrong, and the detection results are cars and people. #1236

Closed TravisTorch closed 4 years ago

TravisTorch commented 4 years ago

c9e7014dc7467ce5f389ba63a9cf1960 Screenshot from 2020-05-26 13-10-17

www7890 commented 4 years ago

you forget to change class names. check your .names file and correct it as flower of some other classes. The order in .names file means classs0, class1,.......etc

TravisTorch commented 4 years ago

you forget to change class names. check your .names file and correct it as flower of some other classes. The order in .names file means classs0, class1,.......etc

I have done the work you said, but it still does not work, you can see the photos I uploaded.

TravisTorch commented 4 years ago

you forget to change class names. check your .names file and correct it as flower of some other classes. The order in .names file means classs0, class1,.......etc

I have modified the ,cfg .data *.names file.And the labels file and train.txt test.txt file are generated. I have tried the following training commands, all of which generate weight files, but the above error occurs when detecting objects. python train.py --data data/cell.data --weights weights/yolov3-spp-ultralytics.pt --batch-size 4 --cfg yolov3-spp.cfg python train.py --data data/cell.data --weights weights/yolov3-spp-ultralytics.pt --batch-size 4 --cfg yolov3-spp.cfg help me!

www7890 commented 4 years ago

oh okay, the train.py has parse --names, you may try to change the default or just add --names <your .names file dir>

TravisTorch commented 4 years ago

oh okay, the train.py has parse --names, you may try to change the default or just add --names <your .names file dir>

I modified the names in the train.py file, but it has no effect. Can you add me qq (1334521284)? help me.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove Stale label or comment or this will be closed in 5 days.

nazimcode commented 4 years ago

Hi, i was wondering how did you create the custom dataset ? I'm working on a similar subject with dataset oxford flower with 102 species, but I didn't find a dataset with the annotations for object detection

glenn-jocher commented 10 months ago

@nazimcode hi there! For custom datasets like the Oxford Flower dataset, you can use tools such as labelImg to manually annotate the object locations within the images. This will generate XML files containing the object annotations. You can then convert these annotations to YOLO format using a script or tool such as Roboflow, YOLO-mark, or Labelbox.

Feel free to reach out if you have any further questions or need additional assistance!