There are three parts in code/
folder:
- CODE/TOOLS
Geometric Context/
andmultipleSegmentations/
Hoiem’s segmentation training and testing codessegment/
Felzenzswalb’s oversegmentation tooltrainDataGeneration/
Our own training data aruto-extraction tool givenModelNumber_TissueType.mnc.gz
fromEECS556/BrainModels
- DATASET
Brainweb_MRIDatabase
/ MRI datasetMSRC_ObjCategImageDatabase_v2/
MSRC dataset (Hoiem used)
- RESULTS
trained classifiers; test results (accuracy and labeled test images);
mri_results/
results for MRI datasetmsrc_results/
results for MSRC dataset
#Usage
-
In Matlab, navigate to
EECS556/code
; Run>> addpath(genpath(‘.’))
-
Manually unzip the
ModelNumber_TissueType.mnc.gz
intoBrainweb_MRIDatabase/WebDownloads
, then run>> get_data_ready
which will automatically generate original images in .ppm format, and ground truth labels train_data.mat
in folder Brainweb_MRIDatabase/Images
.
3. Run
>> mriTrain
classifiers are learned and stored in `mri_results/train_results`
-
run
>> mriTestScript
test images will be loaded and labeld based on learned classifiers.
Test results are stored inmri_results/test_results
#Parameters
Parameters that can be tuned:
ncv
: nvc-fold cross-validation
nsegments
: list of number of regions for multiple hypothesis
train
: training images indicies
test
: test iamges indicies
trainind1
: training images for edge classifer
sigma
: Used to smooth the input image before segmenting it (0.1)
k
: Value for the threshold function (100)
min
: Minimum component size enforced by post-processing (5)
currently we use
ncv=1
: no cross validation
trainind1=half of the training set
#Experiments
-
Cross-tests
We have four patterns of bias field (p1, p2, p3, p4), and we form train-test pair between any two of clean, p1, p2, p3, p4, mixed. (mixed is the dataset that contains all the images biased by every pattern). -
Feature ablation study
We have four kinds of features intensity, texture, shape, location. And we turn on either feature and compare the performance with the one that utilizes all of them. -
Number of multiple hypothesis
We can try differentnsegments
, i.e.
nsegments
= [different integers from small to large to inf]nsegments
= [different integers from large to inf]nsegments
= [several same integers1, several same integers2, ..., inf]
#Troubleshooting
-
Complain about treevalc, try navigate to
GeometricContext/src/boosting
and then>> mex treevalc
-
Complain about image file not exist, such as
File "./tmpimsp424511.ppm" does not exist. Error in processSuperpixelImage (line 24) im = imread(fn{f}); Error in msCreateSuperpixels (line 12) imsegs = processSuperpixelImage(outfn);
try
cd EECS556_code/segment/ rm segment make
and test whether
segment
works by./segment 0.1 100 5 test_in.ppm test_out.ppm
#Git Clone Repository Instructions If you have not generated any SSH key for github on your machine, please do so following this tutorial
-
Create a new folder for the repository you are going to clone, and navigate into the folder, eg
$ mkdir EECS556_code $ cd EECS556_code/ $ git init
-
Set up git
$ git remote add origin _SSH_ $ git pull origin master
where
_SSH_
is the SSH clone URL shown on the github repository webpage (near the bottom of the right column, above "Download ZIP"). -
Push to git After you commit any changes, push to git
$ git push origin master