felixBrave / ocr_chinese

图像文字检测模型(EAST/AdvancedEAST),及包含文字识别模型(CRNN+CTC),Keras/TensorFlow实现.
190 stars 45 forks source link

大佬您好,跑的程序一直报ValueError的错,能帮我看看是什么原因吗? #22

Open hexi98 opened 2 years ago

hexi98 commented 2 years ago

Traceback (most recent call last): File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/predict.py", line 73, in texts = predict_text(crnn_model, text_recs_all, text_recs_len, img_all, img_name=im_name) File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/crnn/predict_crnn.py", line 125, in predict_text img_rec = dumpRotateImage(img_all[img_index], recs_all[i]).convert('L') File "/Users/hexi/Desktop/数字人文/demo/ocr_chinese-master/crnn/predict_crnn.py", line 94, in dumpRotateImage img_rec = img_rot.crop((pt1_N[0], pt1_N[1], pt3_N[0], pt3_N[1])) File "/Users/hexi/miniforge3/envs/mini_envs/lib/python3.8/site-packages/PIL/Image.py", line 1207, in crop raise ValueError("Coordinate 'right' is less than 'left'",box) ValueError: ("Coordinate 'right' is less than 'left'", (596, 450, 561, 432))

keyfall commented 1 year ago

你找到这个解决方法了么,我知道是561比596小,然后432比450小,这是crop函数的报错,我也在找解决方法

hexi98 commented 1 year ago

您好,您的邮件已收到~祝您生活愉快~                                                      --何熹同学

keyfall commented 1 year ago

这个问题就是使用的环境和库版本和项目给的不一样