PaddleOCR/ppocr
Sanjay Rijal 502e1675e4
Error with pyclipper inhomogeneous expanded array (#12108)
* pyclipper inhomogeneous expanded array solved

For some images, `np.array(offset.Execute(distance))` can result in inhomogeneous part of the detection box list, which cannot be casted into numpy array directly.

* corrected box reshape position

- box reshape was mistakenly done at line 145 which is now correctly done at line 92 of `db_postprocess.py`
- if box is empty then continue

* reverted mistakenly changed line 147

- reverted mistakenly changed `box.array(box)` to `np.array(box)`

* expanded array fix for `det_box_type=quad`

* polygons padding

For `--det_box_type = poly`, pad the detected polygon arrays if they have different shapes to ensure even shapes of polygon arrays

* fix codestyle

---------

Co-authored-by: Wang Xin <xinwang614@gmail.com>
2024-05-18 09:19:06 +08:00
..
data table rec code (#11999) 2024-05-16 15:32:24 +08:00
ext_op add pre-commit workflow (#11973) 2024-04-21 21:46:20 +08:00
losses table rec code (#11999) 2024-05-16 15:32:24 +08:00
metrics add pre-commit workflow (#11973) 2024-04-21 21:46:20 +08:00
modeling table rec code (#11999) 2024-05-16 15:32:24 +08:00
optimizer add pre-commit workflow (#11973) 2024-04-21 21:46:20 +08:00
postprocess Error with pyclipper inhomogeneous expanded array (#12108) 2024-05-18 09:19:06 +08:00
utils Burmese Language dict and corpus (#12020) 2024-04-30 15:15:14 +08:00
__init__.py