GithubHelp home page GithubHelp logo

onnx files fail to open about opencv_zoo HOT 4 CLOSED

opencv avatar opencv commented on August 30, 2024
onnx files fail to open

from opencv_zoo.

Comments (4)

fengyuentau avatar fengyuentau commented on August 30, 2024 3

@Vincen-31 Your issue, including the one from OP, is all because of the git LFS object not being pulled properly. If you do not install git-lfs when doing git clone, or directly download via the Download ZIP button, the models (git-lfs objects) will not be fetched properly. Typically speaking, a deep learning model is at least several megabytes (one exception in opencv zoo is face_detection_yunet, which is ~330KB), but you can observe that the not-properly-fetched models are always 131B. And if you open those non-properly-fetched models with your text editor, you can see something as follows:

 version https://git-lfs.github.com/spec/v1
 oid sha256:176794409ae5e9d44b268297b1c480ba7f6df9f793a81d22eac4520aaf331594
 size 119815

I can see there are two methods to download models properly:

from opencv_zoo.

dongfeicui avatar dongfeicui commented on August 30, 2024 3

@fengyuentau Thanks for your reply. I have fixed the problem by following your instrction.

from opencv_zoo.

dongfeicui avatar dongfeicui commented on August 30, 2024 1

Actually, I have the similar error.

  1. I have already downloaded the .onnx files by downloading zip and checked the path in demo.py.
  2. I have tried running code with absolute path of .onnx files.
  3. I deploy the object_tracking_dasiamrpn with python 3.6 3.8 and opencv 4.5.4.58 4.6.0.66, but failed.
    Hardware:
    os : ubuntu 18.04 x64
    when I run python demo.py , I get the follow error:

Traceback (most recent call last):
File "demo.py", line 54, in
model = DaSiamRPN(
File "/home/milab/Projects/PycharmProjects/pythonProject/opencv_zoo/models/object_tracking_dasiamrpn/dasiamrpn.py", line 24, in init
self._model = cv.TrackerDaSiamRPN.create(self._param)
cv2.error: OpenCV(4.6.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:260: error: (-210:Unsupported format or combination of formats) Failed to parse ONNX model: object_tracking_dasiamrpn_model_2021nov.onnx in function 'ONNXImporter'
Please help me.

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

I guess you need to install git-lfs to pull lfs objects (.onnx files).

from opencv_zoo.

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.