TextFuseNet icon indicating copy to clipboard operation
TextFuseNet copied to clipboard

Found a way to get label from model.

Open da-head0 opened this issue 3 years ago • 1 comments

I spent few hours to find how to get text or character prediction from this model.

my solution is this.

open 'TextFuseNet/detectron2/utils/visualizer.py' file.

about line 201, add this code print("labels: ", labels) image

Then, once you run !python demo/icdar2013_detection.py, the prediction outcome will come as well.

box-3887621_1920-1600x1067 as ['text', 'E', 'A', 'F', 'L', 'G', 'R', 'I', 'text']

img0002 as ['text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'S', 'R', 'C', 'T', 'E', 'T', 'E', 'd', 'N', 'N', 'h', 'E', 'E', 'P', 'e', 'E', 'R', 'n', 'text', 'T']

I run icdar2013 model, so if you run other model or train model, the result might be better.

da-head0 avatar Apr 25 '21 11:04 da-head0

Can we get a text as word result as well? for example, for text prediction 'Subway', not 'text' but as 'Subway' itself.

da-head0 avatar Apr 25 '21 11:04 da-head0