Fix bugs in mvtec exporter#835
Conversation
There was a problem hiding this comment.
Hi @djdameln,
Thanks for your contribution!
Is it ok if MvtecTask.detection has {0,1} mask? I think your correction should apply to this too.
https://github.com/openvinotoolkit/datumaro/blob/064a31465d6fc5b6d6f9a487d610607755f21ee4/datumaro/plugins/data_formats/mvtec/exporter.py#L88-L95
If MVTec should mandatorily have {0, 255} binary mask rather than {0, 1} one, I think it would be good to add a unit test for this.
|
@vinnamkim Thanks for the suggestion. I added the correction for the detection task type. I also added some unit tests to test this behaviour |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #835 +/- ##
=========================================
Coverage 78.47% 78.48%
=========================================
Files 191 196 +5
Lines 23911 24304 +393
Branches 4912 4946 +34
=========================================
+ Hits 18765 19075 +310
- Misses 4044 4127 +83
Partials 1102 1102
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Summary
This PR fixes two small bugs in the MVTec exporter:
_make_item_filenameas part of the item id. So the final path contained the defect type twice (bottle/test/broken_large/broken_large/000.pnginstead ofbottle/test/broken_large/000.png). This was fixed by not appending the defect type to the subdirectory.How to test
Checklist
developbranchLicense
Feel free to contact the maintainers if that's a concern.