Open
Description
Describe the bug
Hello,
I have tried to export the pre-trained PADiM
model in OpenVINO format with Post Training Quantization (PTQ) and Accuracy Control Quantization (ACQ).
During execution, I got a ValueError
that says 'ImageBatch' object is not subscriptable
.
Dataset
MVTecAD
Model
PADiM
Steps to reproduce the behavior
- Install
anomalib
usingpip
. - Execute the following command,
AnomalibCLI(
args=[
"export",
"--export_type",
ExportType.OPENVINO,
"--compression_type",
CompressionType.INT8_PTQ,
"--data",
MVTec,
"--data.root",
f"{project_path}/Padim/MVTec
"--data.category",
"dummy",
"--model",
"Padim",
"--default_root_dir",
str(project_path),
"--trainer.max_epochs",
"1",
"--ckpt_path",
f"{project_path}/Padim/MVTec/dummy/v0/weights/lightning/model.ckpt",
],
)
OS information
OS information:
- OS: [e.g. Ubuntu 20.04]
- Python version: [e.g. 3.10.0]
- Anomalib version: [e.g. 0.3.6]
- PyTorch version: [e.g. 1.9.0]
- CUDA/cuDNN version: [e.g. 11.1]
- GPU models and configuration: [e.g. 2x GeForce RTX 3090]
- Any other relevant information: [e.g. I'm using a custom dataset]
Expected behavior
The model should be converted to OpenVINO format with PTQ which can be verified by successful execution.
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
main
Configuration YAML
No Configuration YAML since AnomaliB CLI have been used.
Logs
The error arises from `models/components/base/export_mixin.py`
Code of Conduct
- I agree to follow this project's Code of Conduct