Giter Club home page Giter Club logo

Comments (5)

LaurentBerger avatar LaurentBerger commented on June 5, 2024 3

No error : you must simplify model :

onnxsim model(1).onnx a.sim.onnx
image
opencv onnx importer does not process dynamic shape. You have to substitue w and h

image

python -m onnxruntime.tools.make_dynamic_shape_fixed --dim_param w --dim_value 640 a.sim.onnx a1.onnx

python -m onnxruntime.tools.make_dynamic_shape_fixed --dim_param h --dim_value 480 a1.onnx a2.onnx

then
python

Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2 as cv
>>> x = cv.dnn.readNet("a2.onnx")
>>> import numpy as np
>>> img =  np.zeros((1, 3, 480,640))
>>> x.setInput(img)
>>> w = x.forward()
>>>

from opencv.

LaurentBerger avatar LaurentBerger commented on June 5, 2024 1

This bug should be fixed if possible.

bug fixed

from opencv.

WanliZhong avatar WanliZhong commented on June 5, 2024

This bug should be fixed if possible. dexiened is used to replace hed_pretrained_bsds model for edge detection. Do we have other public onnx models without manual modification for edge detection? Use public model link will save our traffic.

from opencv.

LaurentBerger avatar LaurentBerger commented on June 5, 2024

This bug should be fixed if possible.

#19347 (comment)

from opencv.

WanliZhong avatar WanliZhong commented on June 5, 2024

This bug should be fixed if possible.

#19347 (comment)

OK, Thanks! Replaced model PR is crested #25515

from opencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.