-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Why 'targets' values from train.py are different from the ground truth annotation in txt files? #13000
Comments
@billalkuet07 hello, Great question! In YOLOv5, the ground truth values from the .txt files undergo transformations before being used in training. These transformations include scaling and normalization to match the input size of the model, which is why you see different values in Here’s a breakdown:
This processing is essential for adapting the various image sizes and annotations to a standard format suitable for efficient training of the neural network. Hope this clears things up! 😊 If you need more detailed insights, feel free to look into the data preprocessing steps in the code or visit our documentation at https://docs.ultralytics.com/yolov5/. Best regards! |
Thank you @glenn-jocher for your clarification. That answers my questions. However, could you please provide following additional information's:
Thanks again for your time consideration. |
Hello @billalkuet07, I'm glad you found the initial explanations helpful! To address your additional queries:
Feel free to dive deeper into the Best wishes! |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
Search before asking
Question
Hello,
I am trying to understand the YOLOV5 codes. Specially, how the detection is done and calculate loss in line 383 of train.py. I have noticed that the xywh values of variable 'targets' in line 383 of train.py is different from the ground truth in .txt file. The variable dataset.labels[i] from line 254 of train.py match with the values of .txt file. However, the values of dataset[i], targets and .txt is completely different. I have gone through the 'create_dataloader' and its not helping. May be I am missing something. Is there any transformation done? Could you please explain a brief about the relationship between the values of .txt, dataset[i], dataset.labels[i] and targets. How they are related?
Thank you in advance.
Additional
No response
The text was updated successfully, but these errors were encountered: