Foreword¶
This project implements thousands of animal recognition using PaddlePaddle, providing simple sample code, a GUI interface for operation, and a Flask web interface that can be called by Android applications.
Source Code Address: Download Here
Video Tutorial Address: Bilibili
- First, let’s write a simple program to achieve animal recognition with the following code:
import cv2
from utils.predictor import ClassificationPredictor
predictor = ClassificationPredictor(model_path='models', width=224, height=224)
image = cv2.imread('test.jpg')
result = predictor.predict([image])[0]
print(f'Prediction Result: {result[0]}, Confidence: {result[1]}')
-
A
gui.pyinterface program is provided for operation and recognition through the interface.

-
Additionally, a
server.pyis provided, which uses Flask to offer a web interface. Android applications can call this interface to implement animal recognition.

Sample code for the Android application is provided in the project, with the interface shown below.
