-
Notifications
You must be signed in to change notification settings - Fork 89
✨ Define SemanticSegmentor
with the New EngineABC
#866
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
base: dev-define-engines-abc
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-define-engines-abc #866 +/- ##
==========================================================
+ Coverage 91.52% 91.58% +0.06%
==========================================================
Files 73 74 +1
Lines 9061 9143 +82
Branches 1188 1201 +13
==========================================================
+ Hits 8293 8374 +81
Misses 756 756
- Partials 12 13 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
- Use `input_resolutions` instead of resolution to make engines outputs compatible with ioconfig. - Uses input resolution as a list of dictionaries on units and resolution.
- Use `input_resolutions` instead of resolution to make engines outputs compatible with ioconfig. - Uses input resolution as a list of dictionaries on units and resolution.
…mentor # Conflicts: # tests/engines/test_engine_abc.py # tests/engines/test_patch_predictor.py # tiatoolbox/models/engine/engine_abc.py # tiatoolbox/models/engine/io_config.py # tiatoolbox/models/engine/patch_predictor.py
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…nto dev-define-semantic-segmentor
) | ||
for layer_ in contours: | ||
coords = layer_.squeeze() | ||
count += 1 |
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.
I believe this method treats all contours as outer contours, including those that are actually holes. So it may accidentally draw holes as normal filled polygons unless further post-processing is added to distinguish parent and child contours.
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.
This will especially be a problem for semantic segmentation.
patch_output: dict | zarr.group, | ||
scale_factor: tuple[float, float], | ||
class_dict: dict | None = None, | ||
save_path: Path | None = None, | ||
) -> AnnotationStore | Path: | ||
"""Converts (and optionally saves) output of TIAToolbox engines as AnnotationStore. | ||
"""Converts output of TIAToolbox PatchPredictor engines to AnnotationStore. |
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.
engine not engines
|
||
Args: | ||
images (list, ndarray): | ||
List of inputs to process. when using `patch` mode, the |
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.
Capitalise when
@@ -572,6 +573,10 @@ class PatchDataset(PatchDatasetABC): | |||
labels (list): | |||
List of labels for sample at the same index in `inputs`. | |||
Default is `None`. | |||
patch_input_shape (tuple): | |||
Size of patches input to the model. Patches are at |
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.
Can the text be pushed one tab back to line up with labels?
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.
Some minor comments
SemanticSegmentor
with the NewEngineABC