-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Help Wanted 🙏 Add Oriented Bounding Boxes (OBB) Task with DOTA v2 Training #4242
Comments
Hi @glenn-jocher, I already face the OBB problem with WOD (Waymo Open Dataset) :-). My code with WOD I think already works but with OBB I have so I can not train the model corectly. Can you give me a hint what part of the code I should have a look in order to add orientation to the bounding box? Thanks in advance, |
extremely waiting for it........ |
@atanasko well the good news is that we have an open OBB PR in #1977 and I've separately added support for DOTAv2 dataset training in #4258. The main problem is the OBB PR #1977 was open for a while and now the original author isn't responding. If you could help us get it going that would be super helpful. Also if you could help us get an OBB version of the WOD dataset that would be awesome too! |
hi @glenn-jocher, I'll have a look and come back to you. Best regards, |
Hi @atanasko, That sounds excellent! We truly appreciate your willingness to delve into this. Your insights and contributions could potentially be pivotal to advancing this feature. Please feel free to share any questions, concerns, or progress updates - we are here to provide any guidance you may need. Looking forward to your findings! Best Regards, |
hi @glenn-jocher, I grab obb-dev branch into my fork of the ultralitics repository. I will download DOTA v2 dataset and try to start training process. Best regards, |
@atanasko got it! There's probably some changes that may need to be made to label formats, as DOTAv2 dataset is in the new YOLO OBB format I defined in https://docs.ultralytics.com/datasets/obb/, each row is class_index, then the 4 normalized points xy1, xy2, xy3, xy4 |
hi @glenn-jocher, In the ticket description example code
initialization should be from model .pt file no?
|
@atanasko yes this is True, I've updated it! Note we don't have any pretrained models yet, this is the intended use case once we have them. |
hi @glenn-jocher, I download the dataset and prepare locally as advised in DOTA-v2.0 instructions, and try to trigger the process, but there were warnings in the log file and when I open ex. P0000.txt label txt file labels are like:
and this is not like format expected in OBB. Any advice how to proceed with this? Thanks in advance, |
hi @glenn-jocher, OK, by using the following scrip I process all label files.
and try to trigger the training process, but I have the following error in the log Any advice? |
@atanasko don't worry, you don't need to do any manual updates to the dataset, just run this command and the dataset will automatically download and convert to the YOLO OBB format:
Note training will crash since OBB is not a supported task yet, but the dataset itself will download for you to look at. |
hi @glenn-jocher, I do try using the downloading script it downloads only DOTAv1 images no? Should v2 images be downloaded also? Thanks in advance, |
@atanasko the training script with download DOTAv2 images:
|
hi @glenn-jocher, I grab your changes and try to start the training process by
for a new model, but in the
there is
labels are expected in "~/labelTxt" sub-directory. Is this correct? |
hi @glenn-jocher, And also in
fails |
@atanasko PR in non-operative currently, your example shows intended usage once it's complete. |
hi @glenn-jocher, thanks! how can I be of any further help here? I see that there is already new obb branch in the ultralytics repository |
Hi @atanasko, Thanks for offering your help! We definitely appreciate community's contribution. At this stage, we're still working on the initial implementation of the OBB feature. As we progress, we'll mark this issue with appropriate tags like 'help wanted' or 'good first issue' whenever we identify areas that can benefit from external contributions. These tasks might include creating unit tests to validate the feature or enhancing the documentation to explain the new functionality. When those tasks are ready, we'll certainly welcome your assistance. In the meantime, feel free to browse other issues to see if there's something else where you would like to contribute. Thank you again for your interest in this project, and we're looking forward to collaborating with you in the future! Best, |
@xiaofulee thank you for reporting this issue. From what I can see, it seems like there might be some misunderstandings with variable assignments in loss.py. The error message you're seeing typically arises when a variable is referenced before it has been assigned any value. It would be beneficial to ensure that the all variables are defined and assigned before they are called. This could be a version error, or possibly some alterations in the code that lead to this problem. We'll look into this issue promptly and try to get it sorted out as soon as possible. Thank you for your patience and support. Best, |
@TuanTorushiro At present, neither YOLOv5 nor YOLOv8 officially support oriented bounding boxes (OBB). We're actively exploring the inclusion of OBB in future updates. Stay tuned with the repo for any announcements on this feature! 🌟 |
"I am using a modified version with a 360-degree angle from
https://github.com/thohemp/cube_detector. Although it's a variant of v5.0,
it works well."
2023년 12월 11일 (월) 오전 9:38, Luu Duc Tuan ***@***.***>님이 작성:
… @TuanTorushiro <https://github.com/TuanTorushiro> hi there! Currently,
YOLOv8 predicts axis-aligned bounding boxes by default, which do not
include orientation information. Oriented bounding boxes (OBB) are a
feature on our roadmap that would allow us to estimate the orientation of
objects, but it is not yet implemented in the official Ultralytics YOLOv8
repo.
For now, if you need to work with oriented bounding boxes, you would need
to develop custom functions that can predict the rotation angle and adjust
your training pipeline accordingly. Keep an eye on the repo for future
updates on OBB support. 🔄 Happy coding!
"So, does YOLOv5 support oriented bounding boxes (OBB) in its version?"
—
Reply to this email directly, view it on GitHub
<#4242 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWRTZLKFKZCT3RFERH4SE3YIZIZXAVCNFSM6AAAAAA3JHDKIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGE2TEOJYG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
"Could you show me how the directory structure for the training, validation, and test datasets is organized?" I am training in GPU Cuda window11 |
@TuanTorushiro, it's great to hear that you've found a working solution for OBB with a YOLOv5 variant. As for your dataset organization, typically, you want to structure your directories with separate folders for your training, validation, and test sets. Each set should have a directory of images and a corresponding annotation file or directory of annotation files, depending on the format required by the training script. Keep all images and annotations organized, ensuring paths are correctly referenced in any configuration or data files used during training. 📁🚀 |
train
- images
- labels
val
-images
- labels
test
- images
- labels
It is identical to YOLO, except that an 'angle' has been added to the label
at the end. Label content: 0 0.2462 0.7654 0.0442 0.2375 337
… Message ID: ***@***.***>
|
Your tag is not formatted correctly, you should refer to this.https://docs.ultralytics.com/datasets/obb/ |
@Zzzxi, your directory structure looks correct for training a YOLO model, with separate folders for images and labels. The addition of an angle to the label signifies your move towards using oriented bounding boxes (OBB). Make sure that your custom labels follow the expected format and that any custom code modifications can correctly interpret the angle for training. Good luck with your project! 📐👍 |
when training using the OBB branch, i noticed that my MAP is about 90% but my oriented bounding boxes are not oriented well. Could this have to do with the conversion from xyxyxyxy to xywhr ? i have formatted my labels to cls x1 y1 x2 y2 x3 y3 x4 y4 starting at the top left point and going clockwise. Are there any solutions why my model is not learning correctly but my MAP is so hight? |
@W-Hoole the obb branch is still working on progress and be updated every day, probably some commits breaks your training or inference. |
@Zzzxi wow! that's good to know! |
I look forward to your project becoming more refined! |
Very Interesting work! I'd love to help where I can with adding oriented bounding boxes task with DOTA v2 Training |
@Yuri-Njathi that's wonderful to hear! We appreciate your interest in contributing to the OBB task with DOTA v2 training. I suggest starting by getting familiar with our guidelines on contributing, then setting up a development environment. After that, you can fork the YOLOv8 repo, create a new branch for your work, and experiment with integrating the OBB functionality. Remember to check the existing issues and PRs to avoid duplicating work. Your involvement is highly valued, and we look forward to your innovative solutions. Happy coding! 🚀🧠 |
Although I haven't been able to draw Oriented Bounding Boxes (OBBs) around objects yet, I have found a solution to determine the orientation for each default bounding box. Determining the orientation is crucial as it precisely defines the rotation angle of the object. This is a fundamental prerequisite for developing applications in the field of automated robotic object grasping and lifting. I hope Yolov8 will soon release a version that supports Oriented Bounding Boxes! |
@TuanTorushiro, your anticipation for OBB support in YOLOv8 and its potential applications in robotics is encouraging! The team is diligently working on this feature, and your insights on orientation will be very useful for this development. Keep an eye on our updates for the upcoming release. Your patience and input are much appreciated! 🔄✨ |
The performance metrics obtained from training my own dataset are still not ideal. Is the IOU still being further improved? @Laughing-q |
@Zzzxi we're aware and actively working on improving OBB support, including refining the IOU calculations. Your patience and feedback are essential to our progress. Stay tuned for updates! 🔄🛠️ #OBBUpdate |
Following up in this direction,
As @surefyyq mentioned, using segmentation for obb seems unfit here. It would be better to do this for an algo that solely focuses on segmentation and is probably SOTA. Can someone (@Laughing-q) add his thoughts on this? |
@prashant-dn the ongoing development of OBB is exploring various approaches, and while the segmentation head concepts provided insights, it's clear that we need a more tailored solution for OBB. The angles and unique challenges presented by OBB require specific handling beyond typical HBB or segmentation. Optimization and annotation clarity are also critical considerations. Rest assured, we're actively working on refining the process and welcome further community input and discussion on the best path forward. 🔄🎯 |
@glenn-jocher, |
@TuanTorushiro yOLO specializes in computer vision tasks, and we currently don't have plans to extend into audio processing. For audio-related tasks, you might want to explore frameworks like TensorFlow or PyTorch, which have audio processing capabilities. 🎵👨💻 |
@glenn-jocher What do you think about supporting gray scale images with one channel? There are many people wanting this feature. 3 channels are hard to process in CPUs. |
Dear @glenn-jocher, |
Hello YOLOv8 Enthusiasts,
We are reaching out to the talented community to help add support for DOTA v2 training with Oriented Bounding Boxes (OBB) for our YOLOv8 repository. This addition will notably enhance our detection capabilities for remote sensing imagery, enabling superior performance for real-world applications.
Related to issue #624 and PR #1977
Project Description:
Our primary objective with this issue is to integrate the DOTA v2 dataset into our YOLOv8 training pipeline, with a focus on Oriented Bounding Boxes. This demands crafting methods or functions to accommodate the unique data format of DOTA v2, and seamlessly incorporate it into our existing training framework.
Example code:
In this envisaged example, the
data
argument would accept a configuration file specifically crafted for the DOTA v2 dataset with OBB,'DOTAv2.yaml'
. This configuration file should encompass all essential details to fetch, process, and utilize the dataset during training.Expected Deliverables:
How to contribute:
Every contribution, regardless of its magnitude, is deeply appreciated. Your efforts contribute massively to the broader community, and every input is treated with respect.
Community Support:
To amplify its visibility, this issue will be pinned. If you need support or have inquiries, do not hesitate to contact us either on this thread or via our Discord.
Gratitude and best wishes on your coding journey!
Warm Regards,
The YOLOv8 Team
The text was updated successfully, but these errors were encountered: