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

Patchcore & Fastflow onnx/ov export fails #631

Closed
pmudgal-Intel opened this issue Oct 13, 2022 · 5 comments · Fixed by #1267
Closed

Patchcore & Fastflow onnx/ov export fails #631

pmudgal-Intel opened this issue Oct 13, 2022 · 5 comments · Fixed by #1267

Comments

@pmudgal-Intel
Copy link
Contributor

Describe the bug
Training patchcore or fastflow model fails if export is configured as "Openvino"
python tools/train.py --config anomalib/models/patchcore/config.yaml
In anomalib/models/patchcore/config.yaml file, change export option as "openvino"

Screenshot is attached showing the error. Seems like model is getting trained, but fails to export as onnx.
torch version - 1.11.0+cu102

Screenshots

image

Hardware and Software Configuration

  • OS: [Ubuntu, 20.04]
  • NVIDIA Driver Version [470.141.03]
  • CUDA Version [e.g. 10.2]
  • CUDNN Version [e.g. V10.2.89]
  • OpenVINO Version [Optional e.g.v2022.1.0]
@ashwinvaidya17
Copy link
Collaborator

@pmudgal-Intel can you have a look at this issue #440? You need to either upgrade torch to 1.12 or replace the cdist operator. Let us know if this works.

@samet-akcay
Copy link
Contributor

@ashwinvaidya17, should we consider replacing cdist by default?

@ashwinvaidya17
Copy link
Collaborator

Since this is a recurring question I think it makes sense to replace the function. We can explore the performance difference first.

@pmudgal-Intel
Copy link
Contributor Author

Patchcore works fine with torch 1.12, but fastflow still shows same error during export.

@samet-akcay
Copy link
Contributor

With the latest anomalib version, PatchCore and FastFlow models can be converted to ONNX and OpenVINO models. I'm now closing this issue. Thanks!

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.

3 participants