当前位置:网站首页>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 .
边栏推荐
- Tensor
- WBC learning notes (I): manually push WBC formula
- 【MATLAB GUI】 键盘回调中按键识别符查找表
- QT_ AI
- 框架跳转导致定位失败的解决方法
- Solution to the encoding problem encountered by the crawler when requesting get/post
- Corn image segmentation count_ nanyangjx
- Whale conference one-stop intelligent conference system helps organizers realize digital conference management
- 小程序首页加载之前加载其他相关资源或配置(小程序的promise应用)
- 远程工作的一些命令
猜你喜欢

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

Isinstance() function usage

Stanford doggo source code study

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

Whale conference one-stop intelligent conference system helps organizers realize digital conference management

Drawing with MATLAB (1)

Implementation of ffmpeg audio and video player

修复小程序富文本组件不支持video视频封面、autoplay、controls等属性问题

Yolov5进阶之一摄像头实时采集识别

Regular Expression 正则表达式
随机推荐
深度学习论文阅读目标检测篇(七)中文版:YOLOv4《Optimal Speed and Accuracy of Object Detection》
Corn image segmentation count_ nanyangjx
Speckle denoising method for ultrasonic image
【云原生 | Kubernetes篇】深入万物基础-容器(五)
Data warehouse (1) what is data warehouse and what are the characteristics of data warehouse
[IVI] 15.1.2 system stability optimization (lmkd Ⅱ) psi pressure stall information
1.20 study univariate linear regression
How to correctly PIP install pyscipopt
Autoregressive model of Lantern Festival
如何利用最少的钱,快速打开淘宝流量入口?
爬虫 对 Get/Post 请求时遇到编码问题的解决方案
直播回顾 | smardaten李鸿飞解读中国低/无代码行业研究报告:风向变了
Partial summary of 45 lectures on geek time MySQL
Matlab drawing checkerboard (camera calibration)
Summary of common instructions for arm assembly
commonJS和ES6模块化的区别
Data warehouse (3) star model and dimension modeling of data warehouse modeling
关于小程序tabbar不支持传参的处理办法
1.27 pytorch learning
Nebula diagram_ Object detection and measurement_ nanyangjx