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
..
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00
2024-04-21 21:46:20 +08:00