-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi, About the edge on the pictures, if those are rare in training set, then this is probably causing trouble. So you either need to have more in the training set, or use some preprocessing to avoid this. And the false positives, I'm not too sure about this. Could be many things, but in theory this shouldn't really happen unless the samples are vastly different. I'd say that make sure your train set is diverse enough if you have different kinds of wood, or maybe split by the wood type to avoid big fluctuations. For example Padim works by fitting a multivariate Gaussian on the features extracted from the wood, so in theory, if the image in test set is significantly different in terms of wood color, that would be seen as a great deviation if there wasn't many such cases in train set. For unsupervised methods, this kinds of problem might be quite challenging since the defects seem to be in-distribution. Try using EfficientAD or PatchCore, those two models are quite powerful. Also pay attention to anomaly scores, not only anomaly maps, as those could be more reliable. If the colors of wood are significantly different, maybe also try some augmentations. If nothing of the above works, you could give supervised training a shot, but it doesn't necessarily mean that the results will be better + we don't have any supervised methods in Anomalib so you'd sadly loose quite some useful features by using other methods. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the heads up!
|
Beta Was this translation helpful? Give feedback.
-
Cool, let us know how it goes. Rgearidng the 100k samples, that is really a lot, I think for padim and patchcore that's way too much. EfficientAD should work though, but one epoch would take ages. If there is more kinds wood, it's best to split I think so do tell how that will work. Regarding the supervised approaches, I had supervised anomaly detection in mind, not just classification nets. There are some methods, although I don't know any one (at the moment) that would work that well. Maybe BGAD, but in my experience the masks are quite noisy. |
Beta Was this translation helpful? Give feedback.
-
How do you train your dataset with anomalib? I've tried for a long time to run code with my own dataset and it doesn't work, what parts of the source code have you changed? |
Beta Was this translation helpful? Give feedback.
-
Refer to the docs for a guide on how to train with custom data. It should work without modifying the source code, just make sure your directory structure in dataset is properly formatted and that you have the latest version of Anomalib installed. |
Beta Was this translation helpful? Give feedback.
-
New insights: I trained a Padim (Resnet 18 with 3 layers) for each wood type. This on perfect plates with no anomalies. (so the training is done on different images). Strangly, when I don't provide a abnormal directory, every window is classified as faulty.
That's why I'm using a treshold (0.7) on the confidence score to mark a window as "faulty".
Those are my first results: (the green polygonal lines are my manual annotations of faults on the plates). Those results aren't quite good. So I'm researching what the cause could be. One thing I could think of: Thanks. |
Beta Was this translation helpful? Give feedback.
Hi,
you mention faulty cases for training, so just a heads up from my side would be that these are ignored in unsupervised training.
About the edge on the pictures, if those are rare in training set, then this is probably causing trouble. So you either need to have more in the training set, or use some preprocessing to avoid this.
And the false positives, I'm not too sure about this. Could be many things, but in theory this shouldn't really happen unless the samples are vastly different. I'd say that make sure your train set is diverse enough if you have different kinds of wood, or maybe split by the wood type to avoid big fluctuations. For example Padim works by fitting a multivariate Ga…