merge master#450
Merged
Merged
Conversation
Signed-off-by: mersad95zd <m.zalbagi@gmail.com>
* bc nonbreaking tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update docstring Signed-off-by: Wenqi Li <wenqil@nvidia.com> * compatible collate Signed-off-by: Wenqi Li <wenqil@nvidia.com> * adds flag Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes min tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * integration Signed-off-by: Wenqi Li <wenqil@nvidia.com> * default to metatensor Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update baesd on comments, refactoring, more tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * debug typing Signed-off-by: Wenqi Li <wenqil@nvidia.com> * debug typing Signed-off-by: Wenqi Li <wenqil@nvidia.com> * debug typing Signed-off-by: Wenqi Li <wenqil@nvidia.com> * simplify, more tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * multisamples cropping Signed-off-by: Wenqi Li <wenqil@nvidia.com> * simplified utilities, docstrings Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * exclude in min Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* Create meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Create test_compute_meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update __init__.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update metrics.rst Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update test_compute_meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update metrics.rst Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update __init__.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update test_compute_meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update metrics.rst Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update test_compute_meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> * Update test_compute_meaniou.py Signed-off-by: Yashika Jain <yashikajain201@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nic Ma <nma@nvidia.com>
* fixes shape fallback Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes #4655 Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* [DLMED] enhance metrics doc with example Signed-off-by: Nic Ma <nma@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fixes pad-collate Signed-off-by: Wenqi Li <wenqil@nvidia.com> * adds tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* blend_images: voxel-wise alpha Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * linting is wrong Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> * fixes Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
* enhance verify metadata and dynunet docstring Signed-off-by: Yiheng Wang <vennw@nvidia.com> * reverse dynunet changes and fix flake8 error Signed-off-by: Yiheng Wang <vennw@nvidia.com> * fix flake8 error Signed-off-by: Yiheng Wang <vennw@nvidia.com>
[DLMED] fix collate issue Signed-off-by: Nic Ma <nma@nvidia.com>
* adds __array_function__ impl. Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update ufunc Signed-off-by: Wenqi Li <wenqil@nvidia.com> * pt1.7 Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes typo Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * more checking Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* mri utils added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils with its unit test added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils updated with monai data converter Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * updated fft_util's docstring Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * apps.rst updated with fft_utils docstrings under the reconstruction module Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils docstring updated by adding dimension hins Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils docstring updated by removing redundant output type Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * test_fft_utils.py moved to the tests folder Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * created fft_utils_t, the torch-only version of fft_utils Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fft_utils_t updated with type ignore for mypy Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * docs/source/networks.rst updated with fft_utils_t Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * manual fix for fft_utils_t output data types Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * initial mri_transforms added under apps/reconstruction Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * with PR1 files to avoid error Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * PR1 included Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * PR1 files finally removed Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * putting test_mri_transforms under apps for now Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * isort fixed Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * ignore this commit, still in progress Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * created utils, array, and dictionary; still a very early-stage commit Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * completing transform arrays and dicts plus mri_utils and the unit tests Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move tests under apps for now Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed docs and tests Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * added unittests for DetailedNormalizeIntensityd and TargetBasedSpatialCropd and fixed unbiased issue of torch.std Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed random seed; added enum keys; corrected docs format; corrected typos Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * rss name corrected Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * minor issues fixed; todos are __init__ and decide upon randomize Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * added __init__ Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed file names Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * added more notes to InputTargetNormalizeIntensity Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * added more clarifications to InputTargetNormalizeIntensityd Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * made ReferenceBasedNormalizeIntensityd and ReferenceBasedSpatialCropd consistent with other monai transforms Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * minor updates to kspace masks Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * new utils added: complex_mul and complex_conj Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * mypy issue with mri_utils unittest resolved Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * a separate PR for mri_utils Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * minor update to enum keys Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * minor docstring fix Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * separated complex utils Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs updated Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * docs updated Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * compelx_utils docstring updated Signed-off-by: mersad95zd <m.zalbagi@gmail.com> Co-authored-by: Can Zhao <69829124+Can-Zhao@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com>
* mri utils added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils with its unit test added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils updated with monai data converter Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * updated fft_util's docstring Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * apps.rst updated with fft_utils docstrings under the reconstruction module Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils docstring updated by adding dimension hins Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fft_utils docstring updated by removing redundant output type Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * test_fft_utils.py moved to the tests folder Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * created fft_utils_t, the torch-only version of fft_utils Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fft_utils_t updated with type ignore for mypy Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * docs/source/networks.rst updated with fft_utils_t Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * manual fix for fft_utils_t output data types Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * initial mri_transforms added under apps/reconstruction Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * with PR1 files to avoid error Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * PR1 included Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * PR1 files finally removed Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * putting test_mri_transforms under apps for now Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * isort fixed Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * ignore this commit, still in progress Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * created utils, array, and dictionary; still a very early-stage commit Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * completing transform arrays and dicts plus mri_utils and the unit tests Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move tests under apps for now Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed docs and tests Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fast-mri-reader initial commit; todo is the unittest Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * unittest added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * remove unncessary packages from the reader Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * manual installation of h5py added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * enum keys added Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * h5py added to requirements-dev.txt Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * optional import of h5py Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed h5py dependency Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed h5py dependency again Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed docstring; fixed import issue Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * added h5py to relevant requirement files; updated fastmri_reader Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docs updated Signed-off-by: mersad95zd <m.zalbagi@gmail.com> * fixed os.path.basename Signed-off-by: mersad95zd <m.zalbagi@gmail.com> Co-authored-by: Can Zhao <69829124+Can-Zhao@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* get/set array Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes flake8 Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update docstrings Signed-off-by: Wenqi Li <wenqil@nvidia.com> * more tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes flake8 Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update according to comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update docstring Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes #4699 Signed-off-by: Wenqi Li <wenqil@nvidia.com>
…support 0.9.1* (#4692) * Fix nuclick transform for meta tensor Signed-off-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com> * Fix deepgrow transform for metatensor Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com>
* fixes swinunetr Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * less changes Signed-off-by: Wenqi Li <wenqil@nvidia.com> * review docs Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* preserve key order Signed-off-by: KumoLiu <yunl@nvidia.com> * fixes integration Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com>
* fixes #4708 Signed-off-by: Wenqi Li <wenqil@nvidia.com> * shallow copy Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update device affine Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update copy Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* update indexing methods Signed-off-by: Wenqi Li <wenqil@nvidia.com> * review attributes Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* using copy() Signed-off-by: Wenqi Li <wenqil@nvidia.com> * simple copy attr Signed-off-by: Wenqi Li <wenqil@nvidia.com> * simple copy Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update util Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update default Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update data converting to have is_batch Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update attr copying Signed-off-by: Wenqi Li <wenqil@nvidia.com> * refactoring Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes typo Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update tests Signed-off-by: Wenqi Li <wenqil@nvidia.com> * remove deepcopy Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update based on comments Signed-off-by: Wenqi Li <wenqil@nvidia.com> * shape different assign Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* fix deepedit/nuclick transforms for metatensor Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com>
[DLMED] add update API for config parser Signed-off-by: Nic Ma <nma@nvidia.com>
* Add TCIA dataset Signed-off-by: Yiheng Wang <vennw@nvidia.com>
* dataset summary for metatensor Signed-off-by: Wenqi Li <wenqil@nvidia.com> * dataset summary support metatensor Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes tests Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* fix metatensor for detection Signed-off-by: Can Zhao <canz@nvidia.com> * fix mypy Signed-off-by: Can Zhao <canz@nvidia.com>
* update detection transforms for metatensor Signed-off-by: Wenqi Li <wenqil@nvidia.com> * fixes mypy Signed-off-by: Wenqi Li <wenqil@nvidia.com> * more tests about applied operations Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* optional final Tanh Signed-off-by: Wenqi Li <wenqil@nvidia.com> * update param name Signed-off-by: Wenqi Li <wenqil@nvidia.com>
* add user warnings in AsChannelFirst and AddChannel Signed-off-by: KumoLiu <yunl@nvidia.com> * change warning to deprecated Signed-off-by: KumoLiu <yunl@nvidia.com> * change since0.9 to 0.8 Signed-off-by: KumoLiu <yunl@nvidia.com> * add use MetaTensor data type Signed-off-by: KumoLiu <yunl@nvidia.com> * fix pep8 Signed-off-by: KumoLiu <yunl@nvidia.com>
* support block type string in resnet, senet Signed-off-by: KumoLiu <yunl@nvidia.com> * fix docstring Signed-off-by: KumoLiu <yunl@nvidia.com> * fix docstring in resnet Signed-off-by: KumoLiu <yunl@nvidia.com> Co-authored-by: Yiheng Wang <68361391+yiheng-wang-nv@users.noreply.github.com>
* [DLMED] add track_meta option Signed-off-by: Nic Ma <nma@nvidia.com>
Fixes DiceCELoss for multichannel targets. Currently if "target" (ground truth label) is provided as a multichannel data (each channel is binary or float), then current DiceCELoss attempts to convert it to 1-channel using argmax (which could be impossible with overlapping labels). There is no need for argmax, since pytorch's cross entropy can handle multi-channel targets already. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com> fixes Project-MONAI/tutorials#982 fixes Project-MONAI/tutorials#984 fixes Project-MONAI/tutorials#987 ### Description robust mask size and grid ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Current command did not work on my machine:
```batch
M:\Dev\MONAI>python -c 'import monai; monai.config.print_config()'
File "<string>", line 1
'import
^
SyntaxError: EOL while scanning string literal
M:\Dev\MONAI>python -c "import monai; monai.config.print_config()"
MONAI version: 1.0.0+39.g9355f1c2
Numpy version: 1.23.4
Pytorch version: 1.12.1+cu113
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: 9355f1c
MONAI __file__: M:\Dev\MONAI\monai\__init__.py
Optional dependencies:
Pytorch Ignite version: NOT INSTALLED or UNKNOWN VERSION.
Nibabel version: NOT INSTALLED or UNKNOWN VERSION.
scikit-image version: NOT INSTALLED or UNKNOWN VERSION.
Pillow version: 9.2.0
Tensorboard version: NOT INSTALLED or UNKNOWN VERSION.
gdown version: NOT INSTALLED or UNKNOWN VERSION.
TorchVision version: 0.13.1+cu113
tqdm version: NOT INSTALLED or UNKNOWN VERSION.
lmdb version: NOT INSTALLED or UNKNOWN VERSION.
psutil version: NOT INSTALLED or UNKNOWN VERSION.
pandas version: NOT INSTALLED or UNKNOWN VERSION.
einops version: NOT INSTALLED or UNKNOWN VERSION.
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: NOT INSTALLED or UNKNOWN VERSION.
pynrrd version: NOT INSTALLED or UNKNOWN VERSION.
For details about installing the optional dependencies, please visit:
https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
M:\Dev\MONAI>
```
This adds improvements to SegResNet semantic segmentation to include deep supervision feature (among other things). I've decided to add a new network named SegResnetDS instead of replacing the existing SegResNet, because it would have broken all previously pretrained model checkpoints. Please take a look, and if it looks good, I can add unit tests. All the helper functions, and blocks are inside of the same file (which I prefer, since it's easier to read) instead of spreading it among other files (e.g segresnet_ds_block or segresnet_utils). ### Description A few sentences describing the changes proposed in this pull request. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…arge images (#5297) SlidingWindowInferer: option to adaptively stitch in cpu memory for large images. This adds an option to provide maximum input image volume (number of elements) to dynamically change stitching to cpu memory (to avoid gpu memory crashes). For example with `cpu_thresh=400*400*400`, all input images with large volume will be stitched on cpu. At the moment, a user must decide beforehand, to stitch ALL images on cpu or gpu (by specifying the 'device' parameter). But in many datasets, only a few large images require device==cpu, and running inference on cpu for ALL will be unnecessary slow. It's related to #4625 #4495 #3497 #4726 #4588 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com>
Fixes MONAI/apps/Auto3DSeg/bundle_gen.py ### Description Commands ran in subprocess currently cause issues with string formatting and backslashes not being escaped properly. Changing from Back Flash to Forward Slash solves the issue. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Maxime <maxime.perret@epfl.ch> Signed-off-by: Mingxin Zheng <mingxinz@nvidia.com> Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Co-authored-by: Maxime <maxime.perret@epfl.ch> Co-authored-by: Mingxin Zheng <mingxin.zheng@philips.com> Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com> Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com
Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5133 ### Description adds a test ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com>
Ref #5264. Follow-up to #5307. This is a more normal, intuitive variant of median filtering. Signed-off-by: Dženan Zukić <dzenan.zukic@kitware.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com>
Fixes Project-MONAI/tutorials#987 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com>
Fixes #5196, #5316. ### Description Add api function that allows FL systems to request summary statistics, i.e. `get_data_stats` in new `ClientStats` class. `MonaiStats` is added to provide implementation based on Monai bundle. Utilizes DataAnalyzer functions from Auto3DSeg. Changes to DataAnalyzer are supposed to not change the behavior. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Holger Roth <hroth@nvidia.com>
Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
part of #5284 fixes incorrect ignite version used https://github.com/Project-MONAI/MONAI/actions/runs/3262265183 fixes autorunner test error: https://github.com/Project-MONAI/MONAI/actions/runs/3255478854/jobs/5347066136 fixes #5343 ### Description tests are fixed by upgrading dep version and moving `test_auto3dseg_autorunner` unit test to `test_integration_autorunner` integration test. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
This adds a DeepSupervisionLoss wrapper class around the main loss
function to accept a list of tensors returned from a deeply supervised
networks. The final loss is computed as the sum of weighted losses for
each of deep supervision levels (accounting for potential differences in
shapes between targets and ds outputs)
The wrapper class is designed to work with arbitrary existing loss,e.g.
```
loss = DiceCELoss(to_onehot_y=True, softmax=True)
ds_loss = DeepSupervisionLoss(loss)
```
Whereas the existing loss accepts the input as a single Tensor, ds_loss
accepts the input as a list of Tensors (for each output of a deeply
supervised network). If only a simple Tensor input is provided, ds_loss
behaves exactly the same as the underlying loss.
I added unit tests too.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
Signed-off-by: myron <amyronenko@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5345 sliding window output should prefer `device` instead of `inputs.device` ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
…n of the linear warmup (#5351) small enhancement to WarmupCosineSchedule input, to optionally specify the beginning of the linear warmup from something above 0 ( e.g from a fraction 0.1 * initial_lr). a unit test is added too. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com>
Signed-off-by: Holger Roth <hroth@nvidia.com> Fixes #5354. ### Description Previous output: ``` Current output: 2022-10-18 12:45:59,679 - MonaiAlgo - INFO - Using multi-gpu training on rank 1 (available devices: 2) 2022-10-18 12:45:59,681 - MonaiAlgo - INFO - Using multi-gpu training on rank 0 (available devices: 2) 2022-10-18 12:49:48,790 - ignite.engine.engine.SupervisedTrainer - INFO - Got new best metric of train_accuracy: 0.802879669048168 2022-10-18 12:49:48,790 - ignite.engine.engine.SupervisedTrainer - INFO - Got new best metric of train_accuracy: 0.802879669048168 2022-10-18 12:49:56,579 - ignite.engine.engine.SupervisedEvaluator - INFO - Got new best metric of val_mean_dice: 0.1470419466495514 2022-10-18 12:49:56,579 - ignite.engine.engine.SupervisedEvaluator - INFO - Got new best metric of val_mean_dice: 0.1470419466495514 ``` Output after fix: ``` 2022-10-18 12:51:05,400 - MonaiAlgo - INFO - Using multi-gpu training on rank 0 (available devices: 2) 2022-10-18 12:51:05,410 - MonaiAlgo - INFO - Using multi-gpu training on rank 1 (available devices: 2) 2022-10-18 12:53:09,889 - ignite.engine.engine.SupervisedTrainer - INFO - Got new best metric of train_accuracy: 0.6750877521656178 2022-10-18 12:53:25,170 - ignite.engine.engine.SupervisedEvaluator - INFO - Got new best metric of val_mean_dice: 0.06980131566524506 ``` ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Holger Roth <hroth@nvidia.com>
A small fix to followup on #5338 to ensure ds_loss returns a constant, not an array ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com>
) This adds a utility function str2list to convert a string to a list. Useful with argparse commandline arguments: ``` parser.add_argument("--blocks", default=[1,2,3], type=str2list) ... python mycode.py --blocks=1,2,2,4 ``` Unit tests added. It also includes a small fix for str2bool to accept input as bool (and return it right away). ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ x Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x]Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com>
Signed-off-by: Holger Roth <hroth@nvidia.com> Fixes #5363. ### Description Update what's new and module description with new Monai FL features. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Holger Roth <hroth@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com> Fixes #5011 . ### Description Currently, the FlexibleUNet structure only supports the efficient-net series as the backbone and it is hard to extend to other network structures. A more extensible and convenient way to add more benchmark or user-defined backbones will make it more flexible. I plan to make it by doing steps below 1. A base backbone/encoder class that defines interfaces like the number of output feature maps, a list of output feature map channels, string names of backbones and so on. 2. A register that can dynamically register backbones to a dict that will be used during the flexible unet initialization. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes #5201 Fixes #5332 ### Description - Remove deprecated meta_dict usage from Auto3DSeg. - Fix affine -> spacing conversion - Update docstring - Change "pixel_percentage" to "foreground_percentage" to unify foreground "pixel"/"voxel" naming ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] In-line docstrings updated. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com>
### Description adding tests for python 3.10 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com> part of #5284 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Fixes #4672 ### Description Adds the Hovernet Loss, which takes the raw predictions from the HoverNet net and produces a Loss Tensor. Hovernet Loss added along with test script that verfies same results as original TIA version of Hovernet loss. Test script also include synthetic image generation (fixed to deterministic behaviour) N.B. Currently does not include a test function for torch script since the test includes code that torchscipt cannot compile - mainly the SobelGradient and associated functions. Need to resolve this. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5381 ### Description - non-breaking changes to rename `compute_meandice` to `compute_dice` - non-breaking changes to rename `compute_meaniou` to `compute_iou` ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
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.
Fixes # .
Description
A few sentences describing the changes proposed in this pull request.
Status
Ready/Work in progress/Hold
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.