Skip to content

Comments

[DL Streamer] Add Anomaly Post-Processing for PADIM#325

Closed
ekaakurniawan wants to merge 2 commits intoopen-edge-platform:mainfrom
ekaakurniawan:main
Closed

[DL Streamer] Add Anomaly Post-Processing for PADIM#325
ekaakurniawan wants to merge 2 commits intoopen-edge-platform:mainfrom
ekaakurniawan:main

Conversation

@ekaakurniawan
Copy link

Description

Add Anomaly Post-Processing for PADIM

  • Add PADIM threshold normalization.
  • Add PADIM prediction score.

Fixes #303
Reference: https://github.com/open-edge-platform/model_api/blob/0.2.5.1/model_api/cpp/models/src/anomaly_model.cpp

Any Newly Introduced Dependencies

No.

How Has This Been Tested?

Using PADIM model from Geti 2.10.1.

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes.
  • I have not introduced any 3rd party components incompatible with APACHE-2.0.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

 - Add PADIM threshold normalization.
 - Add PADIM prediction score.
@ekaakurniawan
Copy link
Author

@tbujewsk , please help on the two following items:

  • Only tested using PADIM model. Please help to test using Uflow model.
  • PADIM model needs input channel conversion BGR to RGB from the current implementation.

@tbujewsk tbujewsk requested a review from tjanczak June 17, 2025 07:49
@tbujewsk
Copy link
Contributor

@ekaakurniawan I see a lot of regressions testing your PR with PADIM,UFLow models.

@ekurniaw
Copy link

@tbujewsk , let me know if there is anything I can help.

I am currently looking at the following. If reverse_input_channels set to True, the color channel should be BGR. Reference: https://docs.openvino.ai/2025/model-server/ovms_docs_binary_input_layout_and_shape.html

config[KEY_BASE][KEY_MODEL_FORMAT] = reverse_channels ? "RGB" : "BGR";

I will test against the anomaly detection models in Geti. I will use input image with red or blue dominant color to clearly differentiate the output instead of using the image with green dominant color.

 - If reverse channels is false, use RGB instead.
 - Integrate the color conversion to OPENCV flow.
@ekaakurniawan
Copy link
Author

@tbujewsk , please find the the CL that is working for PADIM. cec7971

WARNING: The IE flow is currently reverted to OPENCV flow. The CL may break OPENCV flow. Please let me know if there is a plan to use back IE flow for OpenVINO. I can work on it as well.

GVA_WARNING("'pre-process-backend=ie' not supported with current settings, falling back to "

@ekaakurniawan
Copy link
Author

Closed for now. The pre- and post- processing can be modified based on the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DL Streamer - Geti Anomaly Detection PADIM Inference Result Is Not Correct

3 participants