Comments (15)
need to export onnx model,please integrated them into this repo quickly!
from yolov9.
#20 should fix this 👍 (+ converted models can be found here)
from yolov9.
Hello!!
Fix the error shape = tuple((y[0] if isinstance(y, tuple) else y).shape) # model output shape
AttributeError: 'list' object has no attribute 'shape' "
Passing y directly to shape=y
y is a tuple but y[0] is a list. And this list has no .shape.
My export looked like this:
!python export.py --weights /content/drive/MyDrive/IAGeneration/Yolov9/yolov9/runs/train/exp3/weights/best.pt
--batch-size 1 --imgsz 640 --include torchscript onnx
My best.pt has 133.47 M
While my best.onnx has 262.22 M.
Is this normal?
The inference worked with:
!python detect.py --data /Yolov9/projdocyolov9red.yaml --weight best.onnx --conf 0.50 --source /data/imgs --device 0 --save-txt
But it took about 3 minutes to detect 100 images. This is normal?
from yolov9.
The re-parameterization functions are provided in yolov7 repo, but currently we have not integrated them into this repo.
from yolov9.
I can confirm that @xenova exports work
from yolov9.
Export functions are not yet supported. The models should do re-parameterization first, then do export.
from yolov9.
how to re-parameterization?
from yolov9.
how to tensorrt forward? I need to export to onnx,then tensorrt.
from yolov9.
need to export onnx model,please integrated them into this repo quickly!
Modify this code "if isinstance(m, (Detect, V6Detect))" to "if isinstance(m, (Detect, DualDDetect))" ,and you can get the onnx
from yolov9.
need to export onnx model,please integrated them into this repo quickly!
Modify this code "if isinstance(m, (Detect, V6Detect))" to "if isinstance(m, (Detect, DualDDetect))" ,and you can get the onnx
I don't think that really works
from yolov9.
need to export onnx model,please integrated them into this repo quickly!
Modify this code "if isinstance(m, (Detect, V6Detect))" to "if isinstance(m, (Detect, DualDDetect))" ,and you can get the onnx
I don't think that really works
This solution works for me.I have completed the ONNX export, as well as inference with TRT and ONNX Runtime (ORT).Furthermore, the ONNX used by TRT includes an NMS node.
from yolov9.
@xenova's solution works
from yolov9.
(修改代码 “if isinstance(m, (Detect, V6Detect))” 改为 “if isinstance(m, (Detect, DualDDetect))” ,就可以得到 onnx)在进行如下修改后又得到一个新问题
Fusing layers...
Model summary: 724 layers, 51141120 parameters, 0 gradients, 238.7 GFLOPs
Traceback (most recent call last):
File "export.py", line 607, in
main(opt)
File "export.py", line 602, in main
run(**vars(opt))
File "/home/mouxing/anaconda3/envs/V8/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "export.py", line 507, in run
shape = tuple((y[0] if isinstance(y, tuple) else y).shape) # model output shape
AttributeError: 'list' object has no attribute 'shape'
from yolov9.
You can found how to export onnx model with the following
https://github.com/AICVer/yolov9.infer
from yolov9.
@xinsuinizhuan I used it:
https://github.com/thaitc-hust/yolov9-tensorrt
I also first transfer weights.pt to ONNX with the NMS module, and then transfer to TensorRT Engine for inference.
from yolov9.
Related Issues (20)
- question about val.py HOT 1
- about wandb HOT 1
- TensorRT - End2End support for Object Detection and Instance Segmentation
- save-period or save_period ? HOT 1
- Exporting predicted images
- Training with a npy file HOT 2
- Couldn't find YOLOv9-S and YOLOV9-T weights? HOT 3
- with aux branch or without aux branch HOT 1
- Doesn't the author seem to use the Adown module in yolov9upose?
- P,R,mAP50 and mAP50-95 is all 0 HOT 3
- Attention mechanism
- Reproduced GELAN-S (similar to YOLOv9-S without PGI trick) HOT 5
- YOLOv9 Speed estimation HOT 1
- A question about utils\general.py: prediction[0] or prediction[0][0]? HOT 1
- 3090正常运行,换成4090 读取数据的时候就开始报超时错误! HOT 2
- About batchsize HOT 8
- pycocotools unable to run: [Errno 2] No such file or directory: '/yolov9/annotations/instances_val2017.json'
- When training YOLOv9 to segment a specific category, you may encounter an error.
- Can it be used for rotating target detection?
- Can it be used for rotating target detection? 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 yolov9.