Image anomaly detection with capsule networks and imbalanced datasets - shubham223601/Anomaly-Detection GitHub Wiki
Referenced from http://arxiv.org/abs/1909.02755
This a supervised approach using capsule network on the imbalanced dataset.
Architecture consist of :
-
Convloutional Layer - Uses 256 kernels of size 9x9 followed by Relu activation
-
Primary Caps - similar as convolutional layer generating output of 1152 vector, which is then fed to squash function for length normalization
-
Routing by Agreement - Each capsule tries to predict the next layer activation based on length and its orientation calculated in above step
-
Digit Caps - output of above step is 10 digit caps, which basically represent the instantiation parameter of each class digit
In order to convert the above architecture for anomaly detection the architecture is modified as below:
10 digits caps, is replaced by 2, one for normal and other for anomalous class. To cope up with class imbalance two approaches are applied:
- reconstruction loss is computed between original and reconstructed image
- vector length difference which uses the length of digit caps vectors as a measure of anomaly