I'm trying to train the YOLOv5 on my custom dataset by following the youtube tutorial on Roboflow. However, I keep getting an error when I am trying to train my dataset.
2 Answers
I tried to reproduce your error with a custom dataset from roboflow and YOLOv5 Colab notebook, and my training began successfully:
Based on your error screenshot, it appears the training is finding multiple datasets for train, valid, and test. That may mean you copied multiple datasets into the notebook environment and the model is unsure which you want to use for training. I recommend (1) restarting the notebook kernel and importing your dataset using the Roboflow code snippet only once (2) investigating the dataset in Roboflow to verify you have a train, valid, and test split as the model is expecting. Roboflow does enable you to rebalance train, valid, test and split when creating an export should you not have this split.

- 11
- 2
-
Hi Sir, thank you very much for the kind assistance. I have did what you told me and only inserted the Roboflow snippet once. I also rearranged the directory of the train, valid and test. After I did that, I was able to train my model. Lastly, can I asked if I should change the parameters for my nc in the yolov5s model to the nc that I have in my dataset? – Aloysius Neo Jul 10 '21 at 13:21
follow their blog with their colab notebook,you will get clearity:
https://blog.roboflow.com/how-to-train-yolov5-on-a-custom-dataset/

- 63
- 1
- 3
- 13