faustomorales / keras-ocr

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
https://keras-ocr.readthedocs.io/
MIT License
1.37k stars 349 forks source link

Fine-tuning the detector meet pts=box[np.newaxis].astype('int32') list indices must be integers or slices, not NoneType #167

Open zhangjiulong opened 3 years ago

zhangjiulong commented 3 years ago

I used source code and tested Fine-tuning the detector, but when runned to canvas = keras_ocr.tools.drawBoxes(image=image, boxes=lines, boxes_format='line') and cv2.polylines(img=canvas, pts=box[np.newaxis].astype('int32'), color=color, thickness=thickness, isClosed=True) then report an eror like :TypeError: list indices must be integers or slices, not NoneType