andreped commited on
Commit
3468859
1 Parent(s): ae3fac3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -21
README.md CHANGED
@@ -1,33 +1,43 @@
1
  # Automatic liver segmentation in CT using deep learning
 
2
 
3
- #### NOTE: Trained 2D model on the LITS dataset is automatically downloaded when running the inference script and can be used as you wish, but please, give credit. ENJOY! :)
4
 
 
5
 
6
- ![Screenshot](figures/Segmentation_CustusX.PNG)
7
 
8
- The figure shows a predicted liver with the corresponding patient CT in 3DSlicer. It is the Volume-10 from the LITS17 dataset.
 
9
 
10
- First of all:
11
- The LITS dataset can be accessible from here (https://competitions.codalab.org), and the corresponding paper for the challenge (Bilic. P et al.. (2019). The Liver Tumor Segmentation Benchmark (LiTS). https://arxiv.org/abs/1901.04056). If trained model is used please cite this paper.
12
-
13
- Usage:
14
- > git clone https://github.com/andreped/livermask.git \
15
- > cd livermask \
16
- > python3 -m venv venv \
17
- > python -m pip install -r /path/to/requirements.txt . \ <- might want to run > python setup.py bdist_wheel < before
18
- > cd livermask \
19
- > python livermask.py "path_to_ct_nifti.nii" "output_name.nii"
20
 
21
  If you lack any modules after, try installing them through setup.py (could be done instead of using requirements.txt):
22
- > pip install wheel \
23
- > python setup.py bdist_wheel
 
 
 
 
 
 
 
 
 
24
 
25
- NOTE: Currently, model only works for the nifti format, and outputs a binary volume in the same format (*.nii). But this format can be imported in CustusX. I wouldn't recommend mixing DICOM and .nii prediction file in CustusX, as there seem to be some orientation issues between these (bug to be fixed in the future). But simply convert DICOM -> NIFTI using the command-line tool dcm2niix (https://github.com/rordenlab/dcm2niix).
26
 
27
- Convert DICOM -> NIFTI doing this:
28
- > dcm2niix -s y -m y -d 1 "path_to_CT_folder" "output_name"
29
 
30
- Note that "-d 1" assumed that "path_to_CT_folder" is the folder just before the set of DICOM scans you want to import and convert. This can be removed if you want to convert multiple ones at the same time. It is possible to set "." for "output_name", which in theory should output a file with the same name as the DICOM folder, but that doesn't seem to happen...
31
 
32
- A few final notes:
33
- 1) If you get SSLError during downloading the model, disable VPN, e.g. cisco. For those on the sintef network, try changing network to Eduroam or similar, as it might be a most-famous evry-issue...
 
1
  # Automatic liver segmentation in CT using deep learning
2
+ [![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE)
3
 
4
+ #### Trained 2D model on the LITS dataset is automatically downloaded when running the inference script and can be used as you wish, ENJOY! :)
5
 
6
+ <img src="figures/Segmentation_CustusX.PNG" width="70%" height="70%">
7
 
8
+ The figure shows a predicted liver mask with the corresponding patient CT in 3DSlicer. It is the Volume-10 from the LITS17 dataset.
9
 
10
+ ## Credit
11
+ The LITS dataset can be accessible from [here](https://competitions.codalab.org), and the corresponding paper for the challenge (Bilic. P et al.. (2019). The Liver Tumor Segmentation Benchmark (LiTS). https://arxiv.org/abs/1901.04056). If trained model is used please cite this paper.
12
 
13
+ ## Usage:
14
+ ```
15
+ git clone https://github.com/andreped/livermask.git \
16
+ cd livermask \
17
+ python -m venv venv \
18
+ python -m pip install -r /path/to/requirements.txt . \ <- might want to run > python setup.py bdist_wheel < before
19
+ cd livermask \
20
+ python livermask.py "path_to_ct_nifti.nii" "output_name.nii"
21
+ ```
 
22
 
23
  If you lack any modules after, try installing them through setup.py (could be done instead of using requirements.txt):
24
+ ```
25
+ pip install wheel \
26
+ python setup.py bdist_wheel
27
+ ```
28
+
29
+ ## DICOM/NIfTI format
30
+ Pipeline assumes input is in the NIfTI format, and output a binary volume in the same format (.nii).
31
+ DICOM can be converted to NIfTI using the CLI [dcm2niix](https://github.com/rordenlab/dcm2niix), as such:
32
+ ```
33
+ dcm2niix -s y -m y -d 1 "path_to_CT_folder" "output_name"
34
+ ```
35
 
36
+ Note that "-d 1" assumed that "path_to_CT_folder" is the folder just before the set of DICOM scans you want to import and convert. This can be removed if you want to convert multiple ones at the same time. It is possible to set "." for "output_name", which in theory should output a file with the same name as the DICOM folder, but that doesn't seem to happen...
37
 
38
+ ## Troubleshooting
39
+ You might have issues downloading the model when using VPN. If any issues are observed, try to disable VPN and try again.
40
 
41
+ ------
42
 
43
+ Made with :heart: and python