PaddleOCR2Pytorch
PaddleOCR2Pytorch copied to clipboard
运行例子出错,需要修改代码适配NumPy 1.24
File "D:\cvrd\PaddleOCR2Pytorch\pytorchocr\postprocess\db_postprocess.py", line 127, in box_score_fast xmin = np.clip(np.floor(box[:, 0].min()).astype(np.int), 0, w - 1) 原因是: numpy.int was deprecated in NumPy 1.20 and was removed in NumPy 1.24. You can change it to numpy.int_, or just int. 原文出处 处理方式:将127行开始的4个np.int替换成int就行了
https://stackoverflow.com/questions/74946845/attributeerror-module-numpy-has-no-attribute-int
numpy.int was deprecated in NumPy 1.20 and was removed in NumPy 1.24.
Quick temp fix (until code is updated from numpy.int to numpy.int_ or just int): pip install 'numpy<1.24'