Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ValueError while exporting model in OpenVINO format with PTQ and ACQ #2592

Open
1 task done
srikesh-07 opened this issue Mar 8, 2025 · 0 comments · May be fixed by #2594
Open
1 task done

[Bug]: ValueError while exporting model in OpenVINO format with PTQ and ACQ #2592

srikesh-07 opened this issue Mar 8, 2025 · 0 comments · May be fixed by #2594

Comments

@srikesh-07
Copy link

srikesh-07 commented Mar 8, 2025

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

  1. Install anomalib using pip.
  2. 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
@srikesh-07 srikesh-07 changed the title [Bug]: ValueError while exporting model in OpenVINO format with PTQ [Bug]: ValueError while exporting model in OpenVINO format with PTQ and ACQ Mar 8, 2025
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 a pull request may close this issue.

1 participant