Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed Improvement of Pixel Aggregation #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Zerohertz
Copy link

@Zerohertz Zerohertz commented Mar 9, 2023

Dear Mr. Wang

Processing Time of pan_pp.det_head.get_results() [ms] (Used data: ICDAR2015 [dataset])

  • Original Source: 118.113
  • Improved Pixel Aggregation Source: 112.645

It was confirmed that pixel aggregation (pa.pyx) is dominant during the post-processing process for images with variously distributed strings.
Therefore, I modified the cython code to improve speed and parallel processing.
The result is a 4.629% improvement based on the ic15 dataset, but a huge speedup can be expected if there are numerous labels. (Based on the dataset I used (documents), it's about 100 ms shorter.)

Also modified the input of cv2.resize to solve the error below.

    label = cv2.resize(label, (img_size[1], img_size[0]),
    score = cv2.resize(score, (img_size[1], img_size[0]),
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'resize'
> Overload resolution failed:
>  - Can't parse 'dsize'. Sequence item with index 0 has a wrong type
>  - Can't parse 'dsize'. Sequence item with index 0 has a wrong type

Sincerely, Hyogeun Oh

@Zerohertz Zerohertz changed the title Dev Speed Improvement of Pixel Aggregation Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant