roboflow / supervision

We write your reusable computer vision tools. πŸ’œ
https://supervision.roboflow.com
MIT License
22.65k stars 1.69k forks source link

Help in gathering commonly used supervision functions. #1293

Closed LinasKo closed 3 months ago

LinasKo commented 3 months ago

We will be releasing a supervision cheatsheet soon - something of a similar style as https://github.com/a-anjos/python-opencv/blob/master/cv2cheatsheet.pdf

First, we need to gather a list of code snippets in a Colab. We'll then go over it and copy out a subset of the functions into the PDF.

Partial submissions are fine - every little bit helps!

The sections in the Colab I anticipate are as follows:

  1. # Supervision Basics - pip install supervision and inference, load an imagerun the model ("yolov8s-640") and from_inference, visualize result. This section also has Detections.empty, is_empty and Detections.merge.

More importantly this should have frequently searched behaviour such as selecting detections with one class. I'll add this myself later.

Let's include with_nmm and with_nms too.

https://supervision.roboflow.com/develop/#hello https://supervision.roboflow.com/develop/how_to/detect_and_annotate/ https://supervision.roboflow.com/develop/detection/core/

  1. # supervision assets - an example of loading from https://supervision.roboflow.com/assets/

  2. # Loading model results - examples of installing dependencies and running every model mentioned here, showing every from_X method at work.

https://supervision.roboflow.com/develop/detection/core/

  1. Annotators - Create and run every annotator on a detections object, show the result.

https://supervision.roboflow.com/develop/detection/annotators/

  1. # KeyPoints - similar sections of the Basics, from_X, annotators

https://supervision.roboflow.com/latest/keypoint/core/ https://supervision.roboflow.com/latest/keypoint/annotators/


If you start creating a Colab, please post a link on this issue.

After you're done, please set it to "anyone can edit" - it will be useful in the next few days.

LinasKo commented 3 months ago

@Bhavay-2001, does this sound interesting? I believe it's a good opportunity to learn more about the library, and we need this urgently. We expect to release the cheatsheet by the end of this week.

Realistically, this needs help with today, but the contribution doesn't have to be extensive - every little bit helps πŸ™‚

Bhavay-2001 commented 3 months ago

Hi @LinasKo, I have created a colab notebook. I have started with some examples and will add more in the coming days. Please have a look and let me know about that changes.

LinasKo commented 3 months ago

Hi @Bhavay-2001,

Thank you; that's already very useful!

Feel free to just copy things from our docs - in many cases there are examples. https://supervision.roboflow.com/latest/detection/core/

Bonus points for including many different use cases - a bit from every section

Bhavay-2001 commented 3 months ago

Hi @LinasKo, please review the colab notebook once again and share your feedback as I have updated with few more examples. There are some examples like with_nmm and with_nms and some others which don't have a coding snippet available. Soo what should we do regarding those examples?

LinasKo commented 3 months ago

Hi @Bhavay-2001,

Again, this looks awesome and very helpful. If there's no examples you can either try to make it working based on the docs, look for blog posts or here.

If a quick search yields no results, let me know - I can probably find a Colab.

Alternatively, if there's another section you'd prefer to work on, feel free to skip it. Anything you don't include, I will fill in myself, when I make the sheet.

Lastly, one update: there a new model out, so instead of launching it tomorrow, we'll do it by next Friday. So it's less urgent than I originally said.

Bhavay-2001 commented 3 months ago

Hi @LinasKo, I have updated the colab notebook again and raised a bug in the CropAnnotator class (#1301). Please review it and let me know what else can be added or this is it? Thanks

Bhavay-2001 commented 3 months ago

Hi @LinasKo, just let me know if anything else needs to be done in the notebook and also pls view the bug too that i have raised. I can try to fix it as well. Thanks

LinasKo commented 3 months ago

I'll have a look either today or tomorrow. Thanks again for your work!

Bhavay-2001 commented 3 months ago

Hi @LinasKo, any updates on this? Thanks

LinasKo commented 3 months ago

Hi @Bhavay-2001,

Thank you for your work! At this point I consider it complete - I'll be using the functions you extracted to create the cheat sheet for us.

Would you like to be mentioned in the launch post on LinkedIn? If so, do you have a LinkedIn profile, or should I use your GitHub?

P.S. I'll review the annotator issue you found soon.

Bhavay-2001 commented 3 months ago

Sure @LinasKo, I'll just drop my Linkedin right away. here

LinasKo commented 3 months ago

Thanks! I'll make sure to refer to your contribution πŸ˜‰