sort by:
Revision Author Date Message Commit Date
a2ec375 Merge remote-tracking branch 'upstream/dev' into releasing/1.1 Signed-off-by: Wenqi Li <wenqil@nvidia.com> 19 December 2022, 16:49:16 UTC
b159ce7 5770 add remove prefix to monai.bundle.load (#5771) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5770 . ### Description This PR enables the `remove_prefix` arg in `monai.bundle.load` ### 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: Yiheng Wang <vennw@nvidia.com> 19 December 2022, 14:28:54 UTC
8037fcd [Auto3DSeg] Update ALGO_BASH for support num_worker and test cases to reflect unification of epoch-based training (#5763) Signed-off-by: dongy <dongy@nvidia.com> ### Description - Update ALGO_HASH to support `num_workers` override - Update test cases. ### 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`. Signed-off-by: dongy <dongy@nvidia.com> Co-authored-by: dongy <dongy@nvidia.com> Co-authored-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> 19 December 2022, 09:53:38 UTC
a068209 update figures (#5760) Signed-off-by: Wenqi Li <wenqil@nvidia.com> part of #5626 ### 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> 18 December 2022, 11:01:24 UTC
67d84d3 add ngc download bundle (#5710) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5679 and #5320 ### Description This PR adds the support of download bundles from ngc: https://catalog.ngc.nvidia.com/models?filters=&orderBy=scoreDESC&query=monai In addition, when "version" is not provided, it changes to download the latest version in default. ### 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: Yiheng Wang <vennw@nvidia.com> 17 December 2022, 14:19:24 UTC
0abd04e testing with torch 1.13.1 (#5758) Signed-off-by: Wenqi Li <wenqil@nvidia.com> ### 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> 16 December 2022, 12:06:31 UTC
e2434fd 5626 adds what's new in 1.1 (#5739) Signed-off-by: Wenqi Li <wenqil@nvidia.com> part of #5626 ### 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> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 15 December 2022, 22:48:38 UTC
d865264 Merge remote-tracking branch 'upstream/main' into releasing/1.1 Signed-off-by: Wenqi Li <wenqil@nvidia.com> 15 December 2022, 18:41:10 UTC
fb3d9f1 Width and height swapped when creating test image in data/synthetic/create_test_image_2d (#5627) Signed-off-by: OeslleLucena <oeslle.lucena@gmail.com> Fixes https://github.com/Project-MONAI/MONAI/issues/5373. ### Description Change the `synthetic.py` script to have the (height, width, depth) format. Edit all the tests that uses `create_test_image_3d` to match the new format. ### 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: OeslleLucena <oeslle.lucena@gmail.com> 15 December 2022, 18:38:23 UTC
e50fa88 Add multi-thread unittest for mlflow handler (#5755) Signed-off-by: binliu <binliu@nvidia.com> ### Description Add a multi-thread unit test for mlflow handler. ### 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> 15 December 2022, 17:31:33 UTC
35db359 Add warning in `GenerateSuccinctContour` (#5752) Signed-off-by: KumoLiu <yunl@nvidia.com> Fixes #5714. ### Description Add warning in `GenerateSuccinctContour` and skip invalid instance. ### 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: KumoLiu <yunl@nvidia.com> 15 December 2022, 15:22:23 UTC
5f6cb2d adds release note v1.1 (#5693) Signed-off-by: Wenqi Li <wenqil@nvidia.com> part of #5626 changelog updates ### 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> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> 15 December 2022, 14:07:36 UTC
e989dc7 Enable auto3dseg maximize gpu utils (#5733) ### Description Enable auto3dseg maximize gpu utilization based on gpus in higher API levels. ### 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: Dong Yang <dongy@dongy-mlt.client.nvidia.com> Signed-off-by: dongy <dongy@nvidia.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Dong Yang <dongy@dongy-mlt.client.nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dongy <dongy@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> 15 December 2022, 12:15:58 UTC
9784506 Support MLFlow Handler for single process/multi task enviornment (#5728) Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Current MLFlow Handler fails when you invoke 2 train requests back to back with different URI. Or multiple train requests within the same process. This is mainly for using global array where it saves active experiment, active run and others share the same. This will cause conflicts between 2 invokes with 2 different URI. Fixes ------ - Use MLFlow Client to create experiment/runs instead of global functions. - Save the current run through the lifecycle of handler. If any handler has the same experiment name and same run name, the metrics all will be merged as part of the same run (e.g. train and validation handler). - If the run name is not provided (fall back on default) then last active run within the same experiment (sorted based on start time) is used for adding the metrics. The above two conditions will help create similar behavior compared to using `mlflow.active_run()` Verified --------- - Running single and multi gpu training on bundles - spleen_ct_segmentation_v0.1.0 - spleen_deepedit_annotation_v0.1.0 - swin_unetr_btcv_segmentation_v0.1.0 - Running Training workflows for both single and multi gpu in MONAI Label - Verified against running shared/single tracking URI (where all the experiments get saved) - Verified against individual eval/mlruns per bundle/workflow > I suggest, original owner of this handler to verify/test all the behaviors that were currently supported. Error Description --------- Error stack when you run two train workflows with in the same process (simply one after another). ``` [2022-12-13 21:08:11,095] [4047823] [MainThread] [ERROR] (uvicorn.error:369) - Exception in ASGI application Traceback (most recent call last): File "/localhome/sachi/.local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi result = await app(self.scope, self.receive, self.send) File "/localhome/sachi/.local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/fastapi/applications.py", line 199, in __call__ await super().__call__(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 78, in __call__ await self.app(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in __call__ raise exc from None File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/routing.py", line 580, in __call__ await route.handle(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/routing.py", line 241, in handle await self.app(scope, receive, send) File "/localhome/sachi/.local/lib/python3.10/site-packages/starlette/routing.py", line 52, in app response = await func(request) File "/localhome/sachi/.local/lib/python3.10/site-packages/fastapi/routing.py", line 219, in app raw_response = await run_endpoint_function( File "/localhome/sachi/.local/lib/python3.10/site-packages/fastapi/routing.py", line 152, in run_endpoint_function return await dependant.call(**values) File "/localhome/sachi/Projects/monailabel/monailabel/endpoints/train.py", line 96, in api_run_model return run_model(model, params, run_sync, enqueue) File "/localhome/sachi/Projects/monailabel/monailabel/endpoints/train.py", line 55, in run_model res, detail = AsyncTask.run("train", request=request, params=params, force_sync=run_sync, enqueue=enqueue) File "/localhome/sachi/Projects/monailabel/monailabel/utils/async_tasks/task.py", line 43, in run return instance.train(request), None File "/localhome/sachi/Projects/monailabel/monailabel/interfaces/app.py", line 422, in train result = task(request, self.datastore()) File "/localhome/sachi/Projects/monailabel/monailabel/tasks/train/basic_train.py", line 458, in __call__ res = self.train(0, world_size, req, datalist) File "/localhome/sachi/Projects/monailabel/monailabel/tasks/train/basic_train.py", line 545, in train context.trainer.run() File "/localhome/sachi/Projects/MONAI/monai/engines/trainer.py", line 53, in run super().run() File "/localhome/sachi/Projects/MONAI/monai/engines/workflow.py", line 281, in run super().run(data=self.data_loader, max_epochs=self.state.max_epochs) File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 892, in run return self._internal_run() File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 935, in _internal_run return next(self._internal_run_generator) File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 993, in _internal_run_as_gen self._handle_exception(e) File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 636, in _handle_exception self._fire_event(Events.EXCEPTION_RAISED, e) File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 425, in _fire_event func(*first, *(event_args + others), **kwargs) File "/localhome/sachi/Projects/MONAI/monai/handlers/stats_handler.py", line 181, in exception_raised raise e File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 946, in _internal_run_as_gen self._fire_event(Events.STARTED) File "/localhome/sachi/.local/lib/python3.10/site-packages/ignite/engine/engine.py", line 425, in _fire_event func(*first, *(event_args + others), **kwargs) File "/localhome/sachi/Projects/MONAI/monai/handlers/mlflow_handler.py", line 183, in start self._delete_exist_param_in_dict(attrs) File "/localhome/sachi/Projects/MONAI/monai/handlers/mlflow_handler.py", line 141, in _delete_exist_param_in_dict log_data = self.client.get_run(cur_run.info.run_id).data File "/localhome/sachi/.local/lib/python3.10/site-packages/mlflow/tracking/client.py", line 150, in get_run return self._tracking_client.get_run(run_id) File "/localhome/sachi/.local/lib/python3.10/site-packages/mlflow/tracking/_tracking_service/client.py", line 72, in get_run return self.store.get_run(run_id) File "/localhome/sachi/.local/lib/python3.10/site-packages/mlflow/store/tracking/file_store.py", line 623, in get_run run_info = self._get_run_info(run_id) File "/localhome/sachi/.local/lib/python3.10/site-packages/mlflow/store/tracking/file_store.py", line 646, in _get_run_info raise MlflowException( mlflow.exceptions.MlflowException: Run '1765aea084a3417586d052d9d8240039' not found FAILED [ 72%] ``` ### 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: Sachidanand Alle <sachidanand.alle@gmail.com> 15 December 2022, 11:11:03 UTC
b2359b7 Fix bug in `GenerateInstanceBorder` (#5751) Signed-off-by: KumoLiu <yunl@nvidia.com> Fixes #5750. ### Description Change dim in Sobel gradient which have been discussed in https://github.com/Project-MONAI/MONAI/pull/5503. ### 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: KumoLiu <yunl@nvidia.com> 15 December 2022, 08:33:38 UTC
c10cdd2 Change default dtype value in `Watershed` and `GenerateWatershedMarkers` (#5732) Fixes #. ### Description - When the image is large, the number of instances may exceed np.uint8, so the default dtype should set to `np.int64` - a workaround way to add `FillHoles` before `generate_instance_contour`, may prevent the issue when instances contain hole ### 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: KumoLiu <yunl@nvidia.com> 14 December 2022, 15:38:20 UTC
ae89327 Revert "Add ValueError in `GenerateSuccinctContour` (#5719)" (#5737) This reverts commit 2b160b3db3ee2942a28ff3a5628879c3fe46d7c8. Fixes https://github.com/Project-MONAI/MONAI/pull/5719#issuecomment-1349697908 ### 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. 14 December 2022, 13:07:37 UTC
469b146 Remove hard-coded sigmoid for voting ensemble method in Auto3DSeg (#5734) Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes item 3 and 5 in #5564. ### Description The `vote` method in `ensemble_pred` currently does not work for under sigmoid mode, because the function overrides the argument to False before the `VoteEnsemble`. Also, if the user only trains a small number of algorithm (1 fold for 1 algo) and forgets the update the `n_best` (default is 5) in `AlgoEnsembleBestN` , instead of throwing an error, the fix will automatically use all available algos after posting a warning. ### 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] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> 14 December 2022, 11:47:16 UTC
a09d2a2 5717 Enhance hovernet to use standard resnet50's weights (#5688) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5717 . ### Description This PR adds the support to load torchvision's resnet50 weights. ### 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: Yiheng Wang <vennw@nvidia.com> 14 December 2022, 10:00:03 UTC
f170e0f Fix typos: argments and theashold (#5727) ### Description Fix typos: - argments -> arguments - theashold -> threshold ### 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). Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> 13 December 2022, 23:07:06 UTC
5200cc6 fixes discussion #5678 suppress_invalid_tags (#5721) Signed-off-by: Wenqi Li <wenqil@nvidia.com> fixes #5678 fixes #5724 fixes #5725 according to https://pydicom.github.io/pydicom/stable/reference/generated/pydicom.dataset.Dataset.html#pydicom.dataset.Dataset.to_json_dict ### 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> 13 December 2022, 16:58:19 UTC
ff12159 change the default ensemble method to AlgoEnsembleBestByFold in AutoR… (#5722) Change the default ensemble method Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes Item 2 in #5564 . ### 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). - [x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> 13 December 2022, 15:36:27 UTC
2b160b3 Add ValueError in `GenerateSuccinctContour` (#5719) Signed-off-by: KumoLiu <yunl@nvidia.com> Fixes #5714. ### Description Add ValueError when an invalid contour is generated. ### 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: KumoLiu <yunl@nvidia.com> 13 December 2022, 13:24:05 UTC
75e02ba 5712 update padding for torch 1.9 (#5718) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5712 ### Description ```py >>> import torch >>> img_t = torch.zeros(1, 1, 24, 24, 24); out = torch.nn.functional.pad(img_t[None], (20, 20, 20, 20, 20, 20), mode='reflect') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 4189, in _pad raise NotImplementedError("Only 3D, 4D, 5D padding with non-constant padding are supported for now") NotImplementedError: Only 3D, 4D, 5D padding with non-constant padding are supported for now ``` ### 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> Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com> 13 December 2022, 12:04:30 UTC
a604c15 Add `SobelGradientsD` to __all__ (#5713) ### Description "SobelGradientsD", "SobelGradientsDict", "SobelGradientsd" were missed `__all__`. This PR fixes it. ### 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). Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> 13 December 2022, 10:03:55 UTC
d0d720d auto updates (#5709) Signed-off-by: monai-bot <monai.miccai2019@gmail.com> this also fixes #5707 Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 12 December 2022, 19:31:00 UTC
7a38c3b Fix min max function error in `safe_dtype_range` (#5706) Fixes #5705. ### Description fix min max function error in `safe_dtype_range` add `safe` flag in `ShiftIntensity` ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 12 December 2022, 12:00:19 UTC
c489de0 Mypy check untyped functions (#5673) Fixes #5657. ### Description Enable config to also type check untyped functions (not in tests). - Type annotations were added - Explicit casts were added - Variable redefinitions with other types were refactored - If no other option was available (or it would be overly verbose) `# type: ignore` was added ### 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`. - [ ] 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: Felix Schnabel <f.schnabel@tum.de> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 12 December 2022, 09:27:04 UTC
4f584a9 Reduce Auto3DSeg tests memory footprint and running time (#5689) Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes #5604 also fixes #5697 by https://github.com/Project-MONAI/MONAI/pull/5689/commits/5b1865ecaaf56ac33bdf739da844e7478a7b10df ### Description - Update the Auto3DSeg templates - SwinUNETR optionally uses pretrain weights - Fix bug when multiple GPUs are used in a tiny datasets, `step_size` will be zero. - Change image size in the test dataset from (64, 64, 64) to (24, 24, 24) - Change `num_epochs` from 2 to 1 - Remove an unnecessary unit test in test_auto3dseg_hpo (check the algorithm can run in another folder, which is not very useful and may bring bugs in the future). ### 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] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 09 December 2022, 11:04:51 UTC
af44576 Resolves non-gradient bug of SSIM Loss (#5686) Fixes #5668 . ### Description The SSIM loss wasn't feeding into autograd - it wasn't allowing gradient to be calculated. Now they can be calculated. As per my previous PR (#5550), the loss function is now calculated using the SSIMMetric (and not the other way around). The SSIMMetric in inheriting from class `IterationMetric` that runs `.detach()` on all inputs before running `._compute_tensor()`. https://github.com/Project-MONAI/MONAI/blob/0737a33d62ce1e18023712a000828235b7758536/monai/metrics/metric.py#L70 I'm now calling the `SSIMMetric()._compute_tensor()` explicitly, removing the step where it detaches from the current graph. **To Reproduce** ``` import torch from monai.losses.ssim_loss import SSIMLoss x = torch.ones([1,1,10,10])/2 y = torch.ones([1,1,10,10])/2 y.requires_grad_(True) data_range = x.max().unsqueeze(0) loss = SSIMLoss(spatial_dims=2)(x,y,data_range) print(loss.requires_grad) ``` **Expected behavior** `loss.requires_grad` will now be True. ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). Signed-off-by: PedroFerreiradaCosta <pedro.hpf.costa@gmail.com> 09 December 2022, 08:36:25 UTC
25130db replace view with reshape for robustness (#5690) https://github.com/Project-MONAI/MONAI/issues/5684#issue-1484170877 Signed-off-by: Joeycho <joeyadamcho@gmail.com> Fixes #5684 ### 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: Joeycho <joeyadamcho@gmail.com> 08 December 2022, 16:22:06 UTC
78d4f42 5648 track bundle config in MLFlow (#5666) Fixes #5648 . ### Description This PR added support to track the executed bundle config in the MLFlow, also fixed https://github.com/Project-MONAI/MONAI/issues/4057#issuecomment-1342618517. ### 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: Nic Ma <nma@nvidia.com> 08 December 2022, 13:07:56 UTC
0737a33 Add `safe_dtype_convert` (#5620) Fixes #5621 . ### Description As stated in the [issue](https://github.com/Project-MONAI/MONAI/issues/5621), a warning is currently added to remind the user of the intensity overflow. Add `safe_dtype_convert` Add `safe` flag in `convert_data_type`, `convert_to_tensor`, `convert_to_numpy`, `convert_to_cupy` ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 08 December 2022, 12:15:45 UTC
b533a53 Add dryrun mode for AutoRunner HPO to fix 5568 (#5681) Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes #5568 . ### Description - Add the "dryrun" mode for HPO NNI so that users and our test systems can skip starting the NNI server. - Take the NNI instruction printing out from the init function of the class. ### 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 `python tests/test_integration_autorunner.py`. - [x] In-line docstrings updated. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> 08 December 2022, 10:04:21 UTC
a05c202 5593 Raise error when GPU number is even greater than the dataset length (#5680) Fixes #5593 . ### Description This PR added error check in `DistributedSampler` for the case that GPU number is greater than the dataset length and `unevenly divisible`. ### 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: Nic Ma <nma@nvidia.com> 08 December 2022, 08:17:11 UTC
3873d23 Make RandTorchVisiond and RandCuCIMd Consistent (#5569) ### Description Both RandTorchVisiond and RandCuCIMd are dealing with the third-party libraries and they should have the same API, especially on using `apply_prob` instead of `prob` since it is different than the `prob` of the underlying randomized tranform. Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 07 December 2022, 20:19:19 UTC
75dffd7 Fixing std type issue for RandRicianNoise when the argument relative is True (#5674) (#5675) Using .item() to get the value in the tensor that is returned by .std(). This should fix the issue where the type of the std calculation is not an int or float. Signed-off-by: Nishant Panchal <68797723+Nishantppanchal@users.noreply.github.com> Fixes #5674 . ### Description When we use .std() on a tensor, a tensor with the standard deviation inside is returned. To get this standard deviation, we also have to use .item(). However, this was not done, so I fixed it. ### 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] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. Signed-off-by: Nishant Panchal <68797723+Nishantppanchal@users.noreply.github.com> 07 December 2022, 16:55:06 UTC
7bebb6b 5671 make `verify_net_in_out` support float16 input (#5672) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5671 . ### Description This PR is used to let `verify_net_in_out` function in `monai.bundle` to support float16 input. ### 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. - [ ] 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: Yiheng Wang <vennw@nvidia.com> 07 December 2022, 14:16:00 UTC
6fa4bce fix 5665 (#5667) Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes #5665 . ### 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 `python /workspace/monai/monai-in-dev/tests/test_integration_autorunner.py`. - [x] In-line docstrings updated. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> 06 December 2022, 21:17:13 UTC
9dc3690 Update Fastmri reader for inference and add support of Tensor for switch_endianness (#5548) Fixes #5552 . ### Description A few sentences describing the changes proposed in this pull request. Update Fastmri reader for inference ### 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: Can Zhao <canz@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 06 December 2022, 19:22:29 UTC
d5344a5 Add conda badge to readme (#5661) Add conda badge to readme Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 06 December 2022, 15:03:07 UTC
cbf65e3 import cv2 inside class (#5659) The line `optional_import("cv2")` causes the security light of my macOS to light up in green, even for the lowest level command e.g., `import monai`. I was worried I had a virus until I realised what was causing it! To avoid worrying other users, I suggest we only import when a user is using the `VideoDataset`. ### 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). Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.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> 06 December 2022, 12:18:45 UTC
e457a5a 5649 auto close mlflow run (#5656) Fixes #5649 . ### Description Add the `auto_close` parameter to mlflow_handler so that it can close the mlflow run according to given value. Update the default handler parameter, so that trainer and evaluator could have `True` value on `auto_close`. ### 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> 06 December 2022, 11:17:35 UTC
90f1893 test vis gradcam for binary classification task (#5654) Follow up of issue #5530 #5528 and (closed) PR #5547 ### Description Add test case for a binary classification task in `test_vis_gradcam` ### 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] In-line docstrings updated. Signed-off-by: Geevarghese George <thatgeeman@users.noreply.github.com> 05 December 2022, 23:42:37 UTC
6092da9 Less verbose meta tensor print (#5658) ### Description We've had feedback that with MetaTensors, `x.__repr__` is overly verbose. This is used frequently when debugging with an IDE for example. The problem is accentuated with e.g., `x.max()`. Here, a single value is hidden by over 50 lines of text. Example: ```python import monai.transforms as mt loader = mt.LoadImage(image_only=True) x = loader(x) print(x.max().__repr__()) ``` <details> <summary>Output</summary> ``` tensor(2906.1714) Metadata sizeof_hdr: 348 extents: 0 session_error: 0 dim_info: 0 dim: [ 3 161 338 61 1 1 1 1] intent_p1: 0.0 intent_p2: 0.0 intent_p3: 0.0 intent_code: 0 datatype: 16 bitpix: 32 slice_start: 0 pixdim: [1. 1. 1. 2.000296 0. 0. 0. 0. ] vox_offset: 0.0 scl_slope: nan scl_inter: nan slice_end: 0 slice_code: 0 xyzt_units: 2 cal_max: 0.0 cal_min: 0.0 slice_duration: 0.0 toffset: 0.0 glmax: 0 glmin: 0 qform_code: 1 sform_code: 0 quatern_b: -0.4889228641986847 quatern_c: 0.5108369588851929 quatern_d: -0.4703003466129303 qoffset_x: -77.69402313232422 qoffset_y: 218.0015411376953 qoffset_z: -808.5780029296875 srow_x: [0. 0. 0. 0.] srow_y: [0. 0. 0. 0.] srow_z: [0. 0. 0. 0.] affine: tensor([[ 3.5726e-02, -2.8526e-03, 1.9990e+00, -7.7694e+01], [-9.9619e-01, 7.9544e-02, 7.1691e-02, 2.1800e+02], [-7.9595e-02, -9.9683e-01, 1.3722e-07, -8.0858e+02], [ 0.0000e+00, 0.0000e+00, 0.0000e+00, 1.0000e+00]], dtype=torch.float64) original_affine: [[ 3.57263708e-02 -2.85262855e-03 1.99901100e+00 -7.76940231e+01] [-9.96186848e-01 7.95440337e-02 7.16907652e-02 2.18001541e+02] [-7.95951681e-02 -9.96827272e-01 1.37223043e-07 -8.08578003e+02] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] as_closest_canonical: False spatial_shape: [161 338 61] space: RAS original_channel_dim: no_channel filename_or_obj: /Users/rich/Downloads/sub-verse004_ct.nii.gz Applied operations [] Is batch?: False ``` </details> I'm proposing that the `__repr__` and `__str__` match that of `torch.Tensor`. If users want meta data they can use `x.print_verbose()` or `print(x.meta)`. ### 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). - [x] New tests added to cover the changes. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> 05 December 2022, 22:04:11 UTC
16b13a4 Refactor HoVerNet post-processing (#5618) Fixes #5616 Fixes #5617 ### 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] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> 05 December 2022, 20:54:23 UTC
aef2ecc AutoRunner enhancements: local folder and algorithm subsets (#5623) AutoRunner class improvements - adds auto-runner option **templates_path_or_url** to optionally accept a local templates folder location. The default (None) is the same: to download the release zip e.g. AutoRunner(templates_path_or_url='/my/local/algorithm_templates') - enhances **algos** input option to define a subset of algorithm names to run (e.g. AutoRunner(algos=['segresnet','dints']) ### 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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: myron <amyronenko@nvidia.com> 05 December 2022, 18:55:40 UTC
f380cf2 Fix missing type annotations (#5655) Fixes #5605. ### Description Fix missing type annotations so `./runtests.sh --mypy` now finds 0 warnings. ### 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: Felix Schnabel <f.schnabel@tum.de> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 05 December 2022, 17:33:32 UTC
e8c6247 5637 remove mmar tests (#5638) Signed-off-by: Wenqi Li <wenqil@nvidia.com> part of #5637 ### 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> 05 December 2022, 10:44:20 UTC
7614aca auto updates (#5646) Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 05 December 2022, 08:53:14 UTC
00a6434 enhance supported format check (#5634) (#5640) Signed-off-by: function2 <function2-llx@outlook.com> Fixes #5634. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] 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). - [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: function2 <function2-llx@outlook.com> 03 December 2022, 17:04:10 UTC
025c107 revise cachedataset runtime_cache modes (#5630) Fixes #5613 ### Description - `runtime_cache=False`: the default v1.0.1 behaviour - `runtime_cache=True` or `"thread"`: single process, for caching cuda tensors - `runtime_cache="process"`: single process workflow + multiprocess dataloader - `runtime_cache=` user-provided object, could be used to pass a container shared among processes I feel in this way the user can determine what to use instead of guessing and providing an automated solution... let me know what you think @myron @Nic-Ma, I'm fine if this is eventually merged or not merged ### 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> 02 December 2022, 18:50:28 UTC
7b41e2e 5385-enhance-mlflow-handler (#5388) Signed-off-by: binliu <binliu@nvidia.com> Fixes #5385 . ### Description This PR is about to enhance the mlflow handler in monai to track more details in the experiment. Here are a few enhancements that needs to be added through this PR. - API for users to add experiment/run name in MLFlow - API for users to log customized params for each run - Methods to log result images - Methods to log optimizer params - (optional) additional metric_names as a user argument to override the default engine.state.metrics to instruct MLFlow about metrics to log After adding these enhancements, some tests listed below should be excuted. - Make sure this handler works in multi-gpu environment - Make sure this handler works in all existed bundles ### 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. - [x] API for users to add experiment/run name in MLFlow - [x] API for users to log customized params for each run - [x] Methods to log result images - [x] Methods to log optimizer params - [x] Make sure this handler works in multi-gpu environment - [ ] Make sure this handler works in all existed bundles Signed-off-by: binliu <binliu@nvidia.com> Co-authored-by: Nic Ma <nma@nvidia.com> 02 December 2022, 16:41:05 UTC
e2fc703 cachedataset small fix (#5565) Fixes https://github.com/Project-MONAI/MONAI/issues/5573 When using CacheDataset , and DataLoader num_workers==0, we convert ProxyList to List in disable_share_memory_cache() but if we're already inside DDP (DistributedDataParallel), we should not do such conversion, as it will crash. we should continue using ProxyList() ### 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> 02 December 2022, 08:54:30 UTC
e15da1c CheckLabelShaped to check and correct label shapes (#5606) adds CheckLabelShaped transform under monai.apps.auto3dseg: - to check if image shape and label shape are the same. Currently, we usually don't check for it, which results in potentially a non-descriptive crash later, when computing loss or metric. - to correct label shape if it is very similar to image shape. Unfortunately some datasets, such as Hecktor22, has some labels (masks) with a slightly different shapes (difference in only 1 voxel). And because of that a user will have to either re-save the whole dataset, or account for it during the training loop (which is inconvenient). this utility auto corrects it. We also already have this auto-correction in DataAnalyzer, and with this transform, DataAnalyzer logic is simplified. Signed-off-by: myron <amyronenko@nvidia.com> Signed-off-by: Wenqi Li <wenqil@nvidia.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> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 01 December 2022, 12:55:14 UTC
4cf6cf8 5611 iter_patch no padding for 0/None patch size (#5612) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5611 ### Description skip the padding to make smaller memory footprint when the patch size is 0 or None for a particular dimension ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> 01 December 2022, 07:29:35 UTC
d0db5fd 5596 simplify conda env (#5597) Fixes https://github.com/Project-MONAI/MONAI/issues/5596 Fixes https://github.com/Project-MONAI/MONAI/issues/5088 ### Description simplify the conda env ### 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> 29 November 2022, 13:20:40 UTC
6471c90 Generic input interface for Algo base class (#5602) Making Algo base to have more generic inputs. Signed-off-by: myron <amyronenko@nvidia.com> 29 November 2022, 09:15:06 UTC
070c97a Add instructions for GPU-enabled PyTorch to installation.md (#5600) Fixes #5333 . ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Dženan Zukić <dzenan.zukic@kitware.com> Co-authored-by: Mingxin Zheng <mingxinz@nvidia.com> 29 November 2022, 08:27:21 UTC
cc171a8 Throw error with description when there are no valid user click/signals (#5598) Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Fixes # . Throw error with description when there are no valid user click/signals ### Description Instead of torch.stack error, provide readable description when the signal is not valid, and no valid bounding boxes could be created based on user click points. 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: Sachidanand Alle <sachidanand.alle@gmail.com> 28 November 2022, 17:48:35 UTC
0c2fbac auto updates (#5590) closes #5588 closes #5589 Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 26 November 2022, 14:26:13 UTC
2530959 auto updates (#5585) closes https://github.com/Project-MONAI/MONAI/pull/5581 closes https://github.com/Project-MONAI/MONAI/pull/5582 closes https://github.com/Project-MONAI/MONAI/pull/5583 closes https://github.com/Project-MONAI/MONAI/pull/5584 closes https://github.com/Project-MONAI/MONAI/pull/5586 Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> 25 November 2022, 13:11:41 UTC
2c7ba9e Replacement Apply and Resample (#5436) Signed-off-by: Ben Murray <ben.murray@gmail.com> ### Description This is part of the work towards #4855. It adds: - a lazy `apply` method - A transform-like wrapper for `apply` called `Apply` ~- `MetaMatrix` and related functionality to represent abstracted grid and matrix transforms with metadata~ - A universal `resample` function that can be used to apply grid / matrix transforms ~- Functional spatial and croppad implementations that define but don't apply transforms~ ### 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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Ben Murray <ben.murray@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com> 25 November 2022, 11:00:55 UTC
94dbc3c Fixes for Nuclick Transform (#5563) Fixes # . ### Description - Make the current nuclick transform tensor enabled. - Add option to use Gaussian Filter over user clicks. - Option to choose initial seed point based on distance transform instead of random - Optimize patch/boundary box creation logic for nuclei cells - The same transform should be useful to create an interactive nuclick classification model ### 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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> 24 November 2022, 21:46:19 UTC
021bf49 Test premerge (#5514) simpler integration tests ### 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> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 24 November 2022, 17:13:24 UTC
ec90edc 5385 Add support to override experiment tracking configs (#5556) Part of #5385 . ### Description This PR added support to override the predefined configs in the experiment tracking settings. ### 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: Nic Ma <nma@nvidia.com> 24 November 2022, 15:30:36 UTC
cab8fbb Add `RandomOrder` (#5534) Part of #5517. ### Description When we have a list of transforms, we may want these transforms to do in random order. Add `RandomOrder` which is a subclass of `Compose` to provide the ability to apply a list of transformations in random order. ### 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: KumoLiu <yunl@nvidia.com> 24 November 2022, 10:35:18 UTC
f75693f Update SSIM metric to return contrastive sensitivity (#5550) Signed-off-by: PedroFerreiradaCosta <pedro.hpf.costa@gmail.com> Fixes #5417 . ### Description Makes SSIM loss depend on metric instead of the other way around (the loss was computing the metric). Returns contrastive sensitivity if the boolean `full` is True when calling `_compute_metric()` Adds unit test to `test_ssim_metric.py` to check if contrastive sensitivity output is working as expected. ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [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: PedroFerreiradaCosta <pedro.hpf.costa@gmail.com> 24 November 2022, 03:21:31 UTC
dd178ea Enhance the handler `ProbMapProducer` to use `FolderLayout` (#5570) Fixes #5566 ### 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). Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> 23 November 2022, 23:37:48 UTC
86f2573 Implement `FlattenSubKeysd` (#5554) Fixes #5553 ### Description Promote specified children of specified items to the level of item. ### 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> 23 November 2022, 17:40:06 UTC
c8cdb5f Autorunner fixes2 (#5562) This is the same PR as in https://github.com/Project-MONAI/MONAI/pull/5523 but removing changes to default ensemble method (AlgoEnsembleBestByFold), and keeping it as is for now, since it triggers errors with some unit tests. the default ensemble method update can be done in a separate PR. ### 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> 23 November 2022, 16:42:00 UTC
68b78d2 Support RandTorchVisiond as RandomizableTransform (#5567) Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> Fixes # . Instead of simple Randomizable transform, extend RandTorchVisiond into RandomizableTransform ### Description This will help users to choose to apply the transform with some probability. For example, we want to mix training samples both with and without ColorJitter (as during validation we don't use ColorJitter) ### 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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Sachidanand Alle <sachidanand.alle@gmail.com> 23 November 2022, 14:04:27 UTC
9adfb4b Fix Binary prediction bug in `HoVerNetNuclearTypePostProcessing` (#5560) Fixes #5559. ### Description When setting `return_binary` to True, the instance prediction map won't be changed. Add type prediction map in `HoVerNetNuclearTypePostProcessing` when output_classes is not None. ### 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. - [ ] 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Co-authored-by: Behrooz Hashemian <3968947+drbeh@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 23 November 2022, 05:52:06 UTC
a8f67e4 Fix wrong algorithm folder name parsing in ensemble after HPO in Auto3DSeg (#5561) Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> Fixes #5558 . ### 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] Integration tests passed locally by running `python tests/test_integration_autorunner.py`. Signed-off-by: Mingxin Zheng <18563433+mingxin-zheng@users.noreply.github.com> 22 November 2022, 19:19:25 UTC
526ea1f Revert "AutoRunner small updates" (#5555) Reverts Project-MONAI/MONAI#5523 22 November 2022, 17:12:23 UTC
7213060 AutoRunner small updates (#5523) AutoRunner() non-breaking class updates, to add more options - adding and option self.algos to manually specify algorithms to run (instead of always downloading a zip) - Input options train, algo_gen, analyze will default to None, indicating to automatically decide whether this step is necessary based on cache (history). - default ensemble method is changed to AlgoEnsembleBestByFold - added method set_analyze_params() to set DataAnalyser parameters (e.g. run it on gpu) - changed self.cache dict to be a single level (since it only has 4 items), instead of a nested dictionary - removed default setting sigmoid=True in set_prediction_params(), since it's somewhat arbitrary ### 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`. - [x] 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> 22 November 2022, 04:43:22 UTC
77651ad DataAnalyzer fixes (#5536) This adds several non-breaking fixes to DataAnalyzer - do_ccp option defaults to False (as we don't currently use it, and it's pretty slow) - on GPU, dataloading is in parallel (num_workers = self.workers), previously it was only synchronous - when label for one case is completely empty (no foreground), it crashes, so this PR fixes, by putting all zeros in label status this PR partially addresses https://github.com/Project-MONAI/MONAI/issues/5430 ### 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> 21 November 2022, 23:22:12 UTC
0e701da auto updates (#5549) Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 21 November 2022, 18:11:23 UTC
c8ef7fe 5542 amend extract levels in localnet (#5543) Fixes #5542 ### 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). - [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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: kate-sann5100 <yiwen.li@st-annes.ox.ac.uk> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com> 18 November 2022, 20:12:04 UTC
e4b99e1 Implement `SlidingWindowHoVerNetInferer` (#5531) Fixes #5521 ### Description This PR implement `SlidingWindowHoVerNetInferer` that with HoVerNet model, where the output size is different than the input but cannot be scaled and should be padded and then cropped. ### 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. Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 18 November 2022, 04:26:33 UTC
624e832 5532 tensor.shape in tensor.Size (#5533) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5532 ### Description returns early if it's torch.Size ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> Co-authored-by: Nic Ma <nma@nvidia.com> 17 November 2022, 04:48:53 UTC
bb3ecf6 3694 loss function as cumulative metric (#5513) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #3694 ### Description adds a wrapper for loss function: ```py dice_loss = DiceLoss(include_background=True) loss_metric = LossMetric(loss_fn=dice_loss) ``` so that `loss_metric` it can be used as a metric in: https://github.com/Project-MONAI/MONAI/blob/b030839e98e6a00c1ab0e53545f60b62dc4da4a4/monai/handlers/ignite_metric.py#L32 ### 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> 16 November 2022, 21:15:54 UTC
5a6672c Update with the changes in sobel gradients (#5503) Fixes #5500 ### Description Update `HoVerNetLoss` with the improvements and changes in `SobelGradients`. ### 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). Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com> 16 November 2022, 17:04:00 UTC
d51edc3 minor usability enh bundle workflow (#5480) Signed-off-by: Wenqi Li <wenqil@nvidia.com> ### Description this PR includes a few minor improvements - allow string input, such as `device="cuda:1"` for Workflow - skip stats key metric if `key_metric_name` is None (monai/handlers/stats_handler.py) - print incompatible metric values in the warning message (CheckpointSaver) - adds a `epochs` parameter for `ShuffleBuffer` (https://github.com/Project-MONAI/MONAI/issues/5488) - adds a `output_name_formatter` for `SaveImage` (https://github.com/Project-MONAI/MONAI/issues/5508) - simplify torch version in bundle init (https://github.com/Project-MONAI/MONAI/pull/5529) ### 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: Nic Ma <nma@nvidia.com> Co-authored-by: Nic Ma <nma@nvidia.com> 16 November 2022, 15:31:48 UTC
b36c8db Classification post-process for HoVerNet (#5462) Signed-off-by: KumoLiu <yunl@nvidia.com> Fixes #5180. ### Description For the post-process in HoVerNet, now we have PR #5173 to process the segmentation output(which has been merged) and PR #5186 to process the classification output(which is under review now). We want a whole transform containing these two components which can be easily used in the MONAI model zoo bundle. Here has a draft version of how to combine these components, if anyone has any suggestions, please feel free to take it out. ### 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`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Signed-off-by: yunliu <yunl@nvidia.com> Co-authored-by: Behrooz Hashemian <3968947+drbeh@users.noreply.github.com> 16 November 2022, 04:10:09 UTC
ab2c804 Add `new_key` args in `Lambdad` (#5526) Signed-off-by: KumoLiu <yunl@nvidia.com> Fixes #5517. ### Description Add a `new_key` argument, it will create a new key for the output and keep the value of the key intact when `overwrite` is set to False. ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 15 November 2022, 17:33:23 UTC
8ac7df4 Fix tutorial test error about MLFlowHandler (#5527) ### Description Fix https://github.com/Project-MONAI/tutorials/issues/1040 ### 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: Nic Ma <nma@nvidia.com> 15 November 2022, 16:39:30 UTC
5e6f105 ResNet implementation: set bias=False for downsample-B (#5477) Signed-off-by: Geevarghese George <thatgeeman@users.noreply.github.com> ### Description This is a simple fix following #5465. The downsampling layer is not expected to have a bias term. The previous implementation did not explicitly set `bias=False` and defaulted to PyTorch Conv3D/2D where `bias=True`. With this change, the correct number (62 for resnet18) of parameter groups are returned: ```python from torchvision import models from monai.networks import nets d2net_torch = models.resnet18() d2net_monai = nets.resnet18(spatial_dims=2) d3net_monai = nets.resnet18(spatial_dims=3) len(list(d2net_torch.parameters())), len(list(d2net_monai.parameters())), len(list(d3net_monai.parameters())) # 62, 62, 62 # before: 62 65 65 ``` Other deeper 2D ResNet architectures are also comparable to the PyTorch implementation; the `pretrained`/`weights` parameter can be allowed for these networks. Currently, it raises a `NotImplemetedError` with `pretrained=True` even for 2D ResNets. ### 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: Geevarghese George <thatgeeman@users.noreply.github.com> 15 November 2022, 09:59:17 UTC
5332187 5515 Adjust freeze encoder of hovernet (#5518) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5515 . ### Description This PR adjusts the freeze encoder function, and also fix the issue of un-trigger some of the unit tests. ### 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: Yiheng Wang <vennw@nvidia.com> 14 November 2022, 22:53:33 UTC
518cdc1 auto updates (#5516) Signed-off-by: monai-bot <monai.miccai2019@gmail.com> Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 14 November 2022, 09:38:00 UTC
11d98e6 Add MLFlow support to the bundle run (#5499) ### Description This PR added the `MLFlow` support the bundle script. It refers to the `patched_fit` implementation of MLFlow + Lightning: https://github.com/mlflow/mlflow/blob/master/mlflow/pytorch/_pytorch_autolog.py#L328-L338 ### 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: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 14 November 2022, 04:32:06 UTC
89684d6 5510 flexible device in Invert (#5512) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5510 ### Description this makes `device` and `post_func` optional ### 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> 11 November 2022, 16:35:18 UTC
b030839 5505 - option for preserving input dtypes Load/Save (#5506) Signed-off-by: Wenqi Li <wenqil@nvidia.com> Fixes #5505 ### Description - provides an option to preserve the input dtype when: - `LoadImge(dtype=None, ...)` - `SaveImage(output_dtype=None, ...)` - deprecate `dtype` in `NibabelReader`, so the readers always preserve the dtype ### 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <wenqil@nvidia.com> 10 November 2022, 20:29:06 UTC
614c2ca #5498 issues fix pull request for SSIMMetric (#5502) Fixes https://github.com/Project-MONAI/MONAI/issues/5498 ### Description simply add arguments (reduction and get_not_nans) for parent class and update ssim loss function to inherit loss, not nn.module. ### 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: Joeycho <joeyadamcho@gmail.com> 10 November 2022, 15:27:32 UTC
7c57348 5497 Update init bundle function (#5507) Signed-off-by: Yiheng Wang <vennw@nvidia.com> Fixes #5497 . ### Description This PR updates the init bundle function to match up with https://github.com/Project-MONAI/model-zoo/blob/dev/CONTRIBUTING.md ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Yiheng Wang <vennw@nvidia.com> 10 November 2022, 12:28:21 UTC
acffc2c auto updates (#5504) Signed-off-by: monai-bot <monai.miccai2019@gmail.com> 10 November 2022, 00:37:41 UTC
f9ea9d8 implemented F_beta score (#5490) Signed-off-by: Roland Kica <roland.kica@student.tuke.sk> ### Description Implementing F beta score based on Confusion matrix metric ### 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: Roland Kica <roland.kica@student.tuke.sk> 09 November 2022, 23:09:49 UTC
cd29a5b Install dependencies on Mac (#5492) 09 November 2022, 19:18:27 UTC
9dd61db Extended `from_engine` to work with HoVerNet (#5494) Fixes #5028. ### Description Since the output for HoVerNet is a dictionary, `from_engine` can't meet the requirements. This PR is to extend `from_engine` to work with HoVerNet. ### 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. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Behrooz Hashemian <3968947+drbeh@users.noreply.github.com> 09 November 2022, 18:15:53 UTC
a6ae2be [WIP] 5308 Add runtime cache support to `CacheDataset` (#5365) Fixes #5308 . ### Description This PR added runtime cache support in the `CacheDataset`. ### 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> 09 November 2022, 13:04:57 UTC
back to top