Skip to content
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

A generalized YOLOv8 model with DET, OBB, SEG and POSE tasks. #12174

Closed
2 tasks done
zhouzq-thu opened this issue May 11, 2024 · 3 comments
Closed
2 tasks done

A generalized YOLOv8 model with DET, OBB, SEG and POSE tasks. #12174

zhouzq-thu opened this issue May 11, 2024 · 3 comments
Labels
enhancement New feature or request Stale

Comments

@zhouzq-thu
Copy link

zhouzq-thu commented May 11, 2024

Search before asking

  • I have searched the YOLOv8 issues and found no similar feature requests.

Description

Currently, we can only use the YOLOv8 model to handle one of obb, seg and pose tasks.

Idea

Since one of the output layers of the YOLOv8 model has the output with shape as follows:

  • det: [bs, num_classes + 4 * reg_max, lw, lh]
  • obb: [bs, num_classes + 4 * reg_max + 1, lw, lh]
  • seg: [bs, num_classes + 4 * reg_max + num_masks, lw, lh]
  • pose: [bs, num_classes + 4 * reg_max + 3 * num_kpts, lw, lh]

We can define a generalized YOLOv8 model with output as follows:

  • gen: [bs, num_classes + 4 * reg_max + is_obb + num_masks + 3 * num_kpts, lw, lh]

Use case

class GeneralizedHead(nn.Module):
    """YOLOv8 Generalized head."""
    def __init__(self, nc=80, is_obb=False, nm=0, npr=256, kpt_shape=None, ch=()):
        ...

With the generalized YOLOv8 model:

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@zhouzq-thu zhouzq-thu added the enhancement New feature or request label May 11, 2024
Copy link

👋 Hello @zhouzq-thu, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

@zhouzq-thu hello there! Thank you for your detailed suggestion regarding a generalized YOLOv8 model that can handle multiple tasks (DET, OBB, SEG, and POSE) in one framework. This is indeed a very interesting idea and could significantly enhance YOLOv8's versatility.

Your proposed approach to integrating a generalized head that can dynamically configure to handle combinations of different tasks is compelling. It would allow the user customization based on specific requirements, and using flags like is_obb, nm, and kpt_shape as parameters offers a straightforward method to toggle functionalities.

I encourage you to proceed with submitting a PR since you are already considering it. The community, including the development team, would greatly benefit from this capability and can provide feedback directly on your implementation. Looking forward to seeing your contribution! 😊🚀

Best of luck!

Copy link

👋 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 ⭐

@github-actions github-actions bot added the Stale label Jun 12, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants