当前位置:网站首页>Yolov5 advanced zero environment rapid creation and testing
Yolov5 advanced zero environment rapid creation and testing
2022-06-26 08:59:00 【Parity nonconservative 4.0】
After the traditional image processing course , Neural network is the inevitable choice , Was still in tensorflow Framework applicable yolov2, current v5 It is said that there has been a great leap forward , Each verified click on the website actually provides a large amount of accurate image recognition data to the corresponding company .
build yolo It mainly follows the following steps
1 install anaconda A little , I also installed pycharm Prefer in pycharm Programming .
2 Create an environment , First, create a folder in a hard disk space dedicated to various environments , Used to save the environment , Save scripts and data . I am here D disc pycharm Created under the project folder , How to apply it will be discussed later pycharm.
conda create --prefix=D:/PycharmProjects/yoloV5/yoloV5_env python=3.9
The above command is in yolov5 Under the document , Create a yoloV5_env Save environment , hinder python The version should say , use conda Management is the benefit , Don't go to base Call interpreter , No matter what environment is installed in the future , All of them should correspond to python Put the version interpreter into the environment .
conda activate D:\PycharmProjects\yoloV5\yoloV5_env
Activate this environment , And then install it online , Very fast
pip install yolov5
There should be no errors or warnings during installation , And then in python In the environment import yolov5 and import torch success
Retest cuda, You can't use the graphics card to speed up without installation
torch.cuda.is_available()
False
My computer is a notebook , It's not very useful , I won't discuss it here .
Let's put the environment in pycharm management
open pycharm

Choose carefully conda Environmental Science , interpreter The interpreter will search for unmanaged yoloV5 Environmental Science py3.9 Interpreter
Then it will prompt that this is an existing environment , And then you can do it in pycharm To manage the environment and write programs
Of course, the weight file is missing ,pt Download the files and test images by yourself , It can also be in github Download the yolo Look in the bag .
import yolov5
model = yolov5.load('yolov5s.pt')
img = 'images/zidane.jpg'
results = model(img, augment=True)
predictions = results.pred[0]
boxes = predictions[:, :4] # x1, x2, y1, y2
scores = predictions[:, 4]
categories = predictions[:, 5]
results.show()
The above program can realize the image recognition test 
Although only installed CPU edition , But it is also suitable for ordinary notebooks , And the process is not very simple .
边栏推荐
- docker安装redis
- Yolov5进阶之五GPU环境搭建
- 【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(一)
- 1.25 suggestions and design of machine learning
- 1.Intro_ Math (white board derivation and reprint of station B)
- Whale conference one-stop intelligent conference system helps organizers realize digital conference management
- Segmentation of structured light images using segmentation network
- 框架跳转导致定位失败的解决方法
- 爬虫 对 Get/Post 请求时遇到编码问题的解决方案
- Selenium 搭建 Cookies池 绕过验证反爬登录
猜你喜欢

QT_ AI

Isinstance() function usage

yolov5进阶之零环境快速创建及测试

Simulation of parallel structure using webots

Implementation of ffmpeg audio and video player

滑块验证 - 亲测 (京东)

Data warehouse (1) what is data warehouse and what are the characteristics of data warehouse

爬虫 对 Get/Post 请求时遇到编码问题的解决方案

Whale conference provides digital upgrade scheme for the event site

Yolov5进阶之一摄像头实时采集识别
随机推荐
Remote centralized control of distributed sensor signals using wireless technology
ImportError: ERROR: recursion is detected during loading of “cv2“ binary extensions. Check OpenCV in
Degree of freedom analysis_ nanyangjx
Intra class data member initialization of static const and static constexpr
Yolov5进阶之四训练自己的数据集
How to correctly PIP install pyscipopt
[QNX Hypervisor 2.2用户手册]12.2 术语(二)
9. code generation
Segmentation of structured light images using segmentation network
OpenGL display mat image
commonJS和ES6模块化的区别
Pytorch neural network
【MATLAB GUI】 键盘回调中按键识别符查找表
远程工作的一些命令
Whale conference provides digital upgrade scheme for the event site
Matlab function foundation (directly abandon version)
XSS cross site scripting attack
Matlab drawing checkerboard (camera calibration)
Graduation thesis management system based on SSM
Data warehouse (3) star model and dimension modeling of data warehouse modeling