mmocr icon indicating copy to clipboard operation
mmocr copied to clipboard

[Bug fix] box points ordering

Open yjmm10 opened this issue 2 years ago • 5 comments

This changes optimize sort_points function, mainly using the Cartesian coordinate system to convert point coordinates to a cartesian coordinate system, and then sort the polar coordinate points

The change also ensures the original command-line usage remains the same.

yjmm10 avatar Jul 26 '22 02:07 yjmm10

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 26 '22 02:07 CLAassistant

Codecov Report

Base: 83.58% // Head: 83.53% // Decreases project coverage by -0.05% :warning:

Coverage data is based on head (f74b898) compared to base (a71889a). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head f74b898 differs from pull request most recent head b532671. Consider uploading reports for the commit b532671 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1205      +/-   ##
==========================================
- Coverage   83.58%   83.53%   -0.06%     
==========================================
  Files         170      170              
  Lines       11377    11365      -12     
  Branches     1696     1694       -2     
==========================================
- Hits         9510     9494      -16     
- Misses       1489     1492       +3     
- Partials      378      379       +1     
Flag Coverage Δ
unittests 83.53% <100.00%> (-0.06%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmocr/utils/box_util.py 88.46% <100.00%> (-1.54%) :arrow_down:
mmocr/models/textrecog/convertors/seg.py 89.04% <0.00%> (-2.74%) :arrow_down:
mmocr/datasets/pipelines/transforms.py 81.14% <0.00%> (-0.32%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 26 '22 02:07 codecov[bot]

Hi, thank you for your contribution. We will review this code as soon as possible. At the same time, could you please sign the CLA shown on this page? So we can accept your contribution once it has been fully reviewed. Besides, since your PR hasn't passed our linting test, please follow the instruction to install pre-commit, which will automatically format your code to meet our code style requirement.

xinke-wang avatar Jul 26 '22 02:07 xinke-wang

  1. I have been signed the CLA
  2. I install pre-commit, and run pre-commit run --all-files, all pass. But when i run pytest tests, appear 66 errors, I doubt this result, maybe i didn't install the requirements of mmocr .

If you have some advice, i will correct it right now.

yjmm10 avatar Jul 27 '22 06:07 yjmm10

  1. Hi, thank you for your cooperation.
  2. The test failed due to a bug caused by mmcv version issue, we are going to fix this soon.
  3. The last thing we need to do before merging this PR is to refine the unit test for sort_points; currently, the test case is quite simple, which is also one of the main reasons that we did not notice the bug in the old version sort_points. Could you help us to add some more complicated test cases here, and let's see if the new version can pass all of those test cases?

xinke-wang avatar Jul 27 '22 08:07 xinke-wang

Dear yjmm10,

First of all, we want to express our gratitude for your significant PR in the MMOCR project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

If you are Chinese or have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. We look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

Thank you again for your contribution❤

Best regards!@yjmm10

yaqi0510 avatar Mar 31 '23 06:03 yaqi0510