PaddleOCR
PaddleOCR copied to clipboard
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
Hi, I am trying to run the following code:
python3 table/predict_table.py --image_dir=/scratch/rrs99/PaddleOCR/ppstructure/page_4.jpg \
--det_limit_side_len=736 \
--rec_model_dir=/scratch/rrs99/PaddleOCR/ppstructure/inference/en_ppocr_mobile_v2.0_table_rec_infer \
--table_model_dir=/scratch/rrs99/PaddleOCR/ppstructure/inference/en_ppocr_mobile_v2.0_table_structure_infer \
--det_model_dir=/scratch/rrs99/PaddleOCR/ppstructure/inference/en_ppocr_mobile_v2.0_table_det_infer \
--rec_char_dict_path=/scratch/rrs99/PaddleOCR/ppocr/utils/dict/table_dict.txt \
--table_char_dict_path=/scratch/rrs99/PaddleOCR/ppocr/utils/dict/table_structure_dict.txt \
--det_limit_type=min \
--output=/scratch/rrs99/PaddleOCR/ppstructure/output/table
However, I am getting the error:
Traceback (most recent call last):
File "/scratch/rrs99/PaddleOCR/ppstructure/table/predict_table.py", line 241, in <module>
main(args)
File "/scratch/rrs99/PaddleOCR/ppstructure/table/predict_table.py", line 189, in main
pred_res, _ = table_sys(img)
File "/scratch/rrs99/PaddleOCR/ppstructure/table/predict_table.py", line 109, in __call__
pred_html = self.match(structure_res, dt_boxes, rec_res)
File "/scratch/rrs99/PaddleOCR/ppstructure/table/matcher.py", line 65, in __call__
dt_boxes, rec_res = self._filter_ocr_result(pred_bboxes, dt_boxes, rec_res)
File "/scratch/rrs99/PaddleOCR/ppstructure/table/matcher.py", line 194, in _filter_ocr_result
y1 = pred_bboxes[:, 1::2].min()
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
My virtual environment details:
paddleocr 2.7.3
paddlepaddle 2.6.1
cuda/12.2
gcc/12.3
opencv/4.9.0
python/3.10
Can you please help me, resolve this?