-
Notifications
You must be signed in to change notification settings - Fork 82
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
🚸 Handle Multidimensional Features
in WSIReader
#742
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
tiatoolbox/utils/transforms.py
Outdated
@@ -42,6 +42,9 @@ def background_composite( | |||
>>> plt.show() | |||
|
|||
""" | |||
if image.size[:, :, 0] >= 4: |
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 fail for RGBA image. I think the best way to handle this is using mode #609
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #742 +/- ##
===========================================
- Coverage 99.91% 99.89% -0.03%
===========================================
Files 69 69
Lines 8525 8530 +5
Branches 1639 1641 +2
===========================================
+ Hits 8518 8521 +3
- Misses 0 1 +1
- Partials 7 8 +1 ☔ View full report in Codecov by Sentry. |
…ore-than-three-channels
Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com>
for more information, see https://pre-commit.ci
…ore-than-three-channels # Conflicts: # tiatoolbox/wsicore/wsireader.py
for more information, see https://pre-commit.ci
…ore-than-three-channels
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ore-than-three-channels
Signed-off-by: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.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.
Thanks @behnazelhaminia
Features
in WSIReader
## TIAToolbox v1.6.0 (2024-12-12) ### Major Updates and Feature Improvements - **Foundation Models Support via `timm` API** (#856, contributed by @GeorgeBatch) - Introduced `TimmBackbone` for running additional PyTorch Image Models. - Tested models include `UNI`, `Prov-GigaPath`, and `H-optimus-0`. - Added an example notebook demonstrating feature extraction with foundation models. - `timm` added as a dependency. - **Performance Enhancements with `torch.compile`** (#716) - Improved performance on newer GPUs using `torch.compile`. - **Multichannel Input Support in `WSIReader`** (#742) - **AnnotationStore Filtering for Patch Extraction** (#822) - **Python 3.12 Support** - **Deprecation of Python 3.8 Support** - **CLI Response Time Improvements** (#795) ### API Changes - **Device Specification Update** (#882) - Replaced `has_gpu` with `device` for specifying GPU or CPU usage, aligning with PyTorch's `Model.to()` functionality. - **Windows Compatibility Enhancement** (#769) - Replaced `POWER` with explicit multiplication. ### Bug Fixes and Other Changes - **TIFFWSIReader Bound Reading Adjustment** (#777) - Fixed `read_bound` to use adjusted bounds. - Reduced code complexity in `WSIReader` (#814). - **Annotation Rendering Fixes** (#813) - Corrected rendering of annotations with holes. - **Non-Tiled TIFF Support in `WSIReader`** (#807, contributed by @GeorgeBatch) - **HoVer-Net Documentation Update** (#751) - Corrected class output information. - **Citation File Fix for `cffconvert`** (#869, contributed by @Alon-Alexander) - **Bokeh Compatibility Updates** - Updated `bokeh_app` for compatibility with `bokeh>=3.5.0`. - Switched from `size` to `radius` for `bokeh>3.4.0` compatibility (#796). - **JSON Extraction Fixes** (#772) - Restructured SQL expression construction for JSON properties with dots in keys. - **VahadaneExtractor Warning** (#871) - Added warning due to changes in `scikit-learn>0.23.0` dictionary learning (#382). - **PatchExtractor Error Message Refinement** (#883) - **Immutable Output Fix in `WSIReader`** (#850) ### Development-Related Changes - **Mypy Checks Added** - Applied to `utils`, `tools`, `data`, `annotation`, and `cli/common`. - **ReadTheDocs PDF Build Deprecation** - **Formatter Update** - Replaced `black` with `ruff-format`. - **Dependency Removal** - Removed `jinja2`. - **Test Environment Update** - Updated to `Ubuntu 24.04`. - **Conda Environment Workflow Update** - Implemented `micromamba` setup. - **Codecov Reporting Fix** (#811) **Full Changelog:** v1.5.1...v1.6.0 --------- Co-authored-by: John Pocock <John-P@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adam Shephard <39619155+adamshephard@users.noreply.github.com> Co-authored-by: Mark Eastwood <20169086+measty@users.noreply.github.com> Co-authored-by: Mostafa Jahanifar <74412979+mostafajahanifar@users.noreply.github.com> Co-authored-by: Simon Graham <20071401+simongraham@users.noreply.github.com> Co-authored-by: Abdol A <u2271662@live.warwick.ac.uk> Co-authored-by: Jiaqi-Lv <60471431+Jiaqi-Lv@users.noreply.github.com> Co-authored-by: Dmitrii Blaginin <blaginin@mbp.lan> Co-authored-by: behnazelhaminia <30952176+behnazelhaminia@users.noreply.github.com> Co-authored-by: George Batchkala <46561186+GeorgeBatch@users.noreply.github.com> Co-authored-by: vqdang <24943262+vqdang@users.noreply.github.com> Co-authored-by: Jiaqi Lv <lvjiaqi9@gmail.com> Co-authored-by: Alon Alexander <alon008@gmail.com>
## TIAToolbox v1.6.0 (2024-12-12) ### Major Updates and Feature Improvements - **Foundation Models Support via `timm` API** (#856, contributed by @GeorgeBatch) - Introduced `TimmBackbone` for running additional PyTorch Image Models. - Tested models include `UNI`, `Prov-GigaPath`, and `H-optimus-0`. - Added an example notebook demonstrating feature extraction with foundation models. - `timm` added as a dependency. - **Performance Enhancements with `torch.compile`** (#716) - Improved performance on newer GPUs using `torch.compile`. - **Multichannel Input Support in `WSIReader`** (#742) - **AnnotationStore Filtering for Patch Extraction** (#822) - **Python 3.12 Support** - **Deprecation of Python 3.8 Support** - **CLI Response Time Improvements** (#795) ### API Changes - **Device Specification Update** (#882) - Replaced `has_gpu` with `device` for specifying GPU or CPU usage, aligning with PyTorch's `Model.to()` functionality. - **Windows Compatibility Enhancement** (#769) - Replaced `POWER` with explicit multiplication. ### Bug Fixes and Other Changes - **TIFFWSIReader Bound Reading Adjustment** (#777) - Fixed `read_bound` to use adjusted bounds. - Reduced code complexity in `WSIReader` (#814). - **Annotation Rendering Fixes** (#813) - Corrected rendering of annotations with holes. - **Non-Tiled TIFF Support in `WSIReader`** (#807, contributed by @GeorgeBatch) - **HoVer-Net Documentation Update** (#751) - Corrected class output information. - **Citation File Fix for `cffconvert`** (#869, contributed by @Alon-Alexander) - **Bokeh Compatibility Updates** - Updated `bokeh_app` for compatibility with `bokeh>=3.5.0`. - Switched from `size` to `radius` for `bokeh>3.4.0` compatibility (#796). - **JSON Extraction Fixes** (#772) - Restructured SQL expression construction for JSON properties with dots in keys. - **VahadaneExtractor Warning** (#871) - Added warning due to changes in `scikit-learn>0.23.0` dictionary learning (#382). - **PatchExtractor Error Message Refinement** (#883) - **Immutable Output Fix in `WSIReader`** (#850) ### Development-Related Changes - **Mypy Checks Added** - Applied to `utils`, `tools`, `data`, `annotation`, and `cli/common`. - **ReadTheDocs PDF Build Deprecation** - **Formatter Update** - Replaced `black` with `ruff-format`. - **Dependency Removal** - Removed `jinja2`. - **Test Environment Update** - Updated to `Ubuntu 24.04`. - **Conda Environment Workflow Update** - Implemented `micromamba` setup. - **Codecov Reporting Fix** (#811) **Full Changelog:** v1.5.1...v1.6.0
VirtualWSIReader
Modes #609 and Issue in patch extraction from images with more than 3 channels #610