Add functionality to store label colors in annotations#23
Conversation
felixdittrich92
left a comment
There was a problem hiding this comment.
We should add/extend also the unittests
Especially for the saving / loading part
| labels = annotations.get("labels", ["" for _ in polygons]) | ||
| types = annotations.get("types", [self.root.type_options[0]] * len(polygons)) | ||
| type_color_mapping = annotations.get("type_color_mapping", {}) | ||
|
|
There was a problem hiding this comment.
self.update_types is not required anymore ?
There was a problem hiding this comment.
no, not required anymore (colors for known types are set in _update_color_palette, gray is used for unknown types)
There was a problem hiding this comment.
Then let's remove this method
|
Have you performed any manual tests ?
|
Yes, I did various manual tests:
|
felixdittrich92
left a comment
There was a problem hiding this comment.
2 small things left then we are good to merge 👍
.github/workflows/builds.yml
Outdated
| python -m pip install --upgrade pip | ||
| pip install -e . --upgrade | ||
| - name: Import package | ||
| # MacOS: use parseq as recognition architecture to avoid the onnxruntime error |
There was a problem hiding this comment.
I think the following would be better: (with a comment)
- name: Set recognition arch for macOS
if: matrix.os == 'macos-latest'
run: echo "RECOGNITION_ARCH=parseq" >> $GITHUB_ENV
e3b2bb1 to
ed7a296
Compare
ed7a296 to
3c9647b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
+ Coverage 87.01% 87.94% +0.92%
==========================================
Files 9 9
Lines 901 929 +28
==========================================
+ Hits 784 817 +33
+ Misses 117 112 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
type_color_mappingto annotations so that the same colors are used for the same classes even across separate labeling sessions