Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1156 commits
Select commit Hold shift + click to select a range
2308da8
trying specific modules
sarthakpati Jul 14, 2023
8ec039f
only want to install .py files in src/applications
sarthakpati Jul 14, 2023
5b9462f
Move mlcubes outside of src folder
aristizabal95 Jul 14, 2023
7d38112
Move mlcubes outside of src folder
aristizabal95 Jul 14, 2023
20cec29
Implement efficient Dockerfile for data-prep
aristizabal95 Jul 14, 2023
41c6df4
Implement efficient Dockerfile for data-prep
aristizabal95 Jul 14, 2023
41879e2
trying without setuptools upgrade
sarthakpati Jul 14, 2023
f477ead
added py_modules in setup
sarthakpati Jul 14, 2023
2ec5ac1
updated numpy version
sarthakpati Jul 14, 2023
c6ca685
Implement root-level dockerfile for data prep
aristizabal95 Jul 17, 2023
c37b788
Implement root-level dockerfile for data prep
aristizabal95 Jul 17, 2023
12b73f9
Update submodules
aristizabal95 Jul 17, 2023
074ea92
Update submodules
aristizabal95 Jul 17, 2023
df3eb72
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 17, 2023
0d18a61
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 17, 2023
af2d4ef
Set submodules to correct hash
aristizabal95 Jul 17, 2023
397b1ee
Set submodules to correct hash
aristizabal95 Jul 17, 2023
bade2be
updated entrypoint
sarthakpati Jul 18, 2023
2f0202d
fixed python path
sarthakpati Jul 18, 2023
8072851
fixed path
sarthakpati Jul 18, 2023
60186e5
fixed path
sarthakpati Jul 18, 2023
5c6aca4
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 18, 2023
7097678
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 18, 2023
19c4317
Merge dockerfiles together
aristizabal95 Jul 19, 2023
adf84b3
Merge dockerfiles together
aristizabal95 Jul 19, 2023
c177a9c
updated openvino version (per ST)
sarthakpati Jul 20, 2023
074c990
change to posixpath
sarthakpati Jul 20, 2023
4ea9122
started putting downloader in
sarthakpati Jul 20, 2023
a6b0204
updated ignore
sarthakpati Jul 20, 2023
57ead10
made this a bit more generic
sarthakpati Jul 20, 2023
386eb87
brain extraction show now be functional
sarthakpati Jul 21, 2023
a00dc98
Split process row into multiple stages
aristizabal95 Jul 21, 2023
1179036
Split process row into multiple stages
aristizabal95 Jul 21, 2023
30b9071
fix logic
sarthakpati Jul 22, 2023
f5ed88e
updated image types
sarthakpati Jul 22, 2023
10cda93
Fix set error
aristizabal95 Jul 24, 2023
4778b7a
Fix set error
aristizabal95 Jul 24, 2023
7ff0811
Implement brain extraction stage
aristizabal95 Jul 24, 2023
297f5f2
Implement brain extraction stage
aristizabal95 Jul 24, 2023
675bb2e
Simplify build copy. Rename stages
aristizabal95 Jul 24, 2023
4ea515a
Simplify build copy. Rename stages
aristizabal95 Jul 24, 2023
4dcb96e
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 24, 2023
678eee4
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 24, 2023
75b1bed
added example for tumor segmentation models
sarthakpati Jul 25, 2023
e6f72c7
updated to use the example models
sarthakpati Jul 25, 2023
760c0da
added brats nomenclature
sarthakpati Jul 25, 2023
3243bee
updated nomenclature
sarthakpati Jul 25, 2023
99a3a2e
fixed list issue
sarthakpati Jul 26, 2023
b8eadb1
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
sarthakpati Jul 26, 2023
440376a
updated hash
sarthakpati Jul 26, 2023
9fe207b
version update
sarthakpati Jul 26, 2023
60aae62
Merge branch 'master' of https://github.com/FeTS-AI/Front-End into fe…
sarthakpati Jul 26, 2023
b7b918b
Move downloaded models to MLCube
aristizabal95 Jul 26, 2023
eb53a4b
Move downloaded models to MLCube
aristizabal95 Jul 26, 2023
85cb2bf
Fix prev stage removal from brain_extraction
aristizabal95 Jul 26, 2023
94b8588
Fix prev stage removal from brain_extraction
aristizabal95 Jul 26, 2023
ee47c95
Fix get row information retrieval
aristizabal95 Jul 26, 2023
c421040
Fix get row information retrieval
aristizabal95 Jul 26, 2023
b5cd751
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 26, 2023
33aabc7
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 26, 2023
a061984
added comment
sarthakpati Jul 26, 2023
c056e69
dynamic download of models
sarthakpati Jul 27, 2023
4f4e30b
Remove repeated pip installs. Don't use venv
aristizabal95 Jul 31, 2023
828cb5b
Remove repeated pip installs. Don't use venv
aristizabal95 Jul 31, 2023
e262d51
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 31, 2023
6f1cfd0
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Jul 31, 2023
7e3b2ef
Implement genera, extract stage.
aristizabal95 Jul 31, 2023
4a997ef
Implement genera, extract stage.
aristizabal95 Jul 31, 2023
f7ebae9
Fix brain file naming issue
aristizabal95 Jul 31, 2023
03216e0
Fix brain file naming issue
aristizabal95 Jul 31, 2023
56ef4d0
Add status code to extract code
aristizabal95 Jul 31, 2023
408f3b8
Add status code to extract code
aristizabal95 Jul 31, 2023
a8b5053
no need for cast
sarthakpati Jul 31, 2023
cd2032f
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Aug 1, 2023
ca4dfce
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Aug 1, 2023
fd8e417
Download model checkpoints at build time
aristizabal95 Aug 1, 2023
eb2a501
Download model checkpoints at build time
aristizabal95 Aug 1, 2023
e16cf65
Move downloads to happen before copying contents
aristizabal95 Aug 7, 2023
b8e2ba9
Move downloads to happen before copying contents
aristizabal95 Aug 7, 2023
709d894
Generalize extract stage. Get Traceback
aristizabal95 Aug 7, 2023
056d979
Generalize extract stage. Get Traceback
aristizabal95 Aug 7, 2023
b3c5dff
Place constants on a separate folder
aristizabal95 Aug 7, 2023
2d2f11c
Place constants on a separate folder
aristizabal95 Aug 7, 2023
77ec6fd
Add manual step
aristizabal95 Aug 7, 2023
10d8adb
Add manual step
aristizabal95 Aug 7, 2023
2ce8fa4
Set backup to read-only
aristizabal95 Aug 8, 2023
98f73f4
Set backup to read-only
aristizabal95 Aug 8, 2023
b009e89
Remove unused dockerfile
aristizabal95 Aug 10, 2023
3b3213d
Remove unused dockerfile
aristizabal95 Aug 10, 2023
f152385
Fix manual stage
aristizabal95 Aug 10, 2023
d8e9a0c
Fix manual stage
aristizabal95 Aug 10, 2023
ad37303
[WIP] Implement match stage
aristizabal95 Aug 10, 2023
58f497b
[WIP] Implement match stage
aristizabal95 Aug 10, 2023
2880193
Implement match stage should_run function
aristizabal95 Aug 10, 2023
5713d3d
Implement match stage should_run function
aristizabal95 Aug 10, 2023
419733b
Install recent version of GaNDLF
aristizabal95 Aug 10, 2023
15a2b0b
Install recent version of GaNDLF
aristizabal95 Aug 10, 2023
f5ad518
copy data_prep_models from the correct folder
hasan7n Aug 15, 2023
c52193b
copy data_prep_models from the correct folder
hasan7n Aug 15, 2023
ef574ab
fix bugs related to tumor segmentation
hasan7n Aug 15, 2023
c32dd95
fix bugs related to tumor segmentation
hasan7n Aug 15, 2023
2aefcdc
modify tumor segmentation model download url
hasan7n Aug 16, 2023
40ed04c
modify tumor segmentation model download url
hasan7n Aug 16, 2023
3f04385
fix the bugfix in prepareDataset
hasan7n Aug 16, 2023
a6793a7
fix the bugfix in prepareDataset
hasan7n Aug 16, 2023
d122ae6
start fixing matching step (WIP)
hasan7n Aug 16, 2023
7b7c35b
start fixing matching step (WIP)
hasan7n Aug 16, 2023
e56bb5a
updated link for tumor segmentation model
sarthakpati Aug 18, 2023
ee06c51
updated modality order and models
sarthakpati Aug 18, 2023
8bd3dbe
merge branch fets_2.0
hasan7n Aug 21, 2023
fe1d353
merge branch fets_2.0
hasan7n Aug 21, 2023
d2f5abc
Update Dockerfile
sarthakpati Aug 22, 2023
99aefe4
replacing string containment with string non-equality
brandon-edwards Aug 22, 2023
d0ed8fc
replacing string containment with string non-equality
brandon-edwards Aug 22, 2023
0939398
use tumor files names from dict
hasan7n Aug 23, 2023
f246be3
use tumor files names from dict
hasan7n Aug 23, 2023
436a4c2
fix name conventions for extraction models outputs
hasan7n Aug 23, 2023
24d492d
fix name conventions for extraction models outputs
hasan7n Aug 23, 2023
6afa8ce
revert back to non openvino model
hasan7n Aug 23, 2023
2ba17d5
revert back to non openvino model
hasan7n Aug 23, 2023
07ea0f2
remove file extension from tumor mask ID
hasan7n Aug 23, 2023
c0125aa
remove file extension from tumor mask ID
hasan7n Aug 23, 2023
1bd29e2
Merge remote-tracking branch 'hasan7n/separate-stages-copied-branch' …
hasan7n Aug 23, 2023
67452ab
Merge remote-tracking branch 'hasan7n/separate-stages-copied-branch' …
hasan7n Aug 23, 2023
2fca4ca
missing and extra modalities detected by string for subject and timep…
brandon-edwards Aug 24, 2023
c2d0cdb
missing and extra modalities detected by string for subject and timep…
brandon-edwards Aug 24, 2023
84f8d98
Merge branch 'separate-stages-copied-branch' of https://github.com/ha…
brandon-edwards Aug 24, 2023
fed4063
Merge branch 'separate-stages-copied-branch' of https://github.com/ha…
brandon-edwards Aug 24, 2023
696ce37
Merge pull request #1 from hasan7n/separate-stages-copied-branch
aristizabal95 Aug 28, 2023
eb82322
Merge pull request #1 from hasan7n/separate-stages-copied-branch
aristizabal95 Aug 28, 2023
8ee2bb5
Implement comparison
aristizabal95 Aug 30, 2023
b60d3b9
Implement comparison
aristizabal95 Aug 30, 2023
d3cdc7c
Fix manual step
aristizabal95 Aug 30, 2023
a62b4cc
Fix manual step
aristizabal95 Aug 30, 2023
3cb4b6e
Update itcr_connectivity.md
sarthakpati Aug 31, 2023
e6163a6
Update itcr_connectivity.md
sarthakpati Aug 31, 2023
8efaf43
Sync data to input data. Implement confirm stage
aristizabal95 Aug 31, 2023
0737cb2
Sync data to input data. Implement confirm stage
aristizabal95 Aug 31, 2023
a7a02c2
Fix manual step trying to inspect nonexistent path
aristizabal95 Sep 1, 2023
8aff52b
Fix manual step trying to inspect nonexistent path
aristizabal95 Sep 1, 2023
2bcc6a3
Fix report using incorrect out path
aristizabal95 Sep 1, 2023
f1719c0
Fix report using incorrect out path
aristizabal95 Sep 1, 2023
a1fa8e2
Fix report being created with wrong voxels column
aristizabal95 Sep 1, 2023
134a181
Fix report being created with wrong voxels column
aristizabal95 Sep 1, 2023
7608e58
Add comment on exact match
aristizabal95 Sep 1, 2023
73420d6
Add comment on exact match
aristizabal95 Sep 1, 2023
01f28ce
Implement confirm stage (Auto-confirm for now)
aristizabal95 Sep 1, 2023
b7926cc
Implement confirm stage (Auto-confirm for now)
aristizabal95 Sep 1, 2023
09728b9
Implement split stage
aristizabal95 Sep 1, 2023
e66b65a
Implement split stage
aristizabal95 Sep 1, 2023
58ace77
Implement pipeline. Fix bugs
aristizabal95 Sep 6, 2023
5968853
Implement pipeline. Fix bugs
aristizabal95 Sep 6, 2023
5a00b18
Fix stages not returning success status
aristizabal95 Sep 7, 2023
1493942
Fix stages not returning success status
aristizabal95 Sep 7, 2023
234e9a5
Separate paths by data and labels
aristizabal95 Sep 8, 2023
f4ce377
Separate paths by data and labels
aristizabal95 Sep 8, 2023
d1e1ece
Implement folder structure validation
aristizabal95 Sep 12, 2023
668f591
Implement folder structure validation
aristizabal95 Sep 12, 2023
86a593f
Fix pipeline. Implement file-based input.
aristizabal95 Sep 12, 2023
363d976
Fix pipeline. Implement file-based input.
aristizabal95 Sep 12, 2023
07a4374
Implement empty statistics task
aristizabal95 Sep 12, 2023
8ae2953
Implement empty statistics task
aristizabal95 Sep 12, 2023
6884c79
Merge branch 'fets_2.0' into separate-stages
aristizabal95 Sep 12, 2023
29215d0
Merge branch 'fets_2.0' into separate-stages
aristizabal95 Sep 12, 2023
70e3499
Remove outdated data.csv
aristizabal95 Sep 19, 2023
905d43b
Remove outdated data.csv
aristizabal95 Sep 19, 2023
b9a2cc8
Generate extra split files
aristizabal95 Sep 19, 2023
2f4fee2
Generate extra split files
aristizabal95 Sep 19, 2023
4297da4
Fix nift not deleting previous folder
aristizabal95 Sep 22, 2023
14f92a1
Fix nift not deleting previous folder
aristizabal95 Sep 22, 2023
57f4ccf
Skip processing if input data is already prepared
aristizabal95 Sep 27, 2023
fb26d06
Skip processing if input data is already prepared
aristizabal95 Sep 27, 2023
6f5cd63
Handle errors when validating data
aristizabal95 Sep 29, 2023
cd845ca
Handle errors when validating data
aristizabal95 Sep 29, 2023
7bd6488
Only display error message on failed val
aristizabal95 Sep 29, 2023
861728e
Only display error message on failed val
aristizabal95 Sep 29, 2023
619b2ab
Merge branch 'master' of https://github.com/FeTS-AI/Front-End into se…
aristizabal95 Oct 4, 2023
ed15ba0
Merge branch 'master' of https://github.com/FeTS-AI/Front-End into se…
aristizabal95 Oct 4, 2023
174ef26
Add metadata path
aristizabal95 Oct 6, 2023
0e8e950
Add metadata path
aristizabal95 Oct 6, 2023
6d16602
Add metadata to all tasks. Implement basic stats
aristizabal95 Oct 6, 2023
f253a8b
Add metadata to all tasks. Implement basic stats
aristizabal95 Oct 6, 2023
f1f56fc
added fields from EC
sarthakpati Oct 11, 2023
b4d24dc
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Oct 11, 2023
5f5f1de
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Oct 11, 2023
379074a
Start working on nnunet stage
aristizabal95 Oct 12, 2023
957ca68
Implement extract nnunet
aristizabal95 Oct 13, 2023
c428ff0
Handle failure scenarios
aristizabal95 Oct 16, 2023
bf9b086
Modularize tumor extraction
aristizabal95 Oct 18, 2023
b7bdd49
Add tumor fusing and screenshots
aristizabal95 Oct 18, 2023
600d4d8
ignore models folder
aristizabal95 Oct 18, 2023
0f26cff
fix git ignore models
aristizabal95 Oct 18, 2023
ed3ffba
Don't skip nnunet models
aristizabal95 Oct 19, 2023
7e1693c
Decouple mlcube from report details
aristizabal95 Oct 19, 2023
f6f9c7b
Use empty vs blank stage info
aristizabal95 Oct 19, 2023
67c527e
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Oct 19, 2023
020b911
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Oct 19, 2023
337a854
Removed unused report assignments
aristizabal95 Oct 20, 2023
a4751a2
Update instructions for the manual steps
aristizabal95 Oct 20, 2023
eb90f88
Change name from reviewed to finalized
aristizabal95 Oct 24, 2023
36588f9
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Oct 24, 2023
c6115b6
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Oct 24, 2023
529667f
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Oct 24, 2023
3772b88
Fix EOL error for string literal
aristizabal95 Oct 25, 2023
931efdd
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Oct 25, 2023
c43975b
Implement brain mask correction rollback
aristizabal95 Nov 2, 2023
1ac185d
Update instructions to use finalized folder
aristizabal95 Nov 3, 2023
e254fab
Pass hash of index for anonimization
aristizabal95 Nov 7, 2023
ca46628
Remove trash during execution
aristizabal95 Nov 7, 2023
a119915
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Nov 15, 2023
c1cdc89
Pass stages to medperf through parameters
aristizabal95 Nov 15, 2023
e837c7e
Revert "Pass stages to medperf through parameters"
aristizabal95 Nov 15, 2023
e3eb58b
Pass report stages to medperf through parameters
aristizabal95 Nov 15, 2023
cf6c217
Implement unhandled exception report
aristizabal95 Nov 16, 2023
8bdff96
Fix unhandled exceptions being handled
aristizabal95 Nov 27, 2023
a070b9d
Check for segmentation hash
aristizabal95 Nov 30, 2023
654656e
Fix unhandled error report
aristizabal95 Nov 30, 2023
0531d07
Fix statistics showing non-anonymized data
aristizabal95 Dec 7, 2023
1b5d8b9
Fix extract failing to hide already existing files
aristizabal95 Dec 7, 2023
24165ea
Fix rollback not being handled correctly
aristizabal95 Dec 7, 2023
81534eb
Fix stage not working when no stage is identified
aristizabal95 Dec 7, 2023
976615a
Fix comparison only testing hash if file exists
aristizabal95 Dec 7, 2023
9f1bd9d
Handle review edge cases
aristizabal95 Dec 11, 2023
3e9ffb0
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Dec 11, 2023
7a6366b
Import from extract for nnUNet
aristizabal95 Dec 11, 2023
d79d5e3
Remove report dependency. Handle empty stats
aristizabal95 Dec 11, 2023
d85b430
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Dec 11, 2023
08a9032
Sync generate_report with parent
aristizabal95 Dec 11, 2023
f47a8a5
Remove stages file
aristizabal95 Dec 11, 2023
bca838b
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Dec 11, 2023
884a035
fix some permission issues inside the container
hasan7n Dec 12, 2023
644aaf6
Handle alternative folder structures
aristizabal95 Dec 13, 2023
401319a
Merge branch 'fix-container-perms' of https://github.com/hasan7n/Fron…
aristizabal95 Dec 13, 2023
87fa69a
Support semi-prepared input data
aristizabal95 Dec 14, 2023
72e9126
Handle edge cases for semi-prepared data
aristizabal95 Dec 14, 2023
5f53fd9
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Dec 14, 2023
c97597d
Pass models through tarball. Fix skip issues
aristizabal95 Dec 18, 2023
c6f54af
Merge pull request #3 from aristizabal95/nnunet
aristizabal95 Dec 18, 2023
c8a0f45
Merge branch 'fets_2.0' of https://github.com/FeTS-AI/Front-End into …
aristizabal95 Dec 18, 2023
a453733
Remove parameter for testing models
aristizabal95 Dec 18, 2023
3294eb9
Add logic for invalidating subjects
aristizabal95 Dec 18, 2023
d207eee
Fix recursive structure returning wrong path
aristizabal95 Dec 19, 2023
4ec51e9
Fix report not being updated after each stage exec
aristizabal95 Dec 19, 2023
7eee09f
Update mlcube name
aristizabal95 Dec 19, 2023
a28348f
Fix permission issues
aristizabal95 Dec 20, 2023
dad972a
fix the permissions thing
hasan7n Dec 21, 2023
63d6220
remove reportfile from sanity check input
hasan7n Dec 21, 2023
edb3261
Don't fail silently for extract stage
aristizabal95 Dec 21, 2023
0e0090e
Merge branch 'separate-stages' of https://github.com/aristizabal95/Fe…
aristizabal95 Dec 21, 2023
238b297
Revert submodule
aristizabal95 Dec 22, 2023
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
72 changes: 67 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/fets-ai/fetstool_docker_dependencies
FROM ghcr.io/fets-ai/fetstool_docker_dependencies AS fets_base

LABEL authors="FeTS_Admin <admin@fets.ai>"

Expand All @@ -11,15 +11,43 @@ RUN pwd && ls -l

WORKDIR /Front-End

COPY . .
# Download model checkpoints to torch checkpoint location
# https://pytorch.org/docs/stable/hub.html#where-are-my-downloaded-models-saved
ENV TORCH_HOME="/.pytorch_cache"
RUN mkdir -p $TORCH_HOME/hub/checkpoints && \
wget -O $TORCH_HOME/hub/checkpoints/dpn98-722954780.pth http://data.lip6.fr/cadene/pretrainedmodels/dpn98-722954780.pth --no-check-certificate && \
wget -O $TORCH_HOME/hub/checkpoints/resnet50-19c8e357.pth https://download.pytorch.org/models/resnet50-19c8e357.pth

COPY src src

COPY CMakeLists.txt README.txt LICENSE .

COPY cmake_modules cmake_modules

COPY data data

COPY docs_sources docs_sources

RUN pwd && ls -l

## C++ build
RUN mkdir bin && cd bin && cmake -DCMAKE_INSTALL_PREFIX="./install/appdir/usr" -DITK_DIR="/CaPTk/bin/ITK-build" -DDCMTK_DIR="/CaPTk/bin/DCMTK-build" -DBUILD_TESTING=OFF .. && make -j$(nproc) && make install/strip

