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

improve Coco(Captions|Detection) implementation #3417

Merged
merged 3 commits into from
Feb 22, 2021

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Feb 18, 2021

CocoCaptions is a special case of CocoDetection. While CocoDetection returns the complete annotation dictionary, CocoCaptions extracts the captions out of them. Thus, both implementations are functionally identical except for

target = [ann['caption'] for ann in anns]

To make this easier to maintain, this lets CocoCaptions inherit from CocoDetection and only overwrites the annotation loading.

Blocked by #3416 to ensure the same functionality.

@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #3417 (1190b61) into master (2f4efd3) will increase coverage by 0.10%.
The diff coverage is 41.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3417      +/-   ##
==========================================
+ Coverage   75.13%   75.24%   +0.10%     
==========================================
  Files         105      105              
  Lines        9722     9708      -14     
  Branches     1563     1562       -1     
==========================================
  Hits         7305     7305              
+ Misses       1930     1916      -14     
  Partials      487      487              
Impacted Files Coverage Δ
torchvision/datasets/coco.py 46.42% <41.17%> (+15.47%) ⬆️

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 2f4efd3...d7b059b. Read the comment docs.

Copy link
Member

@fmassa fmassa 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 improving this!

@fmassa fmassa merged commit 62e185c into pytorch:master Feb 22, 2021
facebook-github-bot pushed a commit that referenced this pull request Feb 23, 2021
Summary: Co-authored-by: Francisco Massa <fvsmassa@gmail.com>

Reviewed By: NicolasHug

Differential Revision: D26605315

fbshipit-source-id: de287ccc33457722f82d2b4108a82388622ef039
@pmeier pmeier deleted the improve-coco branch February 25, 2021 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants