-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Guillaume Lemaitre
committed
Apr 18, 2016
1 parent
271f68a
commit 23c2541
Showing
28 changed files
with
182 additions
and
4,118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,115 @@ | ||
Classification of SD-OCT volumes for DME detection: an anomaly detection approach | ||
================================================================================= | ||
|
||
S. Sankar, D. Sidibé, C. Y. Cheung, T. Y. Wong, E. Lamoureux, D. Milea, F. Meriaudeau, “Classification of SD-OCT volumes for DME detection: an anomaly detection approach”, SPIE Medical Imaging 2016, San Diego, USA. | ||
``` | ||
@proceeding{sankar2016classification, | ||
author = {Sankar, S. and Sidib\'{e}, D. and Cheung, Y. and Wong, T. Y. and Lamoureux, E. and Milea, D. and Meriaudeau, F.}, | ||
title = {Classification of SD-OCT volumes for DME detection: an anomaly detection approach}, | ||
journal = {Proc. SPIE}, | ||
volume = {9785}, | ||
pages = {97852O-97852O-6}, | ||
year = {2016} | ||
} | ||
``` | ||
|
||
How to use the pipeline? | ||
------- | ||
|
||
### Pre-processing pipeline | ||
|
||
The follwoing pre-processing routines were applied: | ||
|
||
- Flattening, | ||
- Cropping. | ||
|
||
#### Data variables | ||
|
||
In the file `pipeline/feature-preprocessing/pipeline_preprocessing.m`, you need to set the following variables: | ||
|
||
- `data_directory`: this directory contains the orignal SD-OCT volume. The format used was `.img`. | ||
- `store_directory`: this directory corresponds to the place where the resulting data will be stored. The format used was `.mat`. | ||
|
||
#### Algorithm variables | ||
|
||
The variables which are not indicated in the inital publication and that can be changed are: | ||
|
||
- `x_size`, `y_size`, `z_size`: the original size of the SD-OCT volume. It is needed to open `.img` file. | ||
- `kernelratio`, `windowratio`, `filterstrength`: the NLM parameters. | ||
- `h_over_rpe`, `h_under_rpe`, `width_crop`: the different variables driving the cropping. | ||
- `thres_method`, `thres_val`: method to threshold and its associated value to binarize the image. | ||
- `gpu_enable`: method to enable GPU. | ||
- `median_sz`: size of the kernel when applying the median filter. | ||
- `se_op`, `se_cl`: size of the kernel when applying the closing and opening operations. | ||
|
||
#### Run the pipeline | ||
|
||
From the root directory, launch MATLAB and run: | ||
|
||
``` | ||
>> run pipeline/feature-preprocessing/pipeline_preprocessing.m | ||
``` | ||
|
||
### Extraction pipeline | ||
|
||
For this pipeline, the following features were extracted: | ||
|
||
- PCA on vectorized B-scans. | ||
|
||
#### Data variables | ||
|
||
In the file `pipeline/feature-extraction/pipeline_extraction.m`, you need to set the following variables: | ||
|
||
- `data_directory`: this directory contains the pre-processed SD-OCT volume. The format used was `.mat`. | ||
- `store_directory`: this directory corresponds to the place where the resulting data will be stored. The format used was `.mat`. | ||
- `pca_compoments`: this the number of components to keep when reducing the dimension by PCA. | ||
|
||
#### Run the pipeline | ||
|
||
From the root directory, launch MATLAB and run: | ||
|
||
``` | ||
>> run pipeline/feature-extraction/pipeline_extraction.m | ||
``` | ||
|
||
### Classification pipeline | ||
|
||
The method for classification used was: | ||
|
||
- GMM modelling. | ||
|
||
#### Data variables | ||
|
||
In the file `pipeline/feature-preprocessing/pipeline_classifier.m`, you need to set the following variables: | ||
|
||
- `data_directory`: this directory contains the feature extracted from the SD-OCT volumes. The format used was `.mat`. | ||
- `store_directory`: this directory corresponds to the place where the resulting data will be stored. The format used was `.mat`. | ||
- `gt_file`: this is the file containing the label for each volume. You will have to make your own strategy. | ||
- `gmm_k`: this is the number of mixture components of the GMM. | ||
- `pca_components`: this is the number of components of the PCA used in the extraction. | ||
- `mahal_thresh`: the treshold to use to consider a B-scan as abnormal or not. | ||
- `n_slices_thres`: the minimum number of abnormal slices to consider the volume as DME. | ||
|
||
#### Run the pipeline | ||
|
||
From the root directory, launch MATLAB and run: | ||
|
||
``` | ||
>> run pipeline/feature-classification/pipeline_classifier.m | ||
``` | ||
|
||
### Validation pipeline | ||
|
||
#### Data variables | ||
|
||
In the file `pipeline/feature-validation/pipeline_validation.m`, you need to set the following variables: | ||
|
||
- `data_directory`: this directory contains the classification results. The format used was `.mat`. | ||
- `gt_file`: this is the file containing the label for each volume. You will have to make your own strategy. | ||
|
||
#### Run the pipeline | ||
|
||
From the root directory, launch MATLAB and run: | ||
|
||
``` | ||
>> run pipeline/feature-validation/pipeline_validation.m | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
clear all; | ||
close all; | ||
clc; | ||
|
||
% Execute the setup for protoclass matlab | ||
run('../../../../third-party/protoclass_matlab/setup.m'); | ||
|
||
% Refer to the classification pipeline to know how the testing set | ||
% was created | ||
% Location of the ground-truth | ||
gt_file = '/data/retinopathy/OCT/SERI/data.xls'; | ||
|
||
% Load the csv data | ||
[~, ~, raw_data] = xlsread(gt_file); | ||
% Extract the information from the raw data | ||
% Store the filename inside a cell | ||
filename = { raw_data{ 2:end, 1} }; | ||
% Store the label information into a vector | ||
data_label = [ raw_data{ 2:end, 2 } ]; | ||
% Get the index of positive and negative class | ||
idx_class_pos = find( data_label == 1 ); | ||
idx_class_neg = find( data_label == -1 ); | ||
|
||
gt_label = []; | ||
% We gan create the GT labels | ||
for idx_cv_lpo = 1:length(idx_class_pos) | ||
% Concatenate the value as in the classification pipeline | ||
gt_label = [ gt_label 1 -1 ]; | ||
end | ||
|
||
% Load the results data | ||
results_filename = ['/data/retinopathy/OCT/SERI/results/' ... | ||
'sankar_2016/predicition.mat']; | ||
load(results_filename); | ||
|
||
% Linearize the vector loaded | ||
pred_label = pred_label_cv'; | ||
pred_label = pred_label(:); | ||
|
||
% Get the statistic | ||
[ sens, spec, prec, npv, acc, f1s, mcc, gmean, cm ] = metric_confusion_matrix( ... | ||
pred_label, gt_label ); | ||
|
||
% Display the information | ||
disp( ['Sensitivity: ', num2str(sens)] ); | ||
disp( ['Specificity: ', num2str(spec)] ); | ||
disp( ['Precision: ', num2str(prec)] ); | ||
disp( ['Negative Predictive Value: ', num2str(npv)] ); | ||
disp( ['Accuracy: ', num2str(acc)] ); | ||
disp( ['F1-score: ', num2str(f1s)] ); | ||
disp( ['Matthew Correlation Coefficiant: ', num2str(mcc)] ); | ||
disp( ['Geometric Mean: ', num2str(gmean)] ); |
Oops, something went wrong.