## Python package installation
RUN cd bin/install/appdir/usr/bin/ && python3.8 -m venv ./venv && ./venv/bin/pip install --upgrade pip wheel && ./venv/bin/pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu && ./venv/bin/pip install -e . && ./venv/bin/pip install setuptools-rust Cython scikit-build scikit-learn openvino-dev==2023.0.1 && ./venv/bin/pip install -e .
RUN apt-get install software-properties-common curl -y && \
add-apt-repository ppa:deadsnakes/ppa -y && apt-get update && \
apt-get install python3.8 python3.8-distutils -y && \
apt-get remove --purge python3.6 -y && \
apt autoremove -y && \
apt-get install python3.8-distutils -y && \
rm -fr /usr/bin/python /usr/bin/python3 /usr/bin/pip /usr/bin/pip3 && \
ln -s /usr/bin/python3.8 /usr/bin/python && ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip && ln -s /usr/bin/pip3.8 /usr/bin/pip3

RUN curl -fSsL -O https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.8 get-pip.py && rm get-pip.py

RUN cd bin/install/appdir/usr/bin/ && pip install --upgrade pip wheel && pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu && pip install -e . && pip install setuptools-rust Cython scikit-build scikit-learn openvino==2023.0.1 openvino-dev==2023.0.1 && pip install -e .

### put together a data example that is already aligned and ready to invoke the brain extraction and tumor segmentation

Expand All @@ -31,5 +59,39 @@ ENV QT_GRAPHICSSYSTEM="native"

RUN echo "Env paths\n" && echo $PATH && echo $LD_LIBRARY_PATH

# define entry point as the preparedataset script
ENTRYPOINT ["/Front-End/bin/install/appdir/usr/bin/venv/bin/python", "/Front-End/bin/install/appdir/usr/bin/PrepareDataset.py"]
# define entry point
ENTRYPOINT ["python", "/Front-End/bin/install/appdir/usr/bin/PrepareDataset.py"]

FROM fets_base AS data_prep

RUN find /Front-End/bin/install/appdir/usr/bin -type f \( -perm -u=x -o -type l \) -exec cp -P {} /usr/bin \;

WORKDIR /

COPY ./mlcubes/data_preparation/project/requirements.txt /project/requirements.txt

RUN pip install --upgrade pip

RUN pip install -r /project/requirements.txt

ENV LANG C.UTF-8

RUN mkdir /project/stages

RUN cp /Front-End/bin/install/appdir/usr/bin/*.py /project/stages/

RUN cp -R /Front-End/bin/install/appdir/usr/bin/data_prep_models /project/stages/data_prep_models

# Hotfix: install more recent version of GaNDLF for metrics generation
RUN pip install git+https://github.com/mlcommons/GaNDLF@616b37bafad8f89d5c816a88f44fa30470601311

RUN pip install torch torchvision

RUN pip install git+https://github.com/MIC-DKFZ/nnUNet.git@nnunetv1

ENV nnUNet_raw_data_base="/tmp/nnUNet_raw_data_base"
ENV nnUNet_preprocessed="/tmp/nnUNet_preprocessed"

COPY ./mlcubes/data_preparation/project /project

ENTRYPOINT ["python", "/project/mlcube.py"]
22 changes: 15 additions & 7 deletions docs/itcr_connectivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,35 @@ This section includes a reference of all ongoing and existing connections betwee
A connectivity map featuring all ITCR projects can be found [here](https://www.ndexbio.org/#/network/04c0a7e8-af92-11e7-94d3-0ac135e8bacf).

- [Existing Connections](#existing-connections)
- [OpenFL](#openfl)
- [GaNDLF](#gandlf)
- [CaPTk](#captk)
- [DCMTK](#dcmtk)
- [DCMQI](#dcmqi)
- [CaPTk](#captk)
- [Synapse PACS](#synapse-pacs)
- [TCIA and IDC](#tcia-and-idc)
- [Ongoing Development](#ongoing-development)
- [XNAT](#xnat)
- [FLAIM](#flaim)
- [PRISM](#prism)

## Existing Connections
## Existing Connections

### DCMTK
FeTS uses [DCMTK - DICOM ToolKit (DCMTK)](https://dicom.offis.de/dcmtk.php.en) for DICOM file handling.
### OpenFL
FeTS leverages the [Open Federated Learning library (OpenFL)](https://github.com/securefederatedai/openfl) for enabling federated machine learning of models.

### DCMQI
FeTS leverages [DICOM for Quantitative Imaging (DCMQI)](http://qiicr.org/dcmqi-guide/tutorials/intro.html) for generating DICOM-Seg files from NIfTI files.
### GaNDLF
FeTS leverages the [Generally Nuanced Deep Learning Framework (GaNDLF)](https://gandlf.org/) for enabling advanced preprocessing and deep learing based training.

### CaPTk
FeTS leverages the [Cancer Imaging Phenomics Toolkit (CaPTk)](https://www.med.upenn.edu/cbica/captk) for integrating CaPTk's current functionality into FeTS.

### DCMTK
FeTS uses [DCMTK - DICOM ToolKit (DCMTK)](https://dicom.offis.de/dcmtk.php.en) for DICOM file handling.

### DCMQI
FeTS leverages [DICOM for Quantitative Imaging (DCMQI)](http://qiicr.org/dcmqi-guide/tutorials/intro.html) for generating DICOM-Seg files from NIfTI files.

### Synapse PACS
FeTS' performance evaluation metrics are used by [Synapse PACS](https://www.synapse.org/).

Expand All @@ -42,4 +50,4 @@ Interoperability and privacy preservation algorithmic comparison.
### PRISM
Federated learning for segmentation of PRISM data.

Contact [contact [at] fets.ai](mailto:contact@fets.ai) with any questions.
Contact [contact [at] fets.ai](mailto:contact@fets.ai) with any questions.
10 changes: 10 additions & 0 deletions mlcubes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.csv
*.txt
*.nii.gz
*.mat
*.dcm
*.png
*/mlcube/workspace/*
!requirements.txt
!*/mlcube/workspace/parameters.yaml
models
50 changes: 50 additions & 0 deletions mlcubes/data_preparation/mlcube/mlcube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Data Preparator MLCube with Manual preparation steps
description: Data Preparator MLCube showcasing examples were automated and manual steps are required. Provided by MLCommons
authors:
- {name: MLCommons}

platform:
accelerator_count: 0

docker:
# Image name
image: mlcommons/rano-data-prep-mlcube:latest
# Docker build context relative to $MLCUBE_ROOT. Default is `build`.
build_context: "../project"
# Docker file name within docker build context, default is `Dockerfile`.
build_file: "Dockerfile"

tasks:
prepare:
parameters:
inputs: {
data_path: input_data,
labels_path: input_labels,
parameters_file: parameters.yaml,
models: additional_files/models,
}
outputs: {
output_path: data/,
output_labels_path: labels/,
report_file: {type: file, default: report.yaml},
metadata_path: metadata/,
}
sanity_check:
parameters:
inputs: {
data_path: data/,
labels_path: labels/,
parameters_file: parameters.yaml,
metadata_path: metadata/,
}
statistics:
parameters:
inputs: {
data_path: data/,
labels_path: labels/,
parameters_file: parameters.yaml,
metadata_path: metadata/,
}
outputs: {
output_path: {type: file, default: statistics.yaml}
}
21 changes: 21 additions & 0 deletions mlcubes/data_preparation/mlcube/workspace/parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
seed: 2784
train_percent: 0.8
medperf_report_stages:
- "IDENTIFIED"
- "VALIDATED"
- "MISSING_MODALITIES"
- "EXTRA_MODALITIES"
- "VALIDATION_FAILED"
- "CONVERTED_TO_NIfTI"
- "NIfTI_CONVERSION_FAILED"
- "BRAIN_EXTRACT_FINISHED"
- "BRAIN_EXTRACT_FINISHED"
- "TUMOR_EXTRACT_FAILED"
- "MANUAL_REVIEW_COMPLETE"
- "MANUAL_REVIEW_REQUIRED"
- "MULTIPLE_ANNOTATIONS_ERROR"
- "COMPARISON_COMPLETE"
- "EXACT_MATCH_IDENTIFIED"
- "ANNOTATION_COMPARISON_FAILED"
- "ANNOTATION_CONFIRMED"
- "DONE"
62 changes: 62 additions & 0 deletions mlcubes/data_preparation/project/mlcube.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""MLCube handler file"""
import typer
import subprocess


app = typer.Typer()


def exec_python(cmd: str) -> None:
"""Execute a python script as a subprocess

Args:
cmd (str): command to run as would be written inside the terminal
"""
splitted_cmd = cmd.split()
process = subprocess.Popen(splitted_cmd, cwd=".")
process.wait()
assert process.returncode == 0, f"command failed: {cmd}"


@app.command("prepare")
def prepare(
data_path: str = typer.Option(..., "--data_path"),
labels_path: str = typer.Option(..., "--labels_path"),
parameters_file: str = typer.Option(..., "--parameters_file"),
models_path: str = typer.Option(..., "--models"),
output_path: str = typer.Option(..., "--output_path"),
output_labels_path: str = typer.Option(..., "--output_labels_path"),
report_file: str = typer.Option(..., "--report_file"),
metadata_path: str = typer.Option(..., "--metadata_path"),
):
cmd = f"python3 project/prepare.py --data_path={data_path} --labels_path={labels_path} --models_path={models_path} --data_out={output_path} --labels_out={output_labels_path} --report={report_file} --parameters={parameters_file} --metadata_path={metadata_path}"
exec_python(cmd)


@app.command("sanity_check")
def sanity_check(
data_path: str = typer.Option(..., "--data_path"),
labels_path: str = typer.Option(..., "--labels_path"),
parameters_file: str = typer.Option(..., "--parameters_file"),
metadata_path: str = typer.Option(..., "--metadata_path"),
):
# Modify the sanity_check command as needed
cmd = f"python3 project/sanity_check.py --data_path={data_path} --labels_path={labels_path} --metadata={metadata_path}"
exec_python(cmd)


@app.command("statistics")
def sanity_check(
data_path: str = typer.Option(..., "--data_path"),
labels_path: str = typer.Option(..., "--labels_path"),
parameters_file: str = typer.Option(..., "--parameters_file"),
metadata_path: str = typer.Option(..., "--metadata_path"),
out_path: str = typer.Option(..., "--output_path"),
):
# Modify the statistics command as needed
cmd = f"python3 project/statistics.py --data_path={data_path} --labels_path={labels_path} --out_file={out_path} --metadata={metadata_path}"
exec_python(cmd)


if __name__ == "__main__":
app()
Loading