当前位置:网站首页>[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
边栏推荐
- set_false_path
- npm yarn相关的操作
- USB network native driver for esxi updated to support esxi7.0 Update 2
- Transformer self attention mechanism and complete code implementation
- Ctfshow single dog -- Web
- AEM online product promotion conference - Cable certification tester
- Synopsys Multivoltage Flow
- Efficient Net_ V2
- MAE 掩码自编码是可扩展的学习
- PLC的整体认识
猜你喜欢

Redhawk Dynamic Analysis

Trouble encountered in cable testing -- a case study of a manufacturer?

Random life-1

Detailed explanation of creepage distance and electrical clearance

AEM online product promotion conference - Cable certification tester

Synopsys Multivoltage Flow

权重衰减 weight decay

Exploration of Clickhouse aggregation internal mechanism of aggregation

EXFO 730C光时域反射计只有iOLM光眼升级OTDR(开通otdr权限)

CLIP Learning Transferable Visual Models From Natural Language Supervision
随机推荐
CString to char[] function
PyTorch 学习笔记 4 —— 自动计算梯度下降 AUTOGRAD
Example of frameset usage
基于 YOLOV5 的 SAR 图像舰船检测
How to calibrate dsx2-8000? Calibration process?
Fluke fluke aircheck WiFi tester cannot configure file--- Ultimate solution experience
Beta distribution (probability of probability)
雷达成像 Matlab 仿真 3 —— 多目标检测
Transformer 自注意力机制 及完整代码实现
Terminal resistance detailed signal complete series hardware learning notes 7
set_clock_groups
A NOVEL DEEP PARALLEL TIME-SERIES RELATION NETWORK FOR FAULT DIAGNOSIS
浅谈FLUKE光缆认证?何为CFP?何为OFP?
(PHP graduation project) based on PHP Gansu tourism website management system to obtain
set_ false_ path
福禄克DTX-1800其配件DTX-CHA002通道适配器CHANNEL更换RJ45插座小记
Bert bidirectional encoder based on transformer
Talk about the "hybrid mode" of esxi virtual switch and port group
ICC2使用report_placement检查floorplan
IMS-FACNN(Improved Multi-Scale Convolution Neural Network integrated with a Feature Attention Mecha