Padim is a Patch Distribution Modeling Framework for Anomaly Detection and Localization. And now we can do it with C#.
With the help of PadimSharp, we can train and detect in C# only. We have tested on MVTec.
For example:
The image to detect:
We can get the mask: