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

yolov5 instance segmentation inference #1284

Open
2 tasks done
DrawingProcess opened this issue Jun 16, 2024 · 15 comments
Open
2 tasks done

yolov5 instance segmentation inference #1284

DrawingProcess opened this issue Jun 16, 2024 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@DrawingProcess
Copy link
Contributor

Search before asking

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

Description

yolov5 is a detection and 'instance segmentation' model.
so, I think If there is a mask area, I think it should be return.

like below

return cls(
    xyxy=yolov5_detections_predictions[:, :4],
    confidence=yolov5_detections_predictions[:, 4],
    class_id=yolov5_detections_predictions[:, 5].astype(int),
)

Use case

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@DrawingProcess DrawingProcess added the enhancement New feature or request label Jun 16, 2024
@LinasKo
Copy link
Collaborator

LinasKo commented Jun 17, 2024

Hi @DrawingProcess 👋

Well spotted. I thought we had it. Still, let me check with the core team and check our stance on this.

Meanwhile, there are things we need to find out first:

  1. Are yolov5 weights for segmentation available in Pytorch Hub. It would make our testing easier.
  2. Can our from_ultralytics method handle yolov5 response? My guess is no.
  • If yolov5 provides a list as a response, we should check both from_ultralytics(results) and from_ultralytics(results[0])
  1. Is segmentation with yolov5 something you need for your project? In 99% of the cases, we'd recommend using yolov8 instead.

@Bhavay-2001
Copy link
Contributor

Hi @DrawingProcess @LinasKo, can I start working on this if no one is working on this already?

@DrawingProcess
Copy link
Contributor Author

@Bhavay-2001 Sure. I'll contribute to another part.

@LinasKo
Copy link
Collaborator

LinasKo commented Jun 19, 2024

Hey @Bhavay-2001 , @DrawingProcess ,

I'd like to chat with the core team before starting this one.

Also, @DrawingProcess has priority here as he suggested working on it.

@Bhavay-2001
Copy link
Contributor

Sure @LinasKo, if @DrawingProcess wants to work on this he can else I would be up to take this issue.
Thanks

@DrawingProcess
Copy link
Contributor Author

@LinasKo If it's confirmed, I'll proceed.

@LinasKo
Copy link
Collaborator

LinasKo commented Jun 19, 2024

@DrawingProcess, confirming half of it. You may start working after I check with @SkalskiP.

@DrawingProcess
Copy link
Contributor Author

@LinasKo I checked it and I will send you PR after testing it.

@LinasKo
Copy link
Collaborator

LinasKo commented Jun 24, 2024

Hi @DrawingProcess,

I spoke with the core team. It sounds like a useful change and your contribution would be most welcome. 😉

Please don't forget to include the Colab, as that speeds up our review process.

@Bhavay-2001
Copy link
Contributor

Hi @DrawingProcess, are you working on this one?

@DrawingProcess
Copy link
Contributor Author

DrawingProcess commented Jul 18, 2024 via email

@SkalskiP
Copy link
Collaborator

Hi @DrawingProcess 👋🏻 let us know if you need help or are overwhelmed by work. We can reassign this issue if you don't have time.

@Bhavay-2001
Copy link
Contributor

Hi @SkalskiP, any active issues to work on right now which are needed for the upcoming release?

Also, I asked about adding the REDETR model soo any progress on that one?

Thanks

@DrawingProcess
Copy link
Contributor Author

DrawingProcess commented Aug 1, 2024

I have a little problem about torch.hub.load.
I think they are not yet fully supported for PyTorch Hub inference yolov5 seg model.

Here is my colab source.
https://colab.research.google.com/drive/1UizExI0Fs4zTSeLzN_UnIECJxn64mQgl?usp=sharing

Screenshot from 2024-08-01 20-17-46

@SkalskiP
Copy link
Collaborator

SkalskiP commented Aug 6, 2024

Hi @DrawingProcess, sorry to hear this. Looks like it breaks before you feed model results to supervision. Nothing we can do about it :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants