Skip to content

Spleen CT Segmentation bundle need to stop using the flipped images (in LPS but passed as in RAS) from Medical Decathlon as input #766

@MMelQin

Description

@MMelQin

Describe the bug
In the inference config of the Spleen CT seg bundle, dataset from the Medical Decathlon is still used as input images.

It had been known years ago when the initial versions of the segmentation models trained with the Medical Decathlon dataset came about, that their images are flipped. More specifically, the images are in LPS+ patient anatomical space, but the orientations are the same as if RAS+.

With Slicer, load one of their image files and inspect the IJKtoRASDirections, all positive/identity matrix but the image is LPS anatomically. Load a DICOM series from TCIA, or a properly converted NIfTI file from a DICOM series, and then see the same value also with the image in LPS+ anatomically.

Better yet, follow the README and run the inference, and then see the bad segmentation result.

To Reproduce
Steps to reproduce the behavior:

Follow the README and run the inference with the Medical Decathlon images as specified in the inference config JSON.

Alternative, inspect the said input images in Slicer or similar tools and compare to a known good DICOM series or NIfTI image file

Expected behavior

The inference config pre-processing Orientation transform had been corrected some time ago, and works with known good NIfTI images converted from "production" DICOM CT from TCIA, and input images should have been changed to good ones so that the segmentation result is as expected.

Screenshots

Image

Environment

================================
Printing MONAI config...
================================
MONAI version: 1.5.1
Numpy version: 2.2.6
Pytorch version: 2.8.0+cu128
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: 9c6d819f97e37f36c72f3bdfad676b455bd2fa0d
MONAI __file__: /home/<username>/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/__init__.py

Optional dependencies:
Pytorch Ignite version: NOT INSTALLED or UNKNOWN VERSION.
ITK version: NOT INSTALLED or UNKNOWN VERSION.
Nibabel version: 5.3.2
scikit-image version: 0.25.2
scipy version: 1.15.3
Pillow version: 11.3.0
Tensorboard version: NOT INSTALLED or UNKNOWN VERSION.
gdown version: NOT INSTALLED or UNKNOWN VERSION.
TorchVision version: NOT INSTALLED or UNKNOWN VERSION.
tqdm version: NOT INSTALLED or UNKNOWN VERSION.
lmdb version: NOT INSTALLED or UNKNOWN VERSION.
psutil version: 7.1.0
pandas version: NOT INSTALLED or UNKNOWN VERSION.
einops version: NOT INSTALLED or UNKNOWN VERSION.
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: NOT INSTALLED or UNKNOWN VERSION.
pynrrd version: NOT INSTALLED or UNKNOWN VERSION.
clearml version: NOT INSTALLED or UNKNOWN VERSION.

For details about installing the optional dependencies, please visit:
    https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies


================================
Printing system config...
================================
System: Linux
Linux version: Ubuntu 22.04.5 LTS
Platform: Linux-6.5.0-45-generic-x86_64-with-glibc2.35
Processor: x86_64
Machine: x86_64
Python version: 3.10.12
Process name: python
Command: ['python', '-c', 'import monai; monai.config.print_debug_info()']
Open files: [popenfile(path='/home/mqin/.cursor-server/data/logs/20251003T112744/ptyhost.log', fd=19, position=7808, mode='a', flags=33793), popenfile(path='/home/mqin/.cursor-server/data/logs/20251003T112744/remoteagent.log', fd=22, position=27482, mode='a', flags=33793)]
Num physical CPUs: 6
Num logical CPUs: 12
Num usable CPUs: 12
CPU usage (%): [43.5, 60.1, 33.5, 33.7, 38.5, 33.3, 28.4, 33.6, 25.3, 30.1, 30.1, 37.2]
CPU freq. (MHz): 2317
Load avg. in last 1, 5, 15 mins (%): [66.5, 53.6, 43.9]
Disk usage (%): 86.3
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 31.0
Available memory (GB): 14.0
Used memory (GB): 17.0

================================
Printing GPU config...
================================
Num GPUs: 1
Has CUDA: True
CUDA version: 12.8
cuDNN enabled: True
NVIDIA_TF32_OVERRIDE: None
TORCH_ALLOW_TF32_CUBLAS_OVERRIDE: None
cuDNN version: 91002
Current device: 0
Library compiled for CUDA architectures: ['sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_90', 'sm_100', 'sm_120']
GPU 0 Name: NVIDIA RTX 6000 Ada Generation
GPU 0 Is integrated: False
GPU 0 Is multi GPU board: False
GPU 0 Multi processor count: 142
GPU 0 Total memory (GB): 47.4
GPU 0 CUDA capability (maj.min): 8.9

Additional context
All other segmentation models trained with the same dataset suffer from the same issue, if Orientation is in pre-processing transform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions