-
Notifications
You must be signed in to change notification settings - Fork 133
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
Raise ImportError on importing malformed COCO directory #812
Raise ImportError on importing malformed COCO directory #812
Conversation
- Previously, COCOImporter implicitly set its rootpath and images_dir unless the directory structure is not well formed. This makes users cannot know what's happening although their dataset structure is malformed. As a result, after importing, users try to load its images but fail and don't know why. Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good for me. I just have one question, you tested some case for wrong structure like # Wrong structure: ./annotations -> ./labels
or # Wrong structure: ./images -> ./imgs
, then do we need to consider those kinds of various wrong structure?
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
In those cases, this PR wants to raise |
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Codecov ReportBase: 77.62% // Head: 77.62% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #812 +/- ##
===========================================
- Coverage 77.62% 77.62% -0.01%
===========================================
Files 184 184
Lines 23554 23563 +9
Branches 4879 4880 +1
===========================================
+ Hits 18284 18290 +6
- Misses 4198 4200 +2
- Partials 1072 1073 +1
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. |
* Add daily/weekly test triggers (#811) * Add daily/weekly checks in schedule * Update for testing * Fix version * Fix version * Fix version * Update ttest configuration * Rename daily to nightly * Apply some feedbacks * Apply some feedbacks * Correct wrong file path. * Raise ImportError on importing malformed COCO directory (#812) * Raise ImportError on importing malformed COCO directory - Previously, COCOImporter implicitly set its rootpath and images_dir unless the directory structure is not well formed. This makes users cannot know what's happening although their dataset structure is malformed. As a result, after importing, users try to load its images but fail and don't know why. Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Update CHANGELOG.md Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix isort Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix unittest Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Image should have 2 or 3 dims Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Upload data explorer model in public storage (#813) * Upload model in public storage * Update model_dir * Make dir * Skip test if macos * Skip unit tests if macos --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: Sooah Lee <sooah.lee@intel.com>
* Update version to release v1.0 early version to PyPI * Dev to 1.0.0 pre-release (#817) * Add daily/weekly test triggers (#811) * Add daily/weekly checks in schedule * Update for testing * Fix version * Fix version * Fix version * Update ttest configuration * Rename daily to nightly * Apply some feedbacks * Apply some feedbacks * Correct wrong file path. * Raise ImportError on importing malformed COCO directory (#812) * Raise ImportError on importing malformed COCO directory - Previously, COCOImporter implicitly set its rootpath and images_dir unless the directory structure is not well formed. This makes users cannot know what's happening although their dataset structure is malformed. As a result, after importing, users try to load its images but fail and don't know why. Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Update CHANGELOG.md Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix isort Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix unittest Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Image should have 2 or 3 dims Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Upload data explorer model in public storage (#813) * Upload model in public storage * Update model_dir * Make dir * Skip test if macos * Skip unit tests if macos --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: Sooah Lee <sooah.lee@intel.com> --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: chuneuny <emily.chun@intel.com> Co-authored-by: Sooah Lee <sooah.lee@intel.com>
* Update version to release v1.0 early version to PyPI * Dev to 1.0.0 pre-release (#817) * Add daily/weekly test triggers (#811) * Add daily/weekly checks in schedule * Update for testing * Fix version * Fix version * Fix version * Update ttest configuration * Rename daily to nightly * Apply some feedbacks * Apply some feedbacks * Correct wrong file path. * Raise ImportError on importing malformed COCO directory (#812) * Raise ImportError on importing malformed COCO directory - Previously, COCOImporter implicitly set its rootpath and images_dir unless the directory structure is not well formed. This makes users cannot know what's happening although their dataset structure is malformed. As a result, after importing, users try to load its images but fail and don't know why. Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Update CHANGELOG.md Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix isort Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix unittest Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Image should have 2 or 3 dims Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Fix testcase Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Upload data explorer model in public storage (#813) * Upload model in public storage * Update model_dir * Make dir * Skip test if macos * Skip unit tests if macos --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: Sooah Lee <sooah.lee@intel.com> * [Release] Fix/update 3rd party txt (#820) * Update 3rd-party.txt Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Convert tab to spaces Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> * Remove the duplicated contexts * Enable doc build on release branch * Update changelog * Apply code review feedbacks * Remove a blank line * Update version.py * Update CHANGELOG.md * Update CHANGELOG.md * Add some description (#832) --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: chuneuny <emily.chun@intel.com> Co-authored-by: Sooah Lee <sooah.lee@intel.com>
Summary
rootpath=""
andimages_dir=""
unless the directory structure is not well formed. This makes users cannot know what's happening although their dataset structure is malformed. As a result, after importing, users try to load its images but fail and don't know why.Image
has correct dimensions: 2 or 3. There have been many test cases which letImage()
not having 3 dimensions. This PR also fixes it.How to test
I added a unit test for it.
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.