OKMX8MP-C Development Board AI Project Implementation: YOLO Environment Setup
This project is based on the Forlinx Embedded OKMX8MP-C development board, which has a virtual machine ported. It is necessary to install the required packages on the development board and ensure that the board is connected to the network.
01 Logging into the OKMX8MP-C Development Board
Connect the Type-C cable to the Debug port and select eMMC as the boot mode (i.e., set mode selection switch 2 to “on” and all others to “off”). After booting, log in using the root account.
02 Modifying the pip Source
To speed up the installation process, it is necessary to modify the pip source:
mkdir ~/.pip
vim ~/.pip/pip.conf
Add the followings:
[global]
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
03 Installing the Python venv Environment
First, install the python3-venv package:
apt install python3-venv
Once installed successfully, create a directory named yolo (or any name of choice) and enter this directory to set up the Python 3 environment:
Create the yolo directory (the directory name can be taken by yourself), and enter the directory to install the python3 environment:
cd ~
mkdir yolo
cd yolo
python3 -m venv venv
Execute the following figure:
Activate the Python 3 venv environment:
source venv/bin/activate
If activation is successful, it will display the following:
04 Installing Ultralytics
Ultralytics YOLOv8 is based on cutting-edge deep learning and computer vision technologies, offering unparalleled performance in speed and accuracy. Its streamlined design makes it suitable for various applications and easily adaptable to different hardware platforms, from edge devices to cloud API.
To install it, use the following command:
pip3 install ultralytics
Be patient while the installation completes:
Once the installation is successful:
05 Testing the Installation
Use the following command to test the setup. The image link in source can be replaced with another link:
yolo predict model=yolov8n.pt source='https://img95.699pic.com/xsj/18/0w/8f.jpg'
During this process, the model and image will be downloaded, so patience is required.
After successful execution, the results will be generated in the runs/detect/predict* directory. The results can be copied to a Windows computer using the scp command. In the cmd terminal, execute the following command:
scp [email protected]:/root/yolo/runs/detect/predict/8f.jpg E:\\
If the output can be recognized, it indicates that the YOLO environment is functioning correctly.
It is the process of setting up the YOLO environment on the Forlinx Embedded OKMX8MP-C development board. Hope it is useful.