Skip to content

Commit

Permalink
Update README for why OpenVINO XAI & known issues (#41)
Browse files Browse the repository at this point in the history
* Update known issues

* Update why ovxai used

* Address review comment
  • Loading branch information
goodsong81 committed Jul 9, 2024
1 parent 1767eef commit 72ae2c7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ MD013: false
# This is not useful for some files such as `CHANGELOG.md`
MD024: false # Multiple headers with the same content

# no-blanks-blockquote Blank line inside blockquote
MD028: false

# blanks-around-fences - Fenced code blocks should be surrounded by blank lines
MD031: false

# blanks-around-lists Lists should be surrounded by blank lines
MD032: false

# I find it necessary to use '<br/>' to force line breaks.
MD033: false # Inline HTML

Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@

### Known Issues

* OpenVINO IR branch insertion not working for models converted directly from torch models in https://github.com/openvinotoolkit/openvino_xai/issues/26
* Runtime error from ONNX / OpenVINO IR models while conversion or inference for XAI in https://github.com/openvinotoolkit/openvino_xai/issues/29
* Models not supported by white box XAI methods in https://github.com/openvinotoolkit/openvino_xai/issues/30

Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ Given **OpenVINO** models and input images, **OpenVINO XAI** generates **salienc
which highlights regions of the interest in the inputs from the models' perspective
to help users understand the reason why the complex AI models output such responses.

Using this package, you can augment the model analysis & explanation feature
on top of the existing OpenVINO inference pipeline with a few lines of code.

```python
import openvino_xai as xai

explainer = xai.Explainer(model=ov_model, task=xai.Task.CLASSIFICATION)

# Existing inference pipeline
for i, image in enumerate(images):
labels = infer(model=ov_model, image=image)

# Model analysis
explanation = explainer(data=image, targets=labels)
explanation.save(dir_path="./xai", name=str(i))
```

---

## Features
Expand Down Expand Up @@ -64,10 +81,13 @@ Most of CNNs and Transformer models from [Pytorch Image Models (timm)](https://g

Please refer to the following known issues for unsupported models and reasons.

* [OpenVINO IR branch insertion not working for models converted directly from torch models with OVC (#26)](https://github.com/openvinotoolkit/openvino_xai/issues/26)
* [Runtime error from ONNX / OpenVINO IR models while conversion or inference for XAI (#29)](https://github.com/openvinotoolkit/openvino_xai/issues/29)
* [Models not supported by white box XAI methods (#30)](https://github.com/openvinotoolkit/openvino_xai/issues/30)

> **_WARNING:_** OpenVINO XAI is fully validated on OpenVINO 2024.2.0. Following issue might be observed if older version of OpenVINO is used.
> * [OpenVINO IR branch insertion not working for models converted directly from torch models with OVC (#26)](https://github.com/openvinotoolkit/openvino_xai/issues/26)
> A simple workaround is to convert Torch models to ONNX models and then convert to OpenVINO models to feed to OpenVINO XAI. Please refer to [the code example](openvino_xai/utils/model_export.py).
> **_NOTE:_** GenAI / LLMs would be also supported incrementally in the upcoming releases.
---
Expand Down
2 changes: 1 addition & 1 deletion tests/intg/test_classification.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2023-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import subprocess
import subprocess # nosec B404 (not a part of product)
from pathlib import Path

import cv2
Expand Down
2 changes: 1 addition & 1 deletion tests/intg/test_detection.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2023-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import subprocess
import subprocess # nosec B404 (not a part of product)
from pathlib import Path

import addict
Expand Down

0 comments on commit 72ae2c7

Please sign in to comment.