ultralytics/yolov5

Classification training model error

Closed this issue · 2 comments

Search before asking

Question

python python train.py --data hellodata --epochs 300 --weights yolov5s-cls.pt --cfg yolov5s.yaml --batch-size 512


Traceback (most recent call last):
  File "train.py", line 848, in <module>
    main(opt)
  File "train.py", line 591, in main
    check_file(opt.data),
  File "/home/mm/Yolov5/utils/general.py", line 503, in check_file
    assert len(files) == 1, f"Multiple files match '{file}', specify exact path: {files}"  # assert unique
AssertionError: Multiple files match '/media/hellodata', specify exact path: ['/media/hellodata', '/media/hello', '/media/hellodata']
hellodata
# -images
#   --train
#       |--dog
#       |----1.jpg
#       |----2.jpg
#       |--cat
#       |----1.jpg
#       |----2.jpg
#   --val
#       |--dog
#       |----1.jpg
#       |----2.jpg
#       |--cat
#       |----1.jpg
#       |----2.jpg
#   --test
#       |--dog
#       |----1.jpg
#       |----2.jpg
#       |--cat
#       |----1.jpg
#       |----2.jpg


### Additional

_No response_

cd classify

Hello! It looks like you're interested in switching to the classification part of our project with cd classify. If you're encountering any issues or have specific queries regarding classification training or operations within the classify directory, could you please provide more details? This will help me assist you more effectively. Thanks for engaging with the Ultralytics community! 😊