kijai / ComfyUI-Florence2

Inference Microsoft Florence2 VLM
MIT License
300 stars 17 forks source link

OCR - end and beginning of different lines stick together #9

Closed Ratinod closed 1 week ago

Ratinod commented 1 week ago

Text on image:

Line 1
Other line

output:

Line 1Other line

I would like to have the text wrap to a new line or at least one space.

kijai commented 1 week ago

I can't see a way to do that, it just returns it as one string and includes spaces if the detected text has spaces, there doesn't seem to be any separation between detected texts.

kijai commented 1 week ago

For the "ocr_with_region" I could do this: image

Ratinod commented 1 week ago

I can't see a way to do that, it just returns it as one string and includes spaces if the detected text has spaces, there doesn't seem to be any separation between detected texts.

Well then this topic is not relevant. I thought OCR produced text in the <s></s> format like in other "tasks" (which are now automatically removed after the latest update) . But if he doesn’t do this, then nothing can be done.

For the "ocr_with_region" I could do this:

Oh, looks good. The main thing is to make such information output as an option (i.e. leaving the possibility of the original output with coordinates)

Ratinod commented 1 week ago

I'm closing the issue. Maybe outputting coordinates in ocr_with_region is not so important...