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

New function: sct_deepseg_lesion #1850

Merged
merged 12 commits into from
Jul 12, 2018
Merged

New function: sct_deepseg_lesion #1850

merged 12 commits into from
Jul 12, 2018

Conversation

charleygros
Copy link
Member

@charleygros charleygros commented Jun 11, 2018

TODO

  • Add models on OSF
  • Create testing function --> to Discuss
  • Create sct_deepseg_lesion GH label

Description of the Change

  • MANDATORY ARGS:
sct_deepseg_lesion.py -i t2s.nii.gz -c t2s
  • AVAILABLE CONTRASTS: {t2,t2s,t2_ax}
    -c t2_ax --> was train on ~200 3D T2-w volumes with anisotropic resolution, axial orientation.
    -c t2 --> was train on 3D T2-w volumes with anisotropic resolution, both axial orientation and sagittal orientation.

  • CENTERLINE DETECTION: 2 available ways to do it --> via the flag -ctr
    -ctr svm --> OptiC initialized with SVM+HoG maps (former version, currently the one integrated in master). Avantages: faster, more robust to exotic / new contrasts.
    -ctr cnn --> OptiC initialized with CNN_1 maps. Avantages: more robust to compressed cord and/or sagittal images.

  • DEALING WITH THE PRESENCE OF THE BRAIN:
    -brain 0 --> The algorithm will go through all the axial slices. Currently the version running in master. Note that this option is always set with -ctr svm.
    -brain 1 --> If brain is detected (using the CNN1 previously mentioned), the segmentation algorithm will ignore axial slices above the brainstem. PROS: (i) speed up the segmentation (especially for sagittal images), (ii) Less false positive 'blobs' in the brain. CONS: The segmentation could sometimes stop below the brainstem.

Steps and Constraints

/!\ Please re-install the toolbox: data folder

@jcohenadad
Copy link
Member

@charleygros looks like Travis is failing due to install problem, do you want to fix it before i review?

@random1717
Copy link
Contributor

@charleygros Logs (sct_download_data):

'deepseg_lesion_models': ['https://osf.io/eg7v9/?action=download',
                          ^
SyntaxError: invalid syntax

@charleygros
Copy link
Member Author

@jcohenadad : It should be fixed now.
@abtahizadeh : Merci!

@jcohenadad
Copy link
Member

error with this commit fba8c86

IOError: Unable to open file (Unable to open file: name = '/users/julien/code/sct/data/deepseg_lesion_models/t2_lesion.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

probably because the model is not installed during SCT installation. It would need to be added.

Copy link
Member

@jcohenadad jcohenadad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spinalcordtoolbox spinalcordtoolbox deleted a comment from coveralls Jun 17, 2018
@charleygros
Copy link
Member Author

(The models should now be available, except if I missed something else)

@jcohenadad
Copy link
Member

@abtahizadeh could you please create a test for this function before we merge it? in the same vein as the other testing functions that already exist. No need for integrity testing at this point (but we can open an issue to address it in the future). Thanks!

@random1717
Copy link
Contributor

@jcohenadad okay, please allow me some time to understand the function.

@jcohenadad
Copy link
Member

test added in b5bd69e
integrity test to do (another PR): #1915

@jcohenadad jcohenadad merged commit f4d917a into master Jul 12, 2018
@jcohenadad jcohenadad deleted the cg_sct_deepseg_lesion branch July 12, 2018 16:08
jcohenadad pushed a commit that referenced this pull request Dec 18, 2019
* first implementation of sct_deepseg_lesion

* add t2_ax contrast + threshold

* models on OSF and neuropoly

* add comma in sct_download_data

* add deep_lesion_models to the list to download

* installer: added download of deepseg_lesion models

* TEST: added deepseg_lesion


Former-commit-id: f4d917a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants