-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: WARNING: No labels found in (userDirectory) ... Cannot train without labels #223
Comments
annotate data and then make two separate files for images and labels and then in data.yaml file give path to the training and validation data according to wherever you have stored the data and during training give the path of data.yaml in the -data command. |
@Maharshi-joshi I understand that. It is the same directory structure that yolov5 requires. I have used this same directory structure on previous projects, however it still does not recognize my labels. Below is the following input entire terminal output when running the command: python train.py --batch-size 8 --img 512 --data C:/yoloR_env/RWC_V2_534_images.v2-534_flip_4x4tiles.yolov5pytorch/data.yaml --cfg cfg/yolor_p6_rcw.cfg --weights yolor_p6.pt --device 0 --name yolor_p6 --hyp hyp.scratch.1280.yaml --epochs 300 |
It is suggesting that it is empty. Are your labels in .txt format? Can you open and confirm that there are dimensions and labels in the labels file? |
Correct, my labels are in a .txt format as follows: imageName.txt where imageName matches the actual image file name (.jpg). The dimensions and class in each .txt file follow this format: Labels were done and exported in roboflow (as recommended by yoloR & yolov5). My directory structure is also the same as recommended by YoloR. |
I have the same exact problem.. which is weird since I just used the same dataset to train Scaled Yolov4 and Yolov5 Without any problem. This solved my problem |
I have same problem in yolov7. |
I have tried every single solution I've come across. YoloR refers you to the Yolov5 method of annotating data. However, creating Yolov5 annotated files on RoboFlow and setting up the directory as suggested by Ultralytics has not worked for me.
The text was updated successfully, but these errors were encountered: