An image including a first object can be input to a deep neural network trained to detect objects. The deep neural network can output a first feature vector corresponding to the first object. A first distance can be measured from the first feature vector to a feature vector subspace determined using a k-means single value decomposition algorithm on an overcomplete dictionary of feature vectors. The first object can be determined to correspond to an anomaly based on the first distance.