A Simple Way to Detect Anomaly

— Implementation —

Second, we can use pre-trained models as feature representations to transform images into a better feature space.

figure 2. clustering examples from Scikit Learn documentation.

reshape_x: according to Keras’s VGG pre-trained model, the minimum size of images is 30 * 30, so we have to resize our images and transform them into 3-channel images.

— Result —

the output of svdd_part6.py

visualization of output, the score is negative since the output of score_samples is log-likelihood.
These are predictions of ‘1’. the first row is an incorrect prediction. The second row is correct predictions.
These are predictions of ‘7’. the first row is an incorrect prediction. The second row is correct predictions.

— Reference—

[1] ICML 2018 Paper Deep One-Class Classification

[2] Scikit Learn documentation

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top