Skip to content

Commit

Permalink
📃 Updated documentation to add examples for exporting model (#515)
Browse files Browse the repository at this point in the history
Updated documentation to add examples for export model to onnx or openvino
  • Loading branch information
ashishbdatta authored Aug 29, 2022
1 parent ac55462 commit 2a323c8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ where the currently available models are:
- [STFPM](anomalib/models/stfpm)
- [GANomaly](anomalib/models/ganomaly)

## Exporting Model to ONNX or OpenVINO IR

It is possible to export your model to ONNX or OpenVINO IR

If you want to export your PyTorch model to an OpenVINO model, ensure that `export_mode` is set to `"openvino"` in the respective model `config.yaml`.

```yaml
optimization:
export_mode: "openvino" # options: openvino, onnx
```
## Custom Dataset
It is also possible to train on a custom folder dataset. To do so, `data` section in `config.yaml` is to be modified as follows:
Expand Down Expand Up @@ -187,14 +198,6 @@ python tools/inference/lightning_inference.py \
--output results/padim/mvtec/bottle/images
```

If you want to run OpenVINO model, ensure that `openvino` `apply` is set to `True` in the respective model `config.yaml`.

```yaml
optimization:
openvino:
apply: true
```
Example OpenVINO Inference:

```bash
Expand Down

0 comments on commit 2a323c8

Please sign in to comment.