-
What is the motivation for this task?I've trained a padim anomaly detector on my own dataset; now I want to deploy it in C#. Describe the solution you'd likeI'd like to get a description of the output structure of onnx model after being executed in C# with Microsoft.ML.OnnxRuntime library. I need to know how can i process the output in order to get the final result as happen making an inference in python. Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hello. The reason that the model is so big are mean tensor and inverse of covariance matrix inside multivariate Gaussian which can become quite large in dimensions: WIth input size of 256x256 they have shape of [100, 4096] and [4096, 100, 100] respectively . With 512x512 they are [100, 16384] and [16384, 100, 100] respectively. Now for pre and post-processing you can refer to OpenVInoInferencer code. You will need to handle resizing, normalization and take care of channel order in preprocessing and then normalization and thresholding in post-processing. And for the structure of output, I it should be just a single anomaly map. Again refer to OpenVinoInferencer (and Inferencer base class) for specifics. |
Beta Was this translation helpful? Give feedback.
-
Hi @blaz-r !! |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for the clarification.
…On Fri, Feb 16, 2024 at 10:33 PM Andrea Tiberti ***@***.***> wrote:
Hi @Dpat123 <https://github.com/Dpat123>,
I didn't call the training scripts from C#. I only run inference using the
ONNX model that I obtained after training with python scripts from
Anomalib. What I did in C# is the pre-processing on the image and the
post-processing -> from the output tensor to the final anomaly-map.
—
Reply to this email directly, view it on GitHub
<#1539 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFCXQ3HVSJG2MZGECHEZPC3YT6GNRAVCNFSM6AAAAABC7YOWBOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DIOJVGA2TE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
--
For SquareOne,
Darshan Patel
M-9879565952
|
Beta Was this translation helpful? Give feedback.
Hello. The reason that the model is so big are mean tensor and inverse of covariance matrix inside multivariate Gaussian which can become quite large in dimensions:
anomalib/src/anomalib/models/components/stats/multi_variate_gaussian.py
Lines 20 to 21 in 1f50c95
WIth input size of 256x256 they have shape of [100, 4096] and [4096, 100, 100] respectively . With 512x512 they are [100, 16384] and [16384, 100, 100] respectively.
Now for pre and post-processing you can refer to OpenVInoInferencer code. You will…