Closed mobassir94 closed 2 years ago
π Hello @mobassir94, thank you for your interest in YOLOv5 π! Please visit our βοΈ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
If this is a π Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training β Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.
Python>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started:
$ git clone https://github.com/ultralytics/yolov5
$ cd yolov5
$ pip install -r requirements.txt
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
instead of names: ["name","age","mobile"] it will be : names: ['name','age','mobile']
sorry for the silly mistake!
sorry the problem not finished yet,,got same error again, so it's names: ['name','age','mobile'] not the solution
@mobassir94 π hi, thanks for letting us know about this possible problem with YOLOv5 π. We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem.
When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:
For Ultralytics to provide assistance your code should also be:
git pull
or git clone
a new copy to ensure your problem has not already been solved in master.If you believe your problem meets all the above criteria, please close this issue and raise a new one using the π Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem.
Thank you! π
How did you solved it ?
Hi @raftaarrashedin,
Thank you for following up! I'm glad to hear that you managed to resolve the issue. For the benefit of others who might encounter a similar problem, could you please share the solution you found?
If anyone else is experiencing similar issues, here are a few steps you can take to troubleshoot:
Verify Dataset Configuration: Ensure your data.yaml
file is correctly formatted and paths are accurate. For example:
train: /path/to/train/images
val: /path/to/val/images
nc: 3
names: ['name', 'age', 'mobile']
Check Label Files: Make sure your label files are in the correct YOLO format, with one .txt
file per image and each line in the format class x_center y_center width height
.
Update to Latest Versions: Ensure you are using the latest versions of YOLOv5 and PyTorch. You can update YOLOv5 with:
git pull
pip install -r requirements.txt
Reproduce the Issue: If the problem persists, please provide a minimal, reproducible example so we can investigate further. You can find more details on creating a reproducible example here.
Sharing your solution will greatly help the community. Thank you for your cooperation and happy coding! π
Search before asking
Question
i am trying to train yolov5 on a custom dataset containing 3 classes.once the training is done,during validation i get this error :
even though i wrote custom yaml file like this :
i still get the error above and while inferring, all the bounding boxes are given "name" as label ,instead of predicting these 3 classes names: ["name","age","mobile"] my model always predicts "name" for all 3 fields(please check the last image attached in the colab code): here is the code with outputs and errors : https://colab.research.google.com/drive/1Pyz5hCi0fpmQ4lFV9rvAcdMp2yg9KN1P#scrollTo=ogZdrD4OY2Wg
how can i solve this issue? thanks in advance
Additional
no