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

fix: Fixed LinkNet target & loss computation #670

Merged
merged 6 commits into from
Dec 2, 2021
Merged

fix: Fixed LinkNet target & loss computation #670

merged 6 commits into from
Dec 2, 2021

Conversation

fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • fixed edge_mask building
  • fixed seg_target for PyTorch (was built as channels last)
  • removes focal_loss option in LinkNet loss computation

Any feedback is welcome!

@fg-mindee fg-mindee added type: bug Something isn't working critical High priority 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 #670 (11167ed) into main (1dad108) will increase coverage by 0.08%.
The diff coverage is 97.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #670      +/-   ##
==========================================
+ Coverage   96.17%   96.26%   +0.08%     
==========================================
  Files         117      117              
  Lines        4472     4467       -5     
==========================================
- Hits         4301     4300       -1     
+ Misses        171      167       -4     
Flag Coverage Δ
unittests 96.26% <97.14%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
doctr/models/detection/linknet/base.py 89.02% <94.44%> (+1.02%) ⬆️
...dels/detection/differentiable_binarization/base.py 91.30% <100.00%> (-0.63%) ⬇️
doctr/models/detection/linknet/pytorch.py 98.03% <100.00%> (+1.77%) ⬆️
doctr/models/detection/linknet/tensorflow.py 100.00% <100.00%> (+3.48%) ⬆️

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 1dad108...11167ed. Read the comment docs.

charlesmindee
charlesmindee previously approved these changes Dec 2, 2021
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, but why do you remove the focal loss ?

@fg-mindee
Copy link
Contributor Author

Thanks, but why do you remove the focal loss ?

It was introducing an asymetry in model API, and we added it because we were having bad performances with LinkNet initially. So I figured, it's better to start again simple, make it work and then if we decide that all segmentation models need it, we'll reintroduce it 👍

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!

@fg-mindee fg-mindee merged commit b452bc3 into main Dec 2, 2021
@fg-mindee fg-mindee deleted the linknet-fix branch December 2, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical High priority 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: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants