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

(WIP) Fix masks for instance segmentation #967

Merged

Conversation

fstroth
Copy link
Contributor

@fstroth fstroth commented Nov 4, 2021

To fix:

  • creation of MaskArrays
  • loading mask_arrays when drawing if not already loaded
  • Fix usage for the COCOMetric

frederik added 8 commits October 31, 2021 22:59
… a 2d array is given. Also made sure that if the mask_array for a record is None but the record has a mask the mask array is loaded in the draw function instead of trying to plot the None value. With this changes the usage of the COCOMetric no longer thorws an error but the value is 0.
@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #967 (147a362) into master (0d441fa) will decrease coverage by 0.32%.
The diff coverage is 61.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #967      +/-   ##
==========================================
- Coverage   85.71%   85.38%   -0.33%     
==========================================
  Files         254      254              
  Lines        5515     5570      +55     
==========================================
+ Hits         4727     4756      +29     
- Misses        788      814      +26     
Flag Coverage Δ
unittests 85.38% <61.66%> (-0.33%) ⬇️

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

Impacted Files Coverage Δ
icevision/parsers/coco_parser.py 100.00% <ø> (ø)
icevision/models/mmdet/lightning/model_adapter.py 67.79% <30.76%> (-29.18%) ⬇️
icevision/visualize/draw_data.py 89.52% <71.42%> (-0.77%) ⬇️
...sion/models/torchvision/lightning/model_adapter.py 94.73% <87.50%> (-5.27%) ⬇️
icevision/core/mask.py 82.87% <100.00%> (+0.23%) ⬆️
icevision/core/record_components.py 81.57% <100.00%> (ø)
icevision/models/checkpoint.py 11.26% <0.00%> (-0.50%) ⬇️

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 f20a938...147a362. Read the comment docs.

frederik added 2 commits November 11, 2021 21:14
…problem was, that the records used for the ground truth did not contain the masks and boxes after the transformations but the ones before. This is now changed in the valid step of the model adapters. Furthermore, I found a bug in the set_masks function for the BaseMasksRecordComponent were the clear functions was not called (the brackets were missing).
@fstroth
Copy link
Contributor Author

fstroth commented Nov 11, 2021

This should complete the PR and it should be ready for merge.

@ai-fast-track ai-fast-track merged commit 921e843 into airctic:master Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants