-
Notifications
You must be signed in to change notification settings - Fork 102
🆕 Define DeepFeatureExtractor
#963
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?
🆕 Define DeepFeatureExtractor
#963
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev-define-engines-abc #963 +/- ##
==========================================================
+ Coverage 94.72% 94.92% +0.20%
==========================================================
Files 73 75 +2
Lines 9234 9344 +110
Branches 1208 1214 +6
==========================================================
+ Hits 8747 8870 +123
+ Misses 452 439 -13
Partials 35 35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… into dev-define-DeepFeatureExtractor
Results are inconsistent as the model is redefined on a different device.
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.
Pull Request Overview
This PR introduces the DeepFeatureExtractor engine to TIAToolbox, enabling extraction of deep CNN feature representations from whole slide images (WSIs) and image patches for downstream tasks like clustering and visualization.
Key Changes
- New
DeepFeatureExtractorclass extendingSemanticSegmentorfor feature extraction from WSIs and patches - CLI integration with
deep-feature-extractorcommand supporting various configuration options - Comprehensive test suite covering patch-based inference, WSI processing, multi-GPU support, and CLI functionality
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tiatoolbox/models/engine/deep_feature_extractor.py | Core engine implementation with memory-aware caching and Zarr output support |
| tiatoolbox/models/engine/init.py | Registration of new deep_feature_extractor module |
| tiatoolbox/models/init.py | Export of DeepFeatureExtractor class |
| tiatoolbox/cli/deep_feature_extractor.py | CLI interface for the feature extractor with parameter handling |
| tiatoolbox/cli/init.py | Registration of deep_feature_extractor CLI command |
| tiatoolbox/models/engine/semantic_segmentor.py | Fixed docstring to correctly reference SemanticSegmentor instead of PatchPredictor |
| tests/engines/test_feature_extractor.py | Comprehensive tests for patch/WSI inference, multi-GPU, and CLI |
| tests/engines/test_semantic_segmentor.py | Updated test docstring for clarity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Default Memory threshold percentage is 80. | ||
| memory_threshold = kwargs.get("memory_threshold", 80) | ||
| vm = psutil.virtual_memory() | ||
| keys = ["probabilities", "coordinates"] |
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.
| keys = ["probabilities", "coordinates"] | |
| keys = ["features", "coordinates"] |
Using features in inference will require major change in the base class.
🚀 Summary
This PR introduces an updated,
DeepFeatureExtractorengine, to the TIAToolbox framework. It enables extraction of deep CNN features from whole slide images (WSIs) or image patches for downstream tasks such as clustering, visualization, or training other models. The PR also includes a command-line interface (CLI) for this engine, along with comprehensive tests.✨ Key Features
New Engine:
DeepFeatureExtractorCLI Integration
deep-feature-extractorcommand to TIAToolbox CLI.Unit Tests
Codebase Integration
__init__.pyfiles.