Skip to content

Conversation

SkalskiP
Copy link
Collaborator

Initial support for from_lmm and specifically for PaliGemma.

```python
import supervision as sv

paligemma_result = "<loc0256><loc0256><loc0768><loc0768> cat"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be also useful for models like KOSMOS-2 so best to make it very general (this is a trend with VLMs these days) https://huggingface.co/docs/transformers/en/model_doc/kosmos-2#transformers.Kosmos2ForConditionalGeneration.forward.example

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what I want to do is one from_lmm function, providing separate dedicated parsers for each model. :)

@SkalskiP SkalskiP marked this pull request as ready for review May 22, 2024 15:44
@SkalskiP SkalskiP merged commit 2723735 into develop May 24, 2024
@LinasKo
Copy link
Contributor

LinasKo commented May 24, 2024

@SkalskiP, very quick one: I've just noticed that LLM is not in __init__.py, so the example with sv.LLM.PALIGEMMA didn't work.

@SkalskiP
Copy link
Collaborator Author

@LinasKo Good catch! I just fixed it.

@onuralpszr onuralpszr deleted the from_paligemma_support branch September 23, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants