当前位置:网站首页>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

边栏推荐
- [unity mirror] use of networkteam
- 多台三菱PLC如何实现无线以太网高速通讯?
- Matlab drawing checkerboard (camera calibration)
- 1.21 study gradient descent and normal equation
- Koa_ mySQL_ Integration of TS
- 批量执行SQL文件
- Detailed process of generating URDF file from SW model
- Deploy wiki system Wiki in kubesphere JS and enable Chinese full-text retrieval
- 1.25 suggestions and design of machine learning
- XSS 跨站脚本攻击
猜你喜欢

Bezier curve learning

Matlab drawing checkerboard (camera calibration)

Simulation of parallel structure using webots

Nebula diagram_ Object detection and measurement_ nanyangjx

Exploration of webots and ROS joint simulation (I): software installation

73b2d wireless charging and receiving chip scheme

STM32 project design: temperature, humidity and air quality alarm, sharing source code and PCB

利用无线技术实现分散传感器信号远程集中控制

Reverse crawling verification code identification login (OCR character recognition)

Exploration of webots and ROS joint simulation (II): model import
随机推荐
Speckle denoising method for ultrasonic image
Stream analysis of hevc learning
opencv学习笔记三
框架跳转导致定位失败的解决方法
VS2005 compiles libcurl to normaliz Solution of Lib missing
opencv学习笔记二
Apple motherboard decoding chip, lightning Apple motherboard decoding I.C
软件工程-个人作业-提问回顾与个人总结
Installation of jupyter
Intra class data member initialization of static const and static constexpr
Comparison between Apple Wireless charging scheme and 5W wireless charging scheme
Detailed explanation of self attention & transformer
Install Anaconda + NVIDIA graphics card driver + pytorch under win10_ gpu
多台三菱PLC如何实现无线以太网高速通讯?
WBC learning notes (I): manually push WBC formula
isinstance()函数用法
Reverse crawling verification code identification login (OCR character recognition)
Principle of playing card image segmentation
Tensorboard
QT_ AI