✨ Define SemanticSegmentor with the New EngineABC#866
Merged
shaneahmed merged 235 commits intoOct 20, 2025
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev-define-engines-abc #866 +/- ##
==========================================================
+ Coverage 91.33% 94.72% +3.38%
==========================================================
Files 73 73
Lines 9375 9235 -140
Branches 1229 1208 -21
==========================================================
+ Hits 8563 8748 +185
+ Misses 776 452 -324
+ Partials 36 35 -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
measty
requested changes
Sep 19, 2025
Collaborator
measty
left a comment
There was a problem hiding this comment.
I've done an initial review, looks nice overall but I found a few issues that need addressing before it could be merged.
# Conflicts: # tests/models/test_dataset.py
fe21c69 to
3a47fe1
Compare
…entor # Conflicts: # tiatoolbox/models/engine/semantic_segmentor.py
for more information, see https://pre-commit.ci
…c.Callable` into a type-checking block
# Conflicts: # tests/test_utils.py
…nto dev-define-semantic-segmentor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Major Additions
Dask Integration:
daskas a dependency and integrated Dask arrays and lazy computation throughout the engine and patch predictor code.Zarr Output Support:
SemanticSegmentor Engine:
SemanticSegmentorengine with Dask/Zarr support and new test coverage (test_semantic_segmentor.py).semantic_segmentorand removed the oldsemantic_segmentCLI.Enhanced CLI and Config:
Utilities and Validation:
DimensionMismatchError).Changes to
kwargmemory-thresholdnum-loader-workersandnum-postproc-workersintonum-workerscache_modeas cache mode is automatically handled.Major Removals/Refactors
Removed Old CLI and Redundant Code:
semantic_segment.pyCLI and replaced it withsemantic_segmentor.py.Refactored Model and Dataset APIs:
Test Cleanup:
API Consistency:
Notable File Changes
New:
tiatoolbox/cli/semantic_segmentor.pytests/engines/test_semantic_segmentor.pyRemoved:
tiatoolbox/cli/semantic_segment.pyHeavily Modified:
engine_abc.py,patch_predictor.py,semantic_segmentor.pyImpact