TextFuseNet icon indicating copy to clipboard operation
TextFuseNet copied to clipboard

TypeError: cannot unpack non-iterable VisImage object

Open dadizak opened this issue 4 years ago • 3 comments

thanks for this work,i'm very gratefuly to help me to fix this error: Traceback (most recent call last): File "/content/TextFuseNet/demo/icdar2015_detection.py", line 135, in prediction, vis_output, polygons = detection_demo.run_on_image(img) File "/content/TextFuseNet/demo/predictor.py", line 64, in run_on_image vis_output, polygons = visualizer.draw_instance_predictions(predictions=instances) TypeError: cannot unpack non-iterable VisImage object

dadizak avatar Dec 01 '21 10:12 dadizak

Hi, I encountered the same error running icdar2015_detection.py. I suspect it might be something to do with the fact that I am not running TextFuseNet-Detectron due to CUDA 10.1 being incompatible with my GPU but here's the fix that is working for me right now:

In icdar2015_detection.py, change line 135 from prediction, vis_output, polygons = detection_demo.run_on_image(img) to prediction, vis_output = detection_demo.run_on_image(img) and comment out line 139.

Then, in predictor.py, change line 64 from vis_output,polygons = visualizer.draw_instance_predictions(predictions=instances) to vis_output = visualizer.draw_instance_predictions(predictions=instances) and comment out , polygons in line 66.

My guess is that their TextFuseNet-detectron's visualizer function works differently than the one in stock Detectron2. Hope this helps.

mwolf2 avatar Dec 02 '21 20:12 mwolf2