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

Florence2 workflows block #661

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

probicheaux
Copy link
Collaborator

@probicheaux probicheaux commented Sep 19, 2024

Description

Adds florence 2 model block and adds florence 2 parsing to VLM_as_detector block

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

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

Deployed locally and tested with prod workflows UI

Any specific deployment considerations

No

Docs

  • Docs updated? What were the changes:

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments - if possible let's plan next steps for hosted platform deployment

"""

TaskType = Literal[
"<OCR>",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is change in favour of clients using UI, probably would decrease code readability, but I would still choose that tradeoff - let's change the literal entries into this style:

ocr-with-region instead <OCR_WITH_REGION> and change it in prompting into f"<{value.upper().replace('-', '_')}>"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, this was still draft -- I added legible english descriptions and mapped them to tasks... that ok?

)
type: Literal["roboflow_core/florence_2@v1"]
images: Union[WorkflowImageSelector, StepOutputImageSelector] = ImageInputField
task_type: TaskType = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's change into this style: #659 following what @EmilyGavrilenko did

prompt=prompt,
)
elif self._step_execution_mode is StepExecutionMode.REMOTE:
raise NotImplementedError(
Copy link
Collaborator

Choose a reason for hiding this comment

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

just exploratory question - am I correct that for base model we could run it in core models lambda given special endpoint is created?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I believe so. We'd need to enable it with envvar also. It might be pretty dang slow depending on the task.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, true that

@PawelPeczek-Roboflow
Copy link
Collaborator

and if possible, could u add support on parsing block - VLM as detector

@PawelPeczek-Roboflow
Copy link
Collaborator

sorry, missclick

@probicheaux probicheaux marked this pull request as ready for review September 19, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants