Comments (4)
code like this one is supposed to take care of this, no?
Yes it is indeed the case, however I don't know if nnUNet is performing any reorientations beforehand.
Also, I wanted to remind that conventions may be different depending on the tools that were used: for example, reorientation could be done before the training as pre-processing using SCT for example or using MONAI's transform.
from spinalcordtoolbox.
Couldn't we encode the reorientation step directly from MONAI's data preparation phase, while running the inference? Eg: code like this one is supposed to take care of this, no?
Yes, SCT contains this exact same line in our current contrast agnostic code.
MONAI (inference transforms):
nnUNetv2 (manually, since we predict directly on a numpy array):
spinalcordtoolbox/spinalcordtoolbox/deepseg/inference.py
Lines 198 to 202 in fef1bea
Because we are hardcoding the axcodes inside the inference functions, I wanted to just do a simple reorganization to move these hardcoded values alongside the models themselves.
(This came up because the canproco nnunetv2 model uses the AIL orientation, which required a change to the hardcoded values.)
from spinalcordtoolbox.
Perhaps it would be best to add "orientation" to the MODELS dict for each of the nnunet/monai models, then specify LPI/RPI/AIL on a per-model basis, then fetch this value from the model dict when reorienting the input image?
Couldn't we encode the reorientation step directly from MONAI's data preparation phase, while running the inference? Eg: code like this one is supposed to take care of this, no? Tagging @naga-karthik @plbenveniste @Nilser3 @NathanMolinier
from spinalcordtoolbox.
I did not implement any model yet to SCT, but aren't we calling model specific inference scripts when calling the models ?
from spinalcordtoolbox.
Related Issues (20)
- Usage of `sct_label_utils -disc <file>` is unclear
- Project discs orthogonally to the spinal cord segmentation or centerline
- Straightening is not a bijective transformation HOT 25
- viewer syntax at the end does not provide correct output file name HOT 1
- Add postprocessing functionality for the new monai/nnunet models
- qc report to display manual segmentation HOT 6
- Lesion mask not properly overlaid HOT 3
- Dipy denoising functions are duplicated between `sct_maths` and `sct_denoising_onlm`/`sct_dmri_denoise_patch2self`
- Get rid of calls to `inspect.stack` HOT 1
- Input requirements for `-x label` are unclear (what is a "single-voxel label"?) HOT 6
- sct_run_batch does not seem robust to BIDS format HOT 3
- `portalocker` error when running `sct_qc` with a large number of jobs in parallel HOT 7
- Develop new method to register odd and even chunks on 3D volumes HOT 3
- The threshold parameter of `sct_deepseg` doesn't work with the model `seg_sc_contrast_agnostic` for soft segmentation. HOT 8
- Thresholding during image registration
- `RuntimeError: PytorchStreamReader` when running `sct_deepseg` on contrast agnostic model HOT 4
- `sct_deepseg -task seg_spinal_rootlets_t2w` raises `unexpected keyword argument 'perform_everything_on_device'` error HOT 3
- Output softseg from MONAI inference is not in the range `[0, 1]` HOT 4
- Update contrast-agnostic model to 2.4 HOT 1
- Mask creation is no more required for cropping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spinalcordtoolbox.