Skip to content

Error in generation_onnx_models.py onnx test data generation script.  #23508

@Abdurrahheem

Description

@Abdurrahheem

System Information

Hi!

Running python generate_onnx_models.py inside opencv_extra/testdata/dnn/onnx to generate new test models and data results in error

It seem that postprocess_model() function is not located in wrong place

OpenCV python version: 3.8.10
Operating System / Platform: Ubuntu 20.04, focal
Python version: 3.8.10

Detailed description

.
.
.
============== Diagnostic Run torch.onnx.export version 2.0.0+cpu ==============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

slice_opset_11_steps_2d input has sizes torch.Size([6, 6])
slice_opset_11_steps_2d output has sizes torch.Size([2, 2])

============== Diagnostic Run torch.onnx.export version 2.0.0+cpu ==============
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Traceback (most recent call last):
  File "generate_onnx_models.py", line 530, in <module>
    postprocess_model("models/slice_opset_11_steps_2d.onnx", [['height', 'width']])
NameError: name 'postprocess_model' is not defined

Steps to reproduce

Running python generate_onnx_models.py inside opencv_extra/testdata/dnn/onnx to generate new test models and data results in error

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions