当前位置:网站首页>[yolov5] environment construction: win11 + mx450
[yolov5] environment construction: win11 + mx450
2022-07-28 06:27:00 【I have two candies】
List of articles
1. Computer configuration

2. install cuda and cndua
2.1 CUDA
CUDA(Compute Unified Device Architecture), It's the video card manufacturer NVIDIA The new computing platform . according to GPU Of driver The version download corresponds to CUDA, Can be in NVIDIA Control panel - help - system information - Component driver edition , My version is 11.4
Support 11.4 Of cuda, Can be in https://developer.nvidia.com/cuda-toolkit-archive Download
Be careful ,win10 Version of CUDA And win11 compatible ,PyTorch And CUDA There is a corresponding relationship between , The high version of the CUDA Corresponding to the higher version PyTorch, But higher than 1.10 Version of torch In the training YOLO5 When it comes to P=0, R=0 Of bug, Because it was just installed 10.4 Version of CUDA, Later, it was reinstalled
Direct installation 10.2 Version of CUDA:https://developer.nvidia.com/cuda-10.2-download-archive
Download and install , Can be in Set up - System - system information - Advanced system setup - Two new items are added in the environment variable 
2.2 cuDNN
cuDNN It can speed up the training of the model , Optimize GPU performance , Download directly with CUDA Corresponding version cuDNN that will do :
Unzip after downloading , Put the extracted three folders into CUDA Installation directory C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
such ,CUDA and cuDNN Just install it !
3. download YOLO v5 Source code
stay Github Download the official YOLO v5 Code , If you cannot access it, you can use the image source ,click me
You can look at them carefully README.md file , There are instructions about the environment and operation methods , such as Python Version and dependent library installation :
Clone repo and install requirements.txt in a
Python>=3.7.0environment, includingPyTorch>=1.7.
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
4. Conda Installation and environment creation of
4.1 install Miniconda
conda Can be used to create virtual environments , If you need to run different models , These models have different configuration requirements for the environment , In particular, different models may require different versions of dependent libraries , Reloading the environment is troublesome , Use at this time conda Switch environment like a duck to water !
install Miniconda, Because the local installation is Python3.7, So I downloaded 3.7 Version of ( In this case , Use conda The default virtual environment is Python3.7, You can download other versions according to your needs )
It should be noted that , You need to add environment variables during installation :

Check... After installation environment variable , Refer to the third figure , After installation, enter it on the command line conda, If there is output and no error is reported, the installation is successful !
4.2 install Python Environmental Science
Next use conda Command to create virtual environment , For ease of operation , Let's first enter the decompressed yolov5 Under the table of contents , Then use the following command :
conda create -n yolov5 python=3.7 # establish Python3.7 Of yolov5 A virtual environment
conda activate yolov5 # Activate yolov5 Environmental Science
At this time, we are in yolov5 Environment , Because at this time, it is in the decompressed yolov5 Under the table of contents , You can directly access the files in the directory , According to the official website README Install the dependent libraries according to the prompts of the dependent libraries :
First, according to what you downloaded CUDA, Install the appropriate version of pytorch(CUDA10.2 Download the following version pytorch That's all right. , Other versions of CUDA You can download it on the official website pytorch):

pip install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
next , We turn on yolov5 In the catalog requirements.txt file , Comment out the following two libraries ( Because it has just been installed ):
#torch>=1.7.0
#torchvision>=0.8.1
Then use the following command to install the remaining libraries :
pip install -r requirements.txt # install
thus , The environment is all set up , Let's run it !
At present yolov5 In the environment , Enter the command
python detect.py --source 0
This command uses the trained model to detect the object captured by the camera , Normal operation indicates that the environment is ok , Anyway, mine is ok
4.3 conda command
To this step ,conda You should learn how to use , After creating the environment , Use activate Command to activate an environment , Switch to a specific directory , You can run code with specific environmental requirements .
conda More common commands of are as follows ( Don't take notes when you enter an order ):
conda create --name xxx --clone xxx # clone
conda remove --name <OldName> --all # remove
conda create -n yolov5 python=3.7 # establish Python3.7 Of yolov5 A virtual environment
conda activate yolov5 # Activate yolov5 Environmental Science
conda activate xxxx # Turn on xxxx Environmental Science
conda deactivate # Shut down the environment
conda env list # Show all virtual environments
conda info --envs # Show all virtual environments
REFERENCE
1 . conda command
2 . yolov5
3 . solve YOLOV5 Appear all for nan and 0 The problem of
边栏推荐
- 听说你也在实习|当我采访了几个大三实习生之后。
- (PHP graduation project) based on PHP online travel website management system to obtain
- 简述EMD分解、希尔伯特变换、谱方法
- PLC的整体认识
- Matlab 信号处理
- (PHP graduation project) obtained based on PHP novel website management system
- Trouble encountered in cable testing -- a case study of a manufacturer?
- WebService error maximum message size quota for incoming messages (65536) has been exceeded
- How to pop up the message dialog box
- (PHP graduation project) based on thinkphp5 community property management system
猜你喜欢

The short jumper dsx-8000 test is normal, but the dsx-5000 test has no length display?

How to view the transfer function of the module directly built by Simulink

PLC的选型

(PHP graduation project) based on PHP online travel website management system to obtain

ConNeXt

Ctfshow single dog -- Web

福禄克DTX-1800其配件DTX-CHA002通道适配器CHANNEL更换RJ45插座小记

Low power design isolation cell

Create a basic report using MS chart controls

Cronbach’s α?KMO系数?因子载荷?史上最易懂的问卷信效度分析教程!!!(SPSS和AMOS)
随机推荐
Perl入门学习(十)格式化输出
听说你也在实习|当我采访了几个大三实习生之后。
MAE 掩码自编码是可扩展的学习
npm yarn相关的操作
测量电脑电池容量
Cronbach’s α?KMO系数?因子载荷?史上最易懂的问卷信效度分析教程!!!(SPSS和AMOS)
福禄克DSX2-5000、DSX2-8000模块如何找到校准到期日期?
set_case_analysis
ASP. Net read database bound to treeview recursive mode
福禄克DSX2-5000 网络线缆测试仪为什么每年都要校准一次?
Pycharm2019 set editor theme and default code
What happens when MySQL tables change from compressed tables to ordinary tables
AEM online product promotion conference - Cable certification tester
N positions of bouncing shell
mysql join技巧
福禄克DTX-1800其配件DTX-CHA002通道适配器CHANNEL更换RJ45插座小记
Learning notes on hardware circuit design 2 -- step-down power circuit
Perl入门学习(九)引用
ICC2分析时序的神器 analyze_design_violations
【YOLOv5】环境搭建:Win11 + mx450