当前位置:网站首页>Yolov5进阶之四训练自己的数据集
Yolov5进阶之四训练自己的数据集
2022-06-26 08:32:00 【宇称不守恒4.0】
在前面的准备里,做了环境测试,而且使用labelimg建立了训练集。首先把训练集的图片和标签分别放入 images 和labels文件夹,如下图
放在什么位置主要为了使用 train.py命令时方便
下面配置 yaml文件
# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
train: runs/traindata/images/
val: runs/traindata/images/
# number of classes
nc: 1
# class names
names: ['kn']
存为 A.yaml 我直接放在根目录了
这样就完成了所有准备,可以执行
python train.py --img 640 --batch 50 --epochs 100 --data A.yaml --weights yolov5s.pt --nosave --cache
可以看出,还是使用 yolov5s权重来进行训练。yaml文件的路径注意对应。我训练了10张柯南照片, cpu训练较慢,时间大概为40分钟。
新下载一张图片,放在所需路径,进行识别
python detect.py --weights runs/train/exp2/weights/last.pt --source data/images/kn.jpg

边栏推荐
- keras_ Callback function summary
- Leetcode notes: binary search simple advanced
- 1.27 pytorch learning
- Opencv learning notes II
- Using transformers of hugging face to realize text classification
- Leetcode: array fast and slow pointer method
- 滑块验证 - 亲测 (京东)
- Relationship extraction --r-bert
- Text to SQL model ----irnet
- Speckle denoising method for ultrasonic image
猜你喜欢

SQL learning experience (II): question brushing record

First character that appears only once

XXL job configuration alarm email notification

SOC wireless charging scheme

鲸会务一站式智能会议系统帮助主办方实现数字化会议管理

框架跳转导致定位失败的解决方法

STM32 porting mpu6050/9250 DMP official library (motion_driver_6.12) modifying and porting DMP simple tutorial

static const与static constexpr的类内数据成员初始化

Relationship extraction --tplinker

Whale conference one-stop intelligent conference system helps organizers realize digital conference management
随机推荐
Two ways to realize time format printing
Using transformers of hugging face to realize named entity recognition
pgsql_ UDF01_ jx
[resolved]setonnavigationitemselectedlistener() deprecated
STM32 porting mpu6050/9250 DMP official library (motion_driver_6.12) modifying and porting DMP simple tutorial
Detailed explanation of SOC multi-core startup process
VS2005 project call free() compiled with static libcurl library reported heap error
The best time to buy and sell stocks to get the maximum return
STM32 project design: an e-reader making tutorial based on stm32f4
(2) Buzzer
(3) Dynamic digital tube
Opencv learning notes 3
Corn image segmentation count_ nanyangjx
三菱PLC若想实现以太网无线通讯,需要具备哪些条件?
RecyclerView Item 根据 x,y 坐标得到当前position(位置)
Recovering the system with Clonezilla USB disk
opencv学习笔记二
Bezier curve learning
Using MySQL and Qt5 to develop takeout management system (I): environment configuration
Learn signal integrity from zero (SIPI) - (1)