Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring code to this repository for better reproducibility #16

Merged
merged 69 commits into from
Feb 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
a2cb10f
support n_neutral_labels and n_neutral_labels
yw7 Apr 18, 2023
cb755be
Rester all subjects to PAM50
yw7 Apr 18, 2023
cdf67f5
fix bugs related to subject subfolders
yw7 Apr 19, 2023
e0337df
⚙️chore(reg2pam50) resample image and segmentation before processing …
yw7 May 21, 2023
5abf8dc
add script to get spine-generic data via git-annex
yw7 May 21, 2023
7a92770
copy -u instead of -n+check for warp_template2anat
yw7 May 21, 2023
1877662
add parallel processing
yw7 Jun 17, 2023
32d254c
add seg_manual_fix_3d_slicer.py script
yw7 Jun 17, 2023
39d62da
Multiple updates
yw7 Aug 9, 2023
e5ce67a
Add color map for 3D Slicer
yw7 Aug 9, 2023
321572f
update seg_manual_fix_3d_slicer script
yw7 Aug 9, 2023
c6c8551
modify load_files function
yw7 Aug 15, 2023
5da5304
add remove_warp_outliers script
yw7 Aug 15, 2023
3be8220
add script to convert .mha to .nii.gz
yw7 Aug 16, 2023
d376394
add script to map segmentation labels
yw7 Aug 16, 2023
13807af
Add spider_labels_map.json
yw7 Aug 16, 2023
5f1fc85
add generate_seg_jpg_nnunet.py
yw7 Sep 6, 2023
ba280ec
update default paths and folder names
yw7 Sep 6, 2023
7f8e2a4
update git-annex installation command
yw7 Sep 6, 2023
405e23d
add make_nnunet_dataset.py
yw7 Sep 6, 2023
5769bcb
change default values of data folder
yw7 Sep 6, 2023
f38a0fc
add mrspineseg_labels_map.json
yw7 Sep 6, 2023
d3648c6
add nnunet_labels_map.json
yw7 Sep 6, 2023
5d83c78
add support for customizing output suffix
yw7 Sep 6, 2023
12a4c57
fix T12-L1 IVD from 207 to 42
yw7 Sep 7, 2023
7c17b09
remove default compression level
yw7 Sep 7, 2023
62a8e81
rename output directory
yw7 Sep 7, 2023
530be4c
skip when the output files already exist.
yw7 Sep 7, 2023
1d0d568
Save combined JPG images from NIfTI imag and seg
yw7 Nov 9, 2023
01a34c7
Generalize and multithread map_labels script
yw7 Nov 9, 2023
5e4bb33
add fix_csf_label script
yw7 Nov 9, 2023
39d3200
Add script to generate augmented images + segs
yw7 Dec 15, 2023
16eac5a
Add script to generate segmented labels from
yw7 Dec 15, 2023
b3e6ceb
Refactor generate_seg_jpg_nnunet.py script to
yw7 Dec 15, 2023
7b58a60
Mmove script for generating
yw7 Dec 15, 2023
77724c6
Some scripts for:
yw7 Dec 15, 2023
35efef8
Remove some non working startegies for training
yw7 Dec 15, 2023
3eb9321
Add nnUNet testing and training scripts
yw7 Dec 15, 2023
7df3cbe
fix bug in RandomNoise calculation.
yw7 Jan 8, 2024
1ef1361
set default number of generated to 7.
yw7 Jan 12, 2024
03f46b1
Refactor input/output folder definitions in script
yw7 Jan 23, 2024
92e0530
Set default image suffix to '_0000' in
yw7 Jan 23, 2024
ae3fb76
Remove outdated scripts
yw7 Jan 23, 2024
479e27e
Enhance mha2nii for Bulk Conversion with
yw7 Jan 25, 2024
5138685
Repo reorganization
yw7 Jan 29, 2024
63c0852
Create python package totalsegmri
NathanMolinier Jan 29, 2024
6d4ad16
changes to support python package
yw7 Jan 29, 2024
ce5fc50
Updated .gitignore to exclude .vscode directory
yw7 Jan 29, 2024
4dd9f81
fix label_map paths
yw7 Jan 30, 2024
8031adb
fix bug in image cropping
yw7 Jan 30, 2024
0148192
Added tqdm to requirements
yw7 Jan 30, 2024
e69f6ba
Update README.md - add (private dataset) to whole-spine
yw7 Jan 30, 2024
9bc209e
Update README for data path and script execution
yw7 Jan 31, 2024
f17f3ef
Update SPIDER dataset path in preparation script
yw7 Jan 31, 2024
dbbe5cd
Enhance verbose logging with script names
yw7 Jan 31, 2024
6f8652e
Enhance training script output verbosity
yw7 Jan 31, 2024
7300008
convert crlf to lf
yw7 Jan 31, 2024
71a69a6
Added argparse dependency to dirpath utility
yw7 Jan 31, 2024
9e487d0
Balanced dataset by duplicating instances
yw7 Feb 2, 2024
74c0e45
Updated README and scripts for nnUNetv2
yw7 Feb 3, 2024
26ae73f
Update README.md
yw7 Feb 3, 2024
2471c64
Refactor argument flags in MRI utils scripts
yw7 Feb 4, 2024
168b2cb
Added script for processingNIfTI segmentation files
yw7 Feb 4, 2024
ddd044b
Ignore non-critical warnings
yw7 Feb 6, 2024
1f00aad
Update dataset prep and training workflow
yw7 Feb 6, 2024
91f34d2
Rename multi-subject and single-subject dataset zip files to included…
yw7 Feb 6, 2024
8605e4b
Refactor label generation utilities
yw7 Feb 16, 2024
a3069d5
Remove big binaries from main repository
yw7 Feb 20, 2024
3c22070
Update README with mkdir flag enhancement
yw7 Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove big binaries from main repository
yw7 committed Feb 20, 2024
commit a3069d5e6c13f172e111ad7e0df72a5fe210d463
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ Tool for automatic segmentation and labelling of all vertebrae and intervertebra
- [First Model - Inference](#first-model---inference)
- [List of class](#list-of-class)

![Figure 1](images/Thumbnail.gif)
![Thumbnail](https://github.com/neuropoly/totalsegmentator-mri/assets/36595323/ceca5bb7-f370-477a-8b21-9774853948c6)

## Dependencies

@@ -41,7 +41,7 @@ Tool for automatic segmentation and labelling of all vertebrae and intervertebra
## First Model
A hybrid approach integrating nnU-Net with an iterative algorithm for segmenting vertebrae, IVDs, spinal cord, and spinal canal. To tackle the challenge of having many classes and class imbalance, we developed a two-step training process. A first model (model 1 - 206) was trained (single input channel: image) to identify 4 classes (IVDs, vertebrae, spinal cord and spinal canal) as well as specific IVDs (C2-C3, C7-T1 and L5-S1) representing key anatomical landmarks along the spine, so 7 classes in total (Figure 1A). The output segmentation was processed using an algorithm that distinguished odd and even IVDs based on the C2-C3, C7-T1 and L5-S1 IVD labels output by the model (Figure 1B). Then, a second nnU-Net model (model 2 - 210) was trained (two input channels: 1=image, 2=odd IVDs), to output 12 classes (Figure 1C). Finally, the output of model 2 was processed in order to assign an individual label value to each vertebrae and IVD in the final segmentation mask (Figure 1D).

![Figure 1](images/Figure1.svg)
![Figure 1](https://github.com/neuropoly/totalsegmentator-mri/assets/36595323/3958cbc6-a059-4ccf-b3b1-02dbc3a4a62d)

**Figure 1**: Illustration of the hybrid method for automatic segmentation of the spine and spinal cord structures. T1w image (A) is used to train model 1, which outputs 7 classes (B). These output labels are processed to extract odd IVDs (C). The T1w and odd IVDs are used as two input channels to train model 2, which outputs 12 classes (D). These output labels are processed to extract individual IVDs and vertebrae (E).

1 change: 0 additions & 1 deletion images/Figure1.svg

This file was deleted.

Binary file removed images/Thumbnail.gif
Binary file not shown.