Skip to content

Commit f0b1af4

Browse files
author
lsf
committed
lsf pc update
1 parent fe6e64f commit f0b1af4

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
## Update News
1414

15+
🚀(2024.06.06)支持目标检测算法Yolov10!
16+
17+
🚀(2024.05.23)支持语义分割算法:PaddleSeg中的PP-LiteSeg、MobileSeg,轻量高效,适合部署!
18+
1519
🚀(2023.12.03)支持全景驾驶感知算法 YOLOPv2,Better、Faster、Stronger !
1620

1721
🚀(2023.11.06)支持全景驾驶感知算法 YOLOP !
@@ -28,7 +32,7 @@
2832

2933
## Highlights
3034

31-
- 支持全景驾驶感知 YOLOPv2,目标检测 RT-DETR,Yolo 5/X/7/8 ,多目标跟踪 Bytetrack,单目标跟踪 OSTrack、LightTrack;
35+
- 支持全景驾驶感知 YOLOPv2,目标检测 RT-DETR,Yolov5/X/7/8/10 ,多目标跟踪 Bytetrack,单目标跟踪 OSTrack、LightTrack;
3236
- 预处理和后处理实现CUDA核函数,在 jetson 边缘端也能高性能推理;
3337
- 封装Tensor、Infer,实现内存复用、CPU/GPU 内存自动拷贝、引擎上下文管理、输入输出绑定等;
3438
- 推理过程实现生产者消费者模型,实现预处理和推理的并行化,进一步提升性能;
@@ -75,7 +79,7 @@
7579

7680
2. compile engine
7781

78-
1. 下载 onnx 模型 [google driver](https://drive.google.com/drive/folders/16ZqDaxlWm1aDXQsjsxLS7yFL0YqzHbxT?usp=sharing)
82+
1. 下载 onnx 模型 [google driver](https://drive.google.com/drive/folders/16ZqDaxlWm1aDXQsjsxLS7yFL0YqzHbxT?usp=sharing) 或者按照教程导出,教程在各文件夹READEME
7983

8084
2. ```bash
8185
cd Linfer/workspace
@@ -113,6 +117,9 @@
113117
| yolov8_n | fp16 | 640x640 | 121.94 |
114118
| yolov8_s | fp16 | 640x640 | 81.40 |
115119
| yolov8_l | fp16 | 640x640 | 13 |
120+
| yolov10_n | fp16 | 640x640 | |
121+
| yolov10_s | fp16 | 640x640 | |
122+
| yolov10_l | fp16 | 640x640 | |
116123
| rtdetr_r50 | fp16 | 640x640 | 12 |
117124
| lighttrack | fp16 | 256x256 | 90.91 |
118125
| ostrack | fp16 | 256x256 | 37.04 |

apps/yolo/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
1. 下载源码
164164

165165
```bash
166-
https://github.com/ultralytics/ultralytics.git
166+
git clone https://github.com/ultralytics/ultralytics.git
167167
cd ultralytics
168168
python setup.py develop
169169
```
@@ -180,16 +180,16 @@
180180
3. 修改 ultralytics/engine/exporter.py 如下
181181

182182
```python
183-
# line 313
184-
# dynamic = self.args.dynamic
183+
# line 312
184+
output_names = ["output0", "output1"] if isinstance(self.model, SegmentationModel) else ["output"]
185185
dynamic = True
186186
if dynamic:
187187
dynamic = {'images': {0: 'batch'}} # shape(1,3,640,640)
188188
if isinstance(self.model, SegmentationModel):
189189
dynamic['output0'] = {0: 'batch', 2: 'anchors'} # shape(1, 116, 8400)
190190
dynamic['output1'] = {0: 'batch', 2: 'mask_height', 3: 'mask_width'} # shape(1,32,160,160)
191191
elif isinstance(self.model, DetectionModel):
192-
dynamic['output'] = {0: 'batch', 2: 'anchors'} # shape(1, 84, 8400)
192+
dynamic['output'] = {0: 'batch'} # shape(1, 84, 8400)
193193
```
194194

195195
4. 导出onnx

apps/yolov10/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## YoloV10 export onnx
2+
3+
1. 下载源码
4+
5+
```bash
6+
git clone https://github.com/THU-MIG/yolov10
7+
cd yolov10
8+
pip install -e .
9+
```
10+
11+
2. 修改 ultralytics/engine/exporter.py 如下
12+
13+
```python
14+
# line 369
15+
output_names = ["output0", "output1"] if isinstance(self.model, SegmentationModel) else ["output"]
16+
dynamic = True
17+
if dynamic:
18+
dynamic = {'images': {0: 'batch'}}
19+
if isinstance(self.model, SegmentationModel):
20+
dynamic['output0'] = {0: 'batch', 2: 'anchors'}
21+
dynamic['output1'] = {0: 'batch', 2: 'mask_height', 3: 'mask_width'}
22+
elif isinstance(self.model, DetectionModel):
23+
dynamic['output'] = {0: 'batch'}
24+
```
25+
26+
3. 导出onnx
27+
28+
```bash
29+
yolo export model=yolov10s.pt format=onnx
30+
```
31+
32+
33+

0 commit comments

Comments
 (0)