fuentesdt / livermask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#!/bin/bash
----------
Code used for:

Morshid, A., Elsayes, K.M., Khalaf, A.M., Elmohr, M.M., Yu, J., Kaseb, A.O., Hassan, M., Mahvash, A., Wang, Z., Hazle, J.D. and Fuentes, D., 2019. A machine learning model to predict hepatocellular carcinoma response to transcatheter arterial chemoembolization. Radiology: Artificial Intelligence, 1(5), p.e180021.

https://pubs.rsna.org/doi/full/10.1148/ryai.2019180021

----------
Script for segmentation
Originally  provided by SPIE-MI 2018: SC-1235 Deep Learning for Image Understanding: https://spie.org/education/courses/coursedetail/SC1235

Edited by David Fuentes, MD Anderson Cancer Center
Edited by Jonas Actor, Rice University
25 Feb 2019

----------
PURPOSE

Construct models for liver segmentation of CT data.
The following script does the following:
	- Creates an npy database for the CT data
	- Trains a model on all of the specified dataset (kfold with k=1)
	- Trains k models using k-fold validation
	- Creates a script to test the k-fold validation models on the withheld datasets
	- Performs the k-fold testing
----------
USAGE

In your directory of choice where you will run this script, make sure the code liver2.py exists, and that the options for the data
directory is correct. Not all of the options for the liver2.py Python script are accessible via the makemodel.sh script.

If no database file has been constructed previously, run
$ ./makemodel.sh <location/of/dbfile.csv> <numepochs> <kfolds> <location/of/directory/for/output>

If a database npy file already exists, edit the script makemodel.sh to comment out the first line of code, and run the command above.


----------
NOTES

Statistical analysis can be run from the makefile script ending in -stats.makefile after the makemodel.sh script is run.
This script is created independently so that the statistical analysis of the segmentation output can be run without
occupying the same computing resources (i.e. GPUs).

Screen output from the makemodel.sh script is captured to the file nohup.out . 

When completed, the script for prediction ending in -predict.makefile is moved to the output directory.
If the output directory is not the top-level directory where the liver2.py code resides, this script will not be able
to run successfully without moving it back to the top-level directory.

About


Languages

Language:Python 94.9%Language:Shell 5.1%