Comments (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.
Hi @YaraAlnaggar , you can only convert ssd models rather than pre-trained imagenet models by using the script in the project.
from pytorch-ssd.
@drcdr thanks for the nice summary and pointing out the issue related to MaxPool2d.
from pytorch-ssd.
@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.
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)
- Training doesn't start - I'm getting an error with the data loader HOT 4
- convert_to_caffe2_models.py: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! HOT 2
- SSDSpec for image size smaller than 300 HOT 1
- Re-training SSD-Mobilenet - loss going up and down
- Error using run_ssd_live_demo.py HOT 1
- [Question] what these parameters mean? HOT 2
- base net for mobilenetv3 ssd HOT 1
- ssd-mobilenet to tensorrt
- pytorch模型量化时报错
- Mobilnet-ssdv2 HOT 1
- NAN values in Boxes HOT 1
- How can I train the model without pre-trained weight specified? HOT 1
- runtime error mobillenet-ssd-v2 HOT 5
- run_ssd_example.py box variable type does not mach opencv rectangle and putText functions
- FileNotFoundError: [Errno 2] No such file or directory: 'models/mobilenet_v1_with_relu_69_5.pth'
- cv2.error: OpenCV(4.5.5) : -1 : error: (-5:Bad argument) in function 'rectangle' HOT 1
- Could u add Nesterov momentum in SGD
- 4xgx
- RuntimeError: The size of tensor a (12828) must match the size of tensor b (3000) at non-singleton dimension 1 HOT 3
- ValueError encountered during retraining on Open Images Dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-ssd.