Build a YOLOv5-based target detection system from scratch

This blog post builds a target detection system based on the YOLOv5 model from scratch (refer to other blogs of this blogger for the specific system), and completes the environment construction at the nanny level.

(1) First, Windows + R enters the cmd command to open the command window and enter the project directory. This blog post takes the wild animal target detection system as an example (E:\Pyside6_yolov5\yolov5_wild_animal)
insert image description here

(2) Then use the Anaconda toolkit to create a new conda environment, and set the Python version to 3.8 (conda create -n wild python=3.8). After the installation is complete, use the conda activate wild command to enter the virtual environment.
insert image description here

(3) Then install pytorch, use the following command: pip install torch1.9.0+cu111 torch vision0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple
(4) where torch1.9.0+cu111 torch vision0.10.0+cu111 indicates the version of torch and torchvision and the corresponding cuda version, -f https://download.pytorch.org/whl/torch_stable.html indicates downloading from the above URL, -i https://pypi.tuna. tsinghua.edu.cn/simple uses Tsinghua mirror source.
insert image description here
insert image description here

(5) To install other system dependencies, first ensure that the first step has entered the current system directory, and then use the following command to install dependencies: pip install -r requirements.txt -i https://pypi.tuna.tsinghua. edu.cn/simple
insert image description here
insert image description here

(6) To install the pyside6 library and qt_material, use the following command: pip install pyside6==6.4.2 qt_material -i https://pypi.tuna.tsinghua.edu.cn/simple
insert image description here
insert image description here

(7)最后输入python base_camera.py打开软件界面。

insert image description here

Guess you like

Origin blog.csdn.net/sc1434404661/article/details/131988708