当前位置:网站首页>Yolov5 advanced III training environment
Yolov5 advanced III training environment
2022-06-26 09:00:00 【Parity nonconservative 4.0】
Before training your own samples , First, it is necessary to debug yolov5 The training environment , Before we applied pycharm It was debugged , Actually provided yolov5 It can complete various functions in the command console .
First step , Clean up all folders , Leave only …_env Environment folder . That is to say, it is installed pytorch Environment . Unzip in the environment parallel directory yolov5-master Compressed package , Why decompress parallel directories , Because the default dataset Is in yolov5 Under the parallel directory of .
Just have the above two folders 
Note the environment and current directory in the command console .
python detect.py --source data/images/zidane.jpg --weights yolov5s.pt
Execute the above order distinguish Zidane pictures . This will automatically download yolov5s.pt, If you want to use 5m 5l Just change the command , Enter the palace through the camera , perform
python detect.py --source 0
But pay attention to , Now this camera can't be turned off , Need to be in detect.py Add instructions to , Refer to advanced level 1 .
When the download is complete , The result of identification is ex? See the following figure for the table of contents 
Let's test the training environment , If installed according to the advanced one pytorch Version is the latest version 11, Unfortunately, this version is different from yolov5 6.0 Not very compatible , It is recommended to reduce to a lower version pytorch
Execute the following command
pip install --upgrade --force-reinstall torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0
After downgrade , perform
python train.py --img 640 --batch 16 --epochs 5 --data ./data/coco128.yaml --cfg ./models/yolov5s.yaml --weights yolov5s.pt
Will automatically download coco128, Path and yolomaster parallel , This process still uses yolov5s Weight model , New... Will be generated after training last and best pt Weight model .
During the training, you can see gpu usage , We haven't tested yet gpu edition , Use cpu when gpu_mem Show 0
After training , Will be in runs/ Create one in the directory train Save the weight file in the folder . You can use the new weight file for image detection
python detect.py --weights runs/train/exp/weights/best.pt --source data/images/zidane.jpg```
边栏推荐
- Principle of playing card image segmentation
- Yolov5进阶之一摄像头实时采集识别
- Data warehouse (3) star model and dimension modeling of data warehouse modeling
- [300+ continuous sharing of selected interview questions from large manufacturers] column on interview questions of big data operation and maintenance (I)
- 滑块验证 - 亲测 (京东)
- SRv6----IS-IS扩展
- Use of PCL
- ROS learning notes (6) -- function package encapsulated into Library and called
- [resolved]setonnavigationitemselectedlistener() deprecated
- Leetcode notes: binary search simple advanced
猜你喜欢

Stanford doggo source code study

百度小程序富文本解析工具bdParse

Isinstance() function usage

外部排序和大小堆相关知识

力扣399【除法求值】【并查集】

Section IV HQL execution process

phpcms小程序插件教程网站正式上线

Optimize quiver function in MATLAB to draw arrow diagram or vector diagram (1) -matlab development

Selenium builds cookies pool to bypass authentication and anti crawl login

Mongodb分片环境搭建和验证(redis期末大作业)
随机推荐
力扣399【除法求值】【并查集】
Corn image segmentation count_ nanyangjx
Degree of freedom analysis_ nanyangjx
[QNX Hypervisor 2.2用户手册]12.2 术语(二)
MySQL在服务里找不到(未卸载)
Using MySQL and Qt5 to develop takeout management system (I): environment configuration
Some commands for remote work
Speckle denoising method for ultrasonic image
Drawing with MATLAB (1)
The solution of positioning failure caused by framework jump
1.Intro_ Math (white board derivation and reprint of station B)
Matlab function foundation (directly abandon version)
Uniapp uses uparse to parse the content of the background rich text editor and modify the uparse style
Trimming_ nanyangjx
什么是乐观锁,什么是悲观锁
1.20 study univariate linear regression
How to correctly PIP install pyscipopt
Summary of common instructions for arm assembly
Sublime Text3 common plug-ins
Matlab drawing checkerboard (camera calibration)