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

feat: Implements erosion & dilation in PyTorch & TF #669

Merged
merged 2 commits into from
Dec 2, 2021
Merged

Conversation

fg-mindee
Copy link
Contributor

The use of cv2 for erosion & dilation is limiting for export in ONNX or SavedModel. Following cv2 documentation, this PR introduces the following modifications:

  • adds implementation of erosion & dilation in Pytorch & TensorFlow
  • adds unittests accordingly

This is the first to improve export compatibility and GPU post-processing for text detection models.

Any feedback is welcome!

@fg-mindee fg-mindee added type: enhancement Improvement module: models Related to doctr.models framework: pytorch Related to PyTorch backend framework: tensorflow Related to TensorFlow backend topic: text detection Related to the task of text detection labels Dec 1, 2021
@fg-mindee fg-mindee added this to the 0.5.0 milestone Dec 1, 2021
@fg-mindee fg-mindee self-assigned this Dec 1, 2021
@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #669 (f4ad238) into main (7244d43) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #669      +/-   ##
==========================================
- Coverage   96.15%   96.15%   -0.01%     
==========================================
  Files         114      117       +3     
  Lines        4453     4472      +19     
==========================================
+ Hits         4282     4300      +18     
- Misses        171      172       +1     
Flag Coverage Δ
unittests 96.15% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
doctr/models/detection/_utils/__init__.py 100.00% <100.00%> (ø)
doctr/models/detection/_utils/pytorch.py 100.00% <100.00%> (ø)
doctr/models/detection/_utils/tensorflow.py 100.00% <100.00%> (ø)
...dels/detection/differentiable_binarization/base.py 91.30% <0.00%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7244d43...f4ad238. Read the comment docs.

Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that!

@fg-mindee fg-mindee merged commit 8fb0710 into main Dec 2, 2021
@fg-mindee fg-mindee deleted the detection-pp branch December 2, 2021 09:35
@fg-mindee fg-mindee added ext: tests Related to tests folder type: new feature New feature and removed type: enhancement Improvement labels Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: tests Related to tests folder framework: pytorch Related to PyTorch backend framework: tensorflow Related to TensorFlow backend module: models Related to doctr.models topic: text detection Related to the task of text detection type: new feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants