Coder Social home page Coder Social logo

Comments (5)

drcdr avatar drcdr commented on July 23, 2024 5

I've had success in exporting two of the ONNX models provided on the project page; here is a summary:

pre-trained model net-type Converts?
mobilenet-v1-ssd-mp-0_675.pth mb1-ssd Y
mb2-ssd-lite-mp-0_686.pth mb2-ssd-lite Y
vgg16-ssd-mp-0_7726.pth vgg16-ssd N (MaxPool2d ceil issue)
mobilenet_v1_with_relu_69_5.pth mb1-ssd (N: base model)
vgg16_reducedfc vgg16-ssd (N: base model)

To get to this point, I've tweaked each create_xxx_ssd function in convert_to_caffe2_models.py to pass device='cpu', and then pass device=device in the call to SSD (otherwise, there is a GPU/CPU storage mismatch ).

The MaxPool ceil issue is described here: onnx/onnx#549
and is due to this line in vgg.py:
layers += [nn.MaxPool2d(kernel_size=2, stride=2, ceil_mode=True)]
I'm not sure if there is a simple way around this (that maintains the accuracy for these pretrained weights) or not.

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024 1

Hi @YaraAlnaggar , you can only convert ssd models rather than pre-trained imagenet models by using the script in the project.

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

@drcdr thanks for the nice summary and pointing out the issue related to MaxPool2d.

from pytorch-ssd.

ishang3 avatar ishang3 commented on July 23, 2024

@drcdr Do you have resources that show how to parse the onnx output after inference?
I am successfully able to do inference, but not able to understand the output format.

from pytorch-ssd.

drcdr avatar drcdr commented on July 23, 2024

It's been a long time since I looked at this...but if you can be more specific about what you're looking for, I might be able to help (like what command you are executing, what output specifically you are looking at, etc.)

from pytorch-ssd.

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.