cvlab-epfl / detecting-the-unexpected

Detecting the Unexpected via Image Resynthesis
Other
56 stars 10 forks source link

Why are buses and trucks detected as anomalies? #18

Closed sikla closed 2 years ago

sikla commented 2 years ago

Hey, when i run the pipeline with the given weights on the cityscapes dataset it seems that all buses and trucks are detected as anomalies. Why is that? Help would be appreciated. Thanks in advance! image

adynathos commented 2 years ago

Buses and trucks in Cityscapes are rare compared to cars or pedestrians.

When generating synthetic anomalies we choose an object and switch its class to a random one. The probabilities of choosing each replacement class are equal. So in the synthetic training set, truck and bus instances are more often coming from this substitution (and are anomalies) than from usual occurrence in the Cityscapes dataset. Hence the detector may learn that bus/truck class is correlated with being an anomaly.

The fix would be to choose synthetic replacement class probability according to the frequency of this class in Cityscapes.

sikla commented 2 years ago

Thanks a lot for your answer!