Teach you how to write a self-aiming program based on AI machine vision based on 0 basics -- the self-aiming program of King Glory Baili's promise, a tutorial that even the silly X in my village can learn!

Take a look at my effect video at Station B

Glory of Kings-Baili Keeping a Promise-AI Assisted Self-Aiming Research

summary:YoLo target detection framework PaddleDetection machine learning framework

I won’t introduce the above framework anymore, let’s go straight to the topic:

The following tutorial is based on the Windows10+ system environment, and Win7 should not work well.

Considering that most students are relatively poor, by default you don't have a GPU and use CPU calculations. Although it will be slow and stuck, but it can run. When you have a GPU, the tutorials are the same, just change the environment to the GPU environment.

Install Anaconda first, which is an artifact for switching the python environment!
Borrow the Anaconda installation tutorial here
. Now you are safe. Open cmd and directly enter conda to see if there is any command output. If not, it means that you did not add Anaconda to the path system variable. Or you can find and open anaconda Prompt (Anaconda3) in the start menu, and you can see (base) at the top, indicating that the current basic default environment is (base). Let's create the environment we want first.
Input: conda create -n paddle python=3.8
Then all the way y
is installed, we now have a python3.8 environment, and now we need to switch to this environment.
Input: conda activate paddleSwitch to paddle environment.
Let's start installing the paddle framework.

Open the official website of Feijiang , enter on our black window

python -m pip install paddlepaddle==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

Ok now we have the paddle frame. It's time to install the paddle-based paddle detection target detection framework.
Before that let's install the other necessary stuff.

pip install Cython
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

Now we start the installation:

Select a folder to download PaddleDetection

The first way: download directly from the github official website:

https://github.com/PaddlePaddle/PaddleDetection

insert image description here

The second way: use git to download:

git clone https://github.com/PaddlePaddle/PaddleDetection.git

Install other required Python dependencies

The dependent library documentation is given in requirements.txt, you can use

pip install -r requirements.txt

As shown in the figure below is the content in the requirements.txt document.
insert image description here

The picture shows the content in the requirements file, and the ones shown in the picture are all the dependent libraries of PaddleDetection.
insert image description here

Type "cmd" in the content shown in the figure below, and then the command prompt in the path will appear.

insert image description here

Activate the environment, and pip install -r requirements.txt
insert image description here

then run
insert image description here

When it displays Successfully... , it basically means that the installation is complete, whether it is successful or not, and the next test verification

Test to verify that the framework was successfully installed

Enter python ppdet/modeling/tests/test_architectures.py
and the code shown in the figure will appear, indicating that the operation is successful.
insert image description here

Ok, now that our preparatory work has been completed, we can start the next step, directly uploading the code! Take a look at my effect video at Station B

Glory of Kings - Baili Keeping a Promise - Research on AI-assisted Self-aiming
(to be continued)

おすすめ

転載: blog.csdn.net/qian913761489/article/details/130932070