Skip to content
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

❇️ Add Function to Save Engines Output in the zarr Format #724

Merged
merged 19 commits into from
Oct 26, 2023

Conversation

AbishekRajVG
Copy link
Contributor

@AbishekRajVG AbishekRajVG commented Oct 18, 2023

Updates to the tiatoolbox.utils.misc.py

  • Added functions to save the Tiatoolbox Engine outputs to Zarr and AnnotationStore files.

@AbishekRajVG AbishekRajVG added the dev tools Changes/Updates in Development tools label Oct 18, 2023
@AbishekRajVG AbishekRajVG self-assigned this Oct 18, 2023
Copy link
Collaborator

@measty measty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just left a couple of comments

tiatoolbox/utils/misc.py Show resolved Hide resolved
tiatoolbox/utils/misc.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #724 (277f0ee) into develop (9505af1) will increase coverage by 0.00%.
Report is 1 commits behind head on develop.
The diff coverage is 100.00%.

❗ Current head 277f0ee differs from pull request most recent head 3f9093e. Consider uploading reports for the commit 3f9093e to get more accurate results

@@           Coverage Diff            @@
##           develop     #724   +/-   ##
========================================
  Coverage    99.85%   99.85%           
========================================
  Files           65       65           
  Lines         7492     7506   +14     
  Branches      1459     1460    +1     
========================================
+ Hits          7481     7495   +14     
  Misses           4        4           
  Partials         7        7           
Files Coverage Δ
tiatoolbox/utils/misc.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shaneahmed shaneahmed changed the title Added methods to persist patch predictor outputs to files ❇️ Add Function to Save Engines Output in the zarr Format Oct 19, 2023
@shaneahmed shaneahmed added this to the Release v1.5.0 milestone Oct 19, 2023
@AbishekRajVG
Copy link
Contributor Author

Thanks for your comments @shaneahmed and @measty. I've now updated the code accordingly and pushed my changes.

tests/test_utils.py Outdated Show resolved Hide resolved
@shaneahmed
Copy link
Member

shaneahmed commented Oct 19, 2023

Thanks for your comments @shaneahmed and @measty. I've now updated the code accordingly and pushed my changes.

@AbishekRajVG there is an error for docstring. Please can you address this? you can use ruff check . to test locally before pushing to Git.

@AbishekRajVG
Copy link
Contributor Author

Thanks for your comments @shaneahmed and @measty. I've now updated the code accordingly and pushed my changes.

@AbishekRajVG there is an error for docstring. Please can you address this? you can use ruff check . to test locally before pushing to Git.

Sorry about that, yes ruff check cleared and updates are pushed.

@shaneahmed shaneahmed merged commit f16c232 into develop Oct 26, 2023
1 check passed
@shaneahmed shaneahmed deleted the dev-persist-patchpredictor-output branch October 26, 2023 09:21
@shaneahmed shaneahmed mentioned this pull request Dec 15, 2023
shaneahmed added a commit that referenced this pull request Dec 15, 2023
## 1.5.0 (2023-12-15)

### Major Updates and Feature Improvements

- Adds the bokeh visualization tool. #684
  - The tool allows a user to launch a server on their machine to visualise whole slide images, overlay the results of deep learning algorithms or to select a patch from whole slide image and run TIAToolbox deep learning engines.
  - This tool powers the TIA demos server. For details please see https://tiademos.dcs.warwick.ac.uk/.
- Extends Annotation to Support Init from WKB #639
- Adds `IOConfig` for NuClick in `pretrained_model.yaml` #709
- Adds functions to save the TIAToolbox Engine outputs to Zarr and AnnotationStore files. #724
- Adds Support for QuPath Annotation Imports #721

### Changes to API

- Adds `model.to(device)` and `model.load_model_from_file()` functionality to make it compatible with PyTorch API. #733
- Replaces `pretrained` with `weights` to make the engines compatible with the new PyTorch API. #621
- Adds support for high-level imports for various utility functions and classes such as `WSIReader`, `PatchPredictor` and `imread` #606, #607,
- Adds `tiatoolbox.typing` for type hints. #619
- Fixes incorrect file size saved by `save_tiles`, issue with certain WSIs raised by @TomastpPereira
- TissueMasker transform now returns mask instead of a list. #748
  - Fixes #732

### Bug Fixes and Other Changes

- Fixes `pixman` incompability error on Colab #601
- Removes `shapely.speedups`. The module no longer has any affect in Shapely >=2.0. #622
- Fixes errors in the slidegraph example notebook #608
- Fixes bugs in WSI Registration #645, #670, #693
- Fixes the situation where PatchExtractor.get_coords() can return patch coords which lie fully outside the bounds of a slide. #712
  - Fixes #710
- Fixes #738 raised by @xiachenrui

### Development related changes

- Replaces `flake8` and `isort` with `ruff` #625, #666
- Adds `mypy` checks to `root` and `utils` package. This will be rolled out in phases to other modules. #723
- Adds a module to detect file types using magic number/signatures #616
- Uses `poetry` for version updates instead of `bump2version`. #638
- Removes `setup.cfg` and uses `pyproject.toml` for project configurations.
- Reduces runtime for some unit tests e.g., #627, #630, #631, #629
- Reuses models and datasets in tests on GitHub actions by utilising cache #641, #644
- Set up parallel tests locally #671

**Full Changelog:** v1.4.0...v1.5.0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mostafajahanifar <[email protected]>
Co-authored-by: John Pocock <[email protected]>
Co-authored-by: DavidBAEpstein <[email protected]>
Co-authored-by: David Epstein <[email protected]>
Co-authored-by: Ruqayya Awan <[email protected]>
Co-authored-by: Mark Eastwood <[email protected]>
Co-authored-by: adamshephard <[email protected]>
Co-authored-by: adamshephard <[email protected]>
Co-authored-by: Abdol <[email protected]>
Co-authored-by: Jiaqi-Lv <[email protected]>
Co-authored-by: Abishek <[email protected]>
Co-authored-by: Dmitrii Blaginin <[email protected]>
@shaneahmed shaneahmed mentioned this pull request Dec 15, 2023
shaneahmed added a commit that referenced this pull request Dec 15, 2023
## 1.5.0 (2023-12-15)

### Major Updates and Feature Improvements

- Adds the bokeh visualization tool. #684
  - The tool allows a user to launch a server on their machine to visualise whole slide images, overlay the results of deep learning algorithms or to select a patch from whole slide image and run TIAToolbox deep learning engines.
  - This tool powers the TIA demos server. For details please see https://tiademos.dcs.warwick.ac.uk/.
- Extends Annotation to Support Init from WKB #639
- Adds `IOConfig` for NuClick in `pretrained_model.yaml` #709
- Adds functions to save the TIAToolbox Engine outputs to Zarr and AnnotationStore files. #724
- Adds Support for QuPath Annotation Imports #721

### Changes to API

- Adds `model.to(device)` and `model.load_model_from_file()` functionality to make it compatible with PyTorch API. #733
- Replaces `pretrained` with `weights` to make the engines compatible with the new PyTorch API. #621
- Adds support for high-level imports for various utility functions and classes such as `WSIReader`, `PatchPredictor` and `imread` #606, #607,
- Adds `tiatoolbox.typing` for type hints. #619
- Fixes incorrect file size saved by `save_tiles`, issue with certain WSIs raised by @TomastpPereira
- TissueMasker transform now returns mask instead of a list. #748
  - Fixes #732

### Bug Fixes and Other Changes

- Fixes `pixman` incompability error on Colab #601
- Removes `shapely.speedups`. The module no longer has any affect in Shapely >=2.0. #622
- Fixes errors in the slidegraph example notebook #608
- Fixes bugs in WSI Registration #645, #670, #693
- Fixes the situation where PatchExtractor.get_coords() can return patch coords which lie fully outside the bounds of a slide. #712
  - Fixes #710
- Fixes #738 raised by @xiachenrui

### Development related changes

- Replaces `flake8` and `isort` with `ruff` #625, #666
- Adds `mypy` checks to `root` and `utils` package. This will be rolled out in phases to other modules. #723
- Adds a module to detect file types using magic number/signatures #616
- Uses `poetry` for version updates instead of `bump2version`. #638
- Removes `setup.cfg` and uses `pyproject.toml` for project configurations.
- Reduces runtime for some unit tests e.g., #627, #630, #631, #629
- Reuses models and datasets in tests on GitHub actions by utilising cache #641, #644
- Set up parallel tests locally #671

**Full Changelog:** v1.4.0...v1.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev tools Changes/Updates in Development tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants