roboflow / supervision

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

Add Florence 2 support #1296

Closed LinasKo closed 3 months ago

LinasKo commented 3 months ago

Description

This PR adds Florence 2 support for supervision.

Run it with transfomers and parse with from_lmm(sv.LMM.FLORENCE_2, result).

No extra documentation was added to from_lmm at this point.

Type of change

How has this change been tested, please provide a testcase or example of how you tested the change?

Usage and testing in Colab: https://colab.research.google.com/drive/19XoQZ6LRdTUysAHUp-3JsfT_67T0rffE#scrollTo=CwPzmI9wOSQ6

Any specific deployment considerations

Run the Colab in High-RAM mode.

Docs

LinasKo commented 3 months ago

I found there's some tasks I overlooked.

In addition to examples on their Hugging Face page, they have 5-6 more on their colab.

At the end of today I'm leaving this in a working-but-incomplete state: I've added all tasks I could find, updated the Colab, but am not yet happy yet.

Planning to dig deeper, simplify and add unit tests tomorrow.

LinasKo commented 3 months ago

Hi @SkalskiP,

This now has:

Where it's lacking is:

I invite to look at the Colab and play around with the results.