Skip to content

Demorun 1 Running prediction with pre trained model

Chris Churas edited this page Aug 1, 2018 · 7 revisions

Segmentation with pretrained model (for mitochondria in a SBEM dataset)

These steps skip the training and go straight to prediction by using a 30,000 iteration pretrained mitochondria model that has been preloaded.

Step 1) Connect via ssh to instance created by these instructions

ssh ubuntu@PublicDNS_VALUEFROM_WEBPAGE_ABOVE

Quick and Dirty run

Here are the commands to run once logged into the instance. Below in Steps 2+ are more detailed instructions on what is happening. The commands below will take 15 minutes to run on p2.xlarge and even less on p3.2xlarge instance.

cd ~
runprediction.sh ~/sbem/mitochrondria/xy5.9nm40nmz/30000iterations_train_out ~/cdeep3m/mito_testsample/testset/ ~/predictout30k
# results are in ~/predictout30k/ensembled
ls ~/predictout30k/ensembled

Step 2) Run runprediction.sh

This step runs caffe prediction writing results to ~/predictout30k directory and takes about 3-5 minutes.

runprediction.sh ~/train_out/ ~/cdeep3m/mito_testsample/testset/ ~/predictout30k

Output:

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
Starting Image Augmentation
Check image size of: 
/home/ubuntu/cdeep3m/mito_testsample/testset/
Reading file: /home/ubuntu/cdeep3m/mito_testsample/testset/images.081.png
z_blocks =

   1   5

Start up worker to generate packages to process
Start up agent to run prediction on packages
Start up agent to run post processing on packages

To see progress run the following command in another window:

tail -f "/home/ubuntu/predictout30k/*.log"
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
warning: your version of GraphicsMagick limits images to 16 bits per pixel
warning: called from
    imformats>default_formats at line 256 column 11
    imformats at line 79 column 3
    imageIO at line 106 column 11
    imread at line 106 column 30
    /home/ubuntu/cdeep3m/EnsemblePredictions.m at line 50 column 31
Saving Image # 1 of 5: /home/ubuntu/predictout30k/ensembled/Segmented_0001.png
Saving Image # 2 of 5: /home/ubuntu/predictout30k/ensembled/Segmented_0002.png
Saving Image # 3 of 5: /home/ubuntu/predictout30k/ensembled/Segmented_0003.png
Saving Image # 4 of 5: /home/ubuntu/predictout30k/ensembled/Segmented_0004.png
Saving Image # 5 of 5: /home/ubuntu/predictout30k/ensembled/Segmented_0005.png
Elapsed time for merging predictions is 000001 seconds.

Prediction has completed. Results are stored in /home/ubuntu/predictout30k/ensembled
Have a nice day!

Final results are stored in /home/ubuntu/predictout30k/ensembled

Clone this wiki locally