Open johnlockejrr opened 2 weeks ago
On 24/11/06 12:37AM, johnlockejrr wrote:
I was testing a
streamlit
simple inference forkraken
, segmentation -> recognition, for fast visual checking some models. I get the segmentation "regions" frombaseline_seg = blla.segment(image, model=seg_model)
(the segmentation output). Any idea how can I or if I can access them frompred_it = rpred.rpred(network=rec_model, im=image, bounds=baseline_seg)
(recognition output)? Thank you!
There's no integrated way, you need to keep track of segmentation
objects and the lines yourself. The regions have stable identifers
through the pipeline so you can flatten the region dict and then just do
the lookup from the ID(s) contained in the ocr_record objects returned
by rpred.rpred()
.
I think I will stay on getting them from the segmentation, I think is safe.
I was testing a
streamlit
simple inference forkraken
, segmentation -> recognition, for fast visual checking some models. I get the segmentation "regions" frombaseline_seg = blla.segment(image, model=seg_model)
(the segmentation output). Any idea how can I or if I can access them frompred_it = rpred.rpred(network=rec_model, im=image, bounds=baseline_seg)
(recognition output)? Thank you!https://huggingface.co/spaces/johnlockejrr/kraken_ocr
Snip of my code: