当前位置:网站首页>[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)
[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)
2022-07-07 06:32:00 【Buli catalpa dibuli】
Preface
I also read others' blogs , Hit a lot of holes , It took nearly a morning to deploy . So please be clear before you start Corresponding version ! Please follow the steps step by step . in addition to , Please download by yourself YOLOV5 Extract and save the source code ,GitHub - ultralytics/yolov5: YOLOv5 in PyTorch > ONNX > CoreML > TFLite
One 、Anaconda3 Download and install
Anaconda | The World's Most Popular Data Science Platform Enter official website , Don't download the latest version , Corresponding to the latest version at present Python3.9, The version is too new PyTorch Will also face the problem of updating , It's better to use a lower version !! Upper figure
I downloaded it 2020 year 11 Of the month , Corresponding Python3.8.5 edition , Actually use 2021 year 05 No problem with the version . however Python The version should not be too new ! The installation process is simple , I only have a few important pictures , All the unimportant pictures are dotted Next!! No mistake .
Choose all here , The first represents automatic configuration of environment variables , The second represents the configuration Python3.8 edition . After installation, two options are cancelled ( Oh dear , What does it matter if you don't cancel ? Not affecting use ). thus ,Anaconda installation is complete !
Two 、 utilize Anaconda3 download PyTorch
2.1 Find... In the lower left corner Anaconda Prompt
2.2 establish PyTorch Environmental Science
conda create --name pytorch pyrhon==3.8
Next You also need to manually enter a “y"!!!! Wait for installation
2.3 see pytorch Environment and activate
obviously , except base Environmental Science , There is another one we created ourselves pytorch Environmental Science . Next , Activate pytorch Environmental Science .
conda activate pytorch
After activation , You can see the front base Turned into pytorch The environment .ok, Then let's install pytorch.
2.4 install PyTorch
Start Locally | PyTorch Enter the page and then come here , Select the configuration shown in the figure below ( ah ? Why did you choose CPU ah ? Because I don't have NVIDIA alone , So it doesn't work CUDA, If you have NVIDIA graphics card , Remember to choose CUDA!!) as for CUDA Part I ignored , Because I didn't install it , But I think it should be almost installed .
Copy the red box in the above figure , namely
conda install pytorch torchvision torchaudio cpuonly -c pytorch
In what we have just entered PyTorch Enter in the environment
This process also You need to manually enter a “y"!!! If during your installation Not all downloads succeeded , then Repeat several times This Directive !!
2.5 verification PyTorch Is the installation successful
Activate first pytorch Environmental Science , Reuse python, Second tone torch library , The final output torch Version number of !
import torch
torch.__version__
If you can do this smoothly , You can read Chapter 3 directly . however !!! Not everyone is plain sailing , For example, I , I can enter here Import torch Report errors :No module named "torch"!! I tried many ways , Finally, I changed my mind : Check on pytorch Is it really installed in the environment pytorch.
Enter into pytorch Folder for environment , Enter... In the menu bar cmd
Type again
conda install pytorch torchvision torchaudio cpuonly -c pytorch
then , I'll test it again , It's wrong not to report !
3、 ... and 、 stay PyTorch Install in Opencv
This is an easy step , Enter the first Anaconda Prompt Console , Activate PyTorch Environmental Science , download opencv that will do .
pip install python-opencv
Remember to test after completion opencv
import cv2
cv2.__version__
without . Then it's the same as the end of Chapter 2 , First of all to enter pytorch Environmental Science , Execute it again cv Installation instructions are sufficient .
pip install python-opencv
Four 、PyCharm Environment building
Skip here PyCharm Download and install .
4.1 Open it up and download okay detect.py file
4.2 Set compilation configuration
choice detect.py
4.3 Set interpreter
Here we set the settings in Chapter 2 pytorch frame .
5、 ... and 、 The test results
When everything is ready , Click on the compilation , Miracles happen ! If you appear No module named "XXXXX", Please read on .
And in runs The test results can be seen in the folder ...
6、 ... and 、 Rely on the supplementary installation of the Library
First , stay Anaconda Prompt Active in pytorch Environmental Science
conda activate pytorch
secondly , Install the dependent libraries in turn , What's missing for installation . for example , The lack of pandas library , be :
conda install pandas
边栏推荐
- C language interview to write a function to find the first public string in two strings
- 哈趣投影黑馬之姿,僅用半年强勢突圍千元投影儀市場!
- 693. Travel sequencing
- 缓存在高并发场景下的常见问题
- "Parse" focalloss to solve the problem of data imbalance
- Audio distortion analysis of DSP and DAC based on adau1452
- jmeter 函数助手 — — 随机值、随机字符串、 固定值随机提取
- matlab / ENVI 主成分分析实现及结果分析
- postgresql 数据库 timescaledb 函数time_bucket_gapfill()报错解决及更换 license
- What are the classic database questions in the interview?
猜你喜欢
Doctoral application | Professor Hong Liang, Academy of natural sciences, Shanghai Jiaotong University, enrolls doctoral students in deep learning
港科大&MSRA新研究:关于图像到图像转换,Fine-tuning is all you need
Rk3399 platform development series explanation (WiFi) 5.53, hostapd (WiFi AP mode) configuration file description
屏幕程序用串口无法调试情况
Subghz, lorawan, Nb IOT, Internet of things
ICML 2022 | explore the best architecture and training method of language model
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
Redis (II) - redis General Command
A program lets you understand what static inner classes, local inner classes, and anonymous inner classes are
Haqi projection Black Horse posture, avec seulement six mois de forte pénétration du marché des projecteurs de 1000 yuans!
随机推荐
计算模型 FPS
开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
Redis(二)—Redis通用命令
【解决】Final app status- UNDEFINED, exitCode- 16
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
港科大&MSRA新研究:关于图像到图像转换,Fine-tuning is all you need
软件测试到了35岁,真的就干不动了吗?
为不同类型设备构建应用的三大更新 | 2022 I/O 重点回顾
2022 Android interview essential knowledge points, a comprehensive summary
The difference between string constants and string objects when allocating memory
3428. Put apples
【GNN】图解GNN: A gentle introduction(含视频)
ICML 2022 | explore the best architecture and training method of language model
Talking about reading excel with POI
Knight defeats demon king (Backpack & DP)
ICML 2022 | 探索语言模型的最佳架构和训练方法
Rk3399 platform development series explanation (WiFi) 5.53, hostapd (WiFi AP mode) configuration file description
FlexRay通信协议概述
uniapp开发小程序如何使用微信云托管或云函数进行云开发
A very good JVM interview question article (74 questions and answers)