OrangePi Kunpeng Pro —— Continuing the Innovation
1. Introduction
Recently, I received an invitation from CSDN to conduct an in-depth evaluation of the OrangePi Kunpeng Pro. I am grateful for the development board sent by CSDN. As an AI developer, I have previously focused on supporting the innovation and technology field. I have used development boards from companies such as Cambricon, Ascend, and Rockchip. This time, I received the new OrangePi Kunpeng Pro development board and am very excited. I have decided to conduct a series of detailed evaluations. Through this trial, I hope to gain a deep understanding of the performance and application potential of this development board and share my development experience and insights.
1.1 Unboxing
Power-on example image, with the charging cable configured:
System opening interface image, using the open source OpenEuler system, connected to WIFI:
2. Hardware Introduction
2.1 Hardware Specifications
The OrangePi Kunpeng Pro is a high-performance development board based on the ARM architecture, equipped with a powerful processor and rich interfaces, suitable for applications such as the Internet of Things, smart home, and robotics. Its main features include:
- High-performance processor: Uses a 4-core 64-bit processor + AI processor, integrated graphics processor, supports 8TOPS AI computing power, has 8GB/16GB LPDDR4X, can connect to 32GB/64GB/128GB/256GB eMMC modules, supports dual 4K high-definition output. The received OrangePi Kunpeng Pro is 8GB+32GB.
- Rich interfaces, including two HDMI outputs, GPIO interfaces, Type-C power interface, supports SATA/NVMe SSD 2280 M.2 slot, TF slot, gigabit Ethernet port, two USB3.0, one USB Type-C 3.0, one Micro USB (serial port debugging function), two MIPI cameras, one MIPI screen, and a reserved battery interface.
- Supports innovation and technology: Supports the openEuler operating system, pre-installed by default;
- AI inference capability: Meets most AI algorithm prototype verification and inference application development needs, while providing more efficient computing power for various application scenarios, such as cloud computing, big data, distributed storage, and high-performance computing.
2.2 Hardware List
| Name | Type |
|---|---|
| Processor | 4-core 64-bit Arm processor (Kunpeng) |
| Memory | Type: LPDDR4X Capacity: 8GB or 16GB |
| Storage | Onboard 32MB SPI Flash Micro SD card slot eMMC socket: can connect to eMMC module M.2 M-Key interface: can connect to 2280 specification NVMe SSD or SATA SSD |
| Ethernet | Supports 10/100/1000 Mbps - Onboard PHY chip: RTL8211F |
| Wi-Fi+Bluetooth | Supports 2.4G and 5G dual-band Wi-Fi - BT4.2 Module: Oukeshi 6221 BUUC |
| USB | 2 USB3.0 Host interfaces 1 Type-C interface (only supports USB3.0, does not support USB2.0) |
| Camera | 2 MIPI CSI 2 Lane interfaces |
| Display | 2 HDMI interfaces 1 MIPI DSI 2 Lane interface |
| Audio | 1 3.5mm headphone jack, supports audio input and output |
3. Network Testing
3.1 Wired Connection
Connect to the local network cable, log in via ssh:
ssh openEuler@192.168.x.x
After successful login, check the assigned network address via ifconfig:
ifconfig
3.2 WIFI Connection
Check nearby hotspots information:
nmcli dev wifi
4. Check System Configuration
lacpu
# Check memory information
free -h
## Check
lsblk
## Check npu
npu-smi info
### Found an issue with the npu driver initialization, will be updated later;
5. Install Common Software
5.1 Install Python
5.1.1 Change pip source to domestic Tsinghua source
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.trusted-host https://pypi.tuna.tsinghua.edu.cn
5.2 Install Docker
An open-source application container engine that allows developers to package their applications and dependencies into a portable image and then release it on any popular operating system, achieving virtualized deployment.
sudo yum install docker -y
# View docker version
docker -v
5.3 Install OpenCV
OpenCV is an open-source computer vision library, a cross-platform computer vision and machine learning software library released under the Apache 2.0 license, capable of running on Linux, Windows, Android, and Mac OS. Its lightweight and efficient, consisting of a series of C functions and a few C++ classes, and provides interfaces for Python, Ruby, MATLAB, etc., implementing many common algorithms for image processing and computer vision.
pip install opencv-python
import cv2
print(cv2.__version__)
5.4 Install Dlib
Dlib contains machine learning algorithms and tools for creating complex software to solve real-world problems. It is widely used in industry and academia, including robotics, embedded devices, mobile phones, and large-scale high-performance computing environments.
pip3 install dlib
Run a program that uses the OpenCV and Dlib libraries to detect parts of the face such as the mouth and eyebrows:
# Import tool packages
from collections import OrderedDict
import numpy as np
import argparse
import dlib
import cv2
#https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/
#http://dlib.net/files/
# Parameters
ap = argparse.ArgumentParser()
ap.add_argument("-p", "--shape-predictor", default="shape_predictor_68_face_landmarks.dat",
help="path to facial landmark predictor")
ap.add_argument("-i", "--image", default="images/liudehua2.jpg",
help="path to input image")
args = vars(ap.parse_args())
FACIAL_LANDMARKS_68_IDXS = OrderedDict([
("mouth", (48, 68)),
("right_eyebrow", (17, 22)),
("left_eyebrow", (22, 27)),
("right_eye", (36, 42)),
("left_eye", (42, 48)),
("nose", (27, 36)),
("jaw", (0, 17))
])
FACIAL_LANDMARKS_5_IDXS = OrderedDict([
("right_eye", (2, 3)),
("left_eye", (0, 1)),
("nose", (4))
])
def shape_to_np(shape, dtype="int"):
# Create 68*2
coords = np.zeros((shape.num_parts, 2), dtype=dtype)
# Iterate through each key point
# Get coordinates
for i in range(0, shape.num_parts):
coords[i] = (shape.part(i).x, shape.part(i).y)
return coords
def visualize_facial_landmarks(image, shape, colors=None, alpha=0.75):
# Create two copies
# overlay and one for the final output image
overlay = image.copy()
output = image.copy()
# Set some color areas
if colors is None:
colors = [(19, 199, 109), (79, 76, 240), (230, 159, 23),
(168, 100, 168), (158, 163, 32),
(163, 38, 32), (180, 42, 220)]
# Iterate through each area
for (i, name) in enumerate(FACIAL_LANDMARKS_68_IDXS.keys()):
# Get the coordinates of each point
(j, k) = FACIAL_LANDMARKS_68_IDXS[name]
pts = shape[j:k]
# Check location
if name == "jaw":
# Connect with lines
for l in range(1, len(pts)):
ptA = tuple(pts[l - 1])
ptB = tuple(pts[l])
cv2.line(overlay, ptA, ptB, colors[i], 2)
# Calculate convex hull
else:
hull = cv2.convexHull(pts)
cv2.drawContours(overlay, [hull], -1, colors[i], -1)
# Overlay on original image, specify the ratio
cv2.addWeighted(overlay, alpha, output, 1 - alpha, 0, output)
return output
# Load face detection and key point positioning
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor(args["shape_predictor"])
# Read input data, preprocessing
image = cv2.imread(args["image"])
(h, w) = image.shape[:2]
width=500
r = width / float(w)
dim = (width, int(h * r))
image = cv2.resize(image, dim, interpolation=cv2.INTER_AREA)
grey = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Face detection
rects = detector(grey, 1)
# Iterate through the detected boxes
for (i, rect) in enumerate(rects):
# Perform key point positioning on the face box
# Convert to ndarray
shape = predictor(grey, rect)
shape = shape_to_np(shape)
# Iterate through each part
for (name, (i, j)) in FACIAL_LANDMARKS_68_IDXS.items():
clone = image.copy()
cv2.putText(clone, name, (10, 30), cv2.FONT_HERSHEY_SIMPLEX,
0.7, (0, 0, 255), 2)
# Draw points according to position
for (x, y) in shape[i:j]:
cv2.circle(clone, (x, y), 3, (0, 0, 255), -1)
# Extract ROI area
(x, y, w, h) = cv2.boundingRect(np.array([shape[i:j]]))
roi = image[y:y + h, x:x + w]
(h, w) = roi.shape[:2]
width=250
r = width / float(w)
dim = (width, int(h * r))
roi = cv2.resize(roi, dim, interpolation=cv2.INTER_AREA)
# Display each part
cv2.imshow("ROI", roi)
cv2.imshow("Image", clone)
cv2.waitKey(0)
# Show all regions
output = visualize_facial_landmarks(image, shape)
cv2.imshow("Image", output)
cv2.waitKey(0)
6. CPU Multi-Process Capability Test
Using a Python script to execute the CPU of the OrangePi Kunpeng Pro; create three processes to perform bubble sort algorithm and measure execution time for testing.
import time
import random
import multiprocessing
def bubble_sort(arr):
n = len(arr)
for i in range(n):
for j in range(0, n-i-1):
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
def measure_performance():
arr = [random.randint(0, 10000) for _ in range(10000)]
start_time = time.time()
bubble_sort(arr)
end_time = time.time()
return end_time - start_time
def process_task(process_id):
execution_time = measure_performance()
print(f"Process {process_id} bubble sort algorithm execution time: {execution_time:.5f} seconds")
if __name__ == "__main__":
processes = []
for i in range(3):
process = multiprocessing.Process(target=process_task, args=(i,))
processes.append(process)
process.start()
for process in processes:
process.join()
bubble_sortfunction executes the bubble sort algorithm.measure_performancefunction generates a random array and measures the execution time of the bubble sort.process_taskfunction is the task each process will execute, which callsmeasure_performanceand prints the execution time.- The main program creates and starts three processes, each executing a bubble sort algorithm, and waits for all processes to complete.
7. Evaluation Summary
The compilation and runtime environment supports cmake and C++ compilation environment, runs Python; the expansion interface is rich; the OrangePi Kunpeng Pro is equipped with various interfaces and expansion slots, providing flexible expandability, able to meet different application needs. From development board to small server, it can be competent. In terms of system stability, in practical applications, the OrangePi Kunpeng Pro test bubble sort, CPU execution is stable, multi-process capability execution is stable;
Originally, I wanted to test AI capabilities, but the official documentation did not find relevant content about AI inference for this board, hoping for future supplements, to test AI model inference; the application of the openEuler system, after opening the application, the application software does not have a button to enlarge the window, the test code case easily encounters core dump issues, the ecological community and compatibility need to be strengthened;
Overall, it is a very powerful and feature-rich board, looking forward to more use cases and ecological output;