mirror of
https://github.com/Karllzy/cotton_color.git
synced 2025-11-08 18:53:53 +00:00
更新README
This commit is contained in:
parent
5e232a8924
commit
ff819e341a
BIN
YOLO/README.assets/1.png
Normal file
BIN
YOLO/README.assets/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
BIN
YOLO/README.assets/image-20241113133535978.png
Normal file
BIN
YOLO/README.assets/image-20241113133535978.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
YOLO/README.assets/image-20241113133825646.png
Normal file
BIN
YOLO/README.assets/image-20241113133825646.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
YOLO/README.assets/image-20241113133840896.png
Normal file
BIN
YOLO/README.assets/image-20241113133840896.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
YOLO/README.assets/image-20241113133850391.png
Normal file
BIN
YOLO/README.assets/image-20241113133850391.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
68
YOLO/README.md
Normal file
68
YOLO/README.md
Normal file
@ -0,0 +1,68 @@
|
||||
# YOLO调试记录
|
||||
|
||||
## data 数据yaml文件配置
|
||||
|
||||
```python
|
||||
path: ../datasets/dimo4
|
||||
train: D:\yolov5-master\datasets\dimo4\images\train
|
||||
val: D:\yolov5-master\datasets\dimo4\images\val
|
||||
test: # test images (optional)
|
||||
# Classes
|
||||
names:
|
||||
0: dimo
|
||||
```
|
||||
|
||||
## 模型导出
|
||||
|
||||
### 命令行形式
|
||||
|
||||
```bash
|
||||
python export.py --weights runs/train/exp4/weights/best.pt --img 640 --batch 1 --device 0 --include onnx --opset 15
|
||||
```
|
||||
|
||||
weights地址: runs/train/exp4/weights/xxx.pt 路径中的模型为pt文件
|
||||
|
||||
在detect.py中batch为1 batch在detect中不能更改
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### PyCharm配置
|
||||
|
||||
##### export.py
|
||||
|
||||
```bash
|
||||
--weights
|
||||
runs/train/exp4/weights/best.pt
|
||||
--img
|
||||
640
|
||||
--device0
|
||||
--include
|
||||
onnx
|
||||
--opset
|
||||
15
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 模型加载
|
||||
|
||||
```bash
|
||||
--weights
|
||||
runs\train\exp4\weights\best.onnx
|
||||
--data
|
||||
D:\yolov5-master\data\dimo4.yaml
|
||||
```
|
||||
|
||||
在detect.py中
|
||||
|
||||
输入的模型为在train.py中训练好的模型 :地址: runs/train/exp4/weights/xxx.pt
|
||||
|
||||
或者 :runs/train/exp4/weights/xxx.onnx
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
Loading…
Reference in New Issue
Block a user