SeldonIO / alibi-detect

Algorithms for outlier, adversarial and drift detection
https://docs.seldon.io/projects/alibi-detect/en/stable/
Other
2.21k stars 220 forks source link

X_sample = od.dist_b.sample(n_sample).numpy() is very slow #192

Closed ingbeeedd closed 3 years ago

ingbeeedd commented 3 years ago

Why does this function take long?

jklaise commented 3 years ago

Are you using the PixelCNN model? How big is n_sample and what are the dimensions of the image? In general, since it's an autoregressive model sampling will be slow compared to other generative models.

ingbeeedd commented 3 years ago

@jklaise n_sample=4, dimensions of the image=128x128

Sometimes I think I get caught in an infinite loop. And the question is, the pixelCNN model can't restore the DAGM dataset well, is there a reason?

arnaudvl commented 3 years ago

@ingbeeedd PixelCNN(++) is a likelihood-based method which might not restore the DAGM instances that well since it relies on fine-grained details.

ingbeeedd commented 3 years ago

@arnaudvl

Is pixel-cnn specialized in coarse grain method?

arnaudvl commented 3 years ago

It won't give you the most crisp images with fine attention to detail as seen in your specific dataset so might not be the most appropriate method. Check e.g. the original PixelCNN++ paper samples.