yu20103983 / FOTS

FOTS tensorflow implementation, Include train and test, EAST+Rotate+CRNN. FOTS: Fast Oriented Text Spotting with a Unified Network
89 stars 35 forks source link

ValueError: not enough values to unpack (expected 3, got 1) #4

Closed kei6 closed 5 years ago

kei6 commented 5 years ago

Hi @yu20103983 , I've faced with this issue, Can you help to fix this?

 File "/home/FOTS/multigpu_train.py", line 230, in main
    fots_testModel.detectRecg(d_images, sess=sess)
  File "/home/FOTS/FOTS/fots_testModel.py", line 257, in detectRecg
    rois_op, ws_op = RoiRotate.RoiRotate(filter_bsharedFeatures, FLAGS.features_stride)(brotateParas)
  File "/home/FOTS/FOTS/RoiRotate.py", line 50, in __call__
    outBoxes, cropBoxes, angles = rboxes
ValueError: not enough values to unpack (expected 3, got 1)

Thanks a lot ^^!

yu20103983 commented 5 years ago

You must have changed something. variable rboxes come from dataset.dataReader.restore_roiRotatePara, check there first.

kei6 commented 5 years ago

I've already checked that. I found that dataset.dataReader.restore_roiRotatePara works well.

Having some wrong in brotateParas hence the issue. I found that brotateParas is a nested list, and RoiRotate.RoiRotate cannot work with this nested list. I've already tried to convert brotateParas into a flatten list, by using:

        import more_itertools
        brotateParas = list(more_itertools.flatten(brotateParas))

        rois_op, ws_op = RoiRotate.RoiRotate(filter_bsharedFeatures, FLAGS.features_stride)(brotateParas)

but another bug comes out. Test function seems to be not working!

Could you please check it again?

Thanks in advance!

yu20103983 commented 5 years ago

oh! I have found this bug.I forgot to extract the nested list as a single list. You can update the modified code to solve this problem. Thanks, good luck!

kei6 commented 5 years ago

Thanks @yu20103983