This is done as a part of my Analytics IV module. This is based on the papers ANOMALY DETECTION USING ONE-CLASS NEURAL NETWORKS and Sliced-Wasserstein Autoencoder: An Embarrassingly Simple Generative Model.
Though I am getting a good accuracy purely on the basis of Autoencoder alone, a lot more needs to be done in order to improve the accuracy of OCNN.
Autoencoder training was based on the implementations here and OCNN was based on the implementations here
The datasets chosen were the concrete crack datasets downloaded from here
-
Positive data extraction is documented here while the negative data extraction is documented here
-
Separate folders were created for the positively and negatively labelled samples
-
The data were resized and normalized based on the model requirements as documented here and here
-
8 different models were trained and were named as Model I, Model II, Model III, Model IV, Modev V, Model VI, Model VII and Model VIII
-
The validation data were encoded and decoded for evaluation purposes
-
These models were compared and evaluated using MSE, AUROC, Precision, Recall, Confusion Matrix, Accuracy Score and Classification Report
-
The encoded features of the best performing model(Model VII) across both balanced and biased datasets were chosen for further classification tasks using OCNN
-
2 OCNN Models were trained and evaluated on balanced and imbalanced data, 1 with original features retained from the pre-trained Autoencoder model(documented here) and 1 with pre-trained features halved by PCA(documented here)
All the raw data, processed data and pre-trained models can be found here.