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 PyTorch tensor cropping and extended script support #458

Merged
merged 9 commits into from
Sep 6, 2021

Conversation

fg-mindee
Copy link
Contributor

@fg-mindee fg-mindee commented Sep 3, 2021

As per #428, this PR introduces the following modifications:

  • added option to correctly crop images that are channels_first
  • updated predictors accordingly
  • added support of PyTorch in the evaluation script
  • added support of PyTorch in the analysis script
  • added CI job to check Pytorch evaluation
  • added metric formatter when a metric is undefined
  • fixed predictor call when some crops have a size of 0

Resolves #428

Any feedback is welcome!

@fg-mindee fg-mindee added critical High priority topic: ci Related to CI module: models Related to doctr.models ext: scripts Related to scripts folder framework: pytorch Related to PyTorch backend labels Sep 3, 2021
@fg-mindee fg-mindee added this to the 0.4.0 milestone Sep 3, 2021
@fg-mindee fg-mindee self-assigned this Sep 3, 2021
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #458 (c74093d) into main (3e7e9de) will decrease coverage by 0.06%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
- Coverage   95.86%   95.79%   -0.07%     
==========================================
  Files          96       96              
  Lines        4013     4023      +10     
==========================================
+ Hits         3847     3854       +7     
- Misses        166      169       +3     
Flag Coverage Δ
unittests 95.79% <84.21%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
doctr/models/_utils.py 91.46% <71.42%> (-1.04%) ⬇️
doctr/models/core.py 93.84% <91.66%> (-0.42%) ⬇️
...dels/detection/differentiable_binarization/base.py 91.35% <0.00%> (-0.62%) ⬇️

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 3e7e9de...c74093d. Read the comment docs.

@fg-mindee fg-mindee changed the title fix: Fixed PyTorch tensor cropping and added support for evaluation script fix: Fixed PyTorch tensor cropping and added support for evaluation & analysis script Sep 3, 2021
@fg-mindee fg-mindee changed the title fix: Fixed PyTorch tensor cropping and added support for evaluation & analysis script fix: Fixed PyTorch tensor cropping and extended script support Sep 3, 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!

@fg-mindee fg-mindee merged commit ad74838 into main Sep 6, 2021
@fg-mindee fg-mindee deleted the torch-eval branch September 6, 2021 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical High priority ext: scripts Related to scripts folder framework: pytorch Related to PyTorch backend module: models Related to doctr.models topic: ci Related to CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[scripts] Add a PyTorch analysis & evaluation script
2 participants