Skip to content

AI Recognition

AI recognition is a cutting-edge technology in drone intelligence. In this project, you will learn how to deploy a TinyYOLOv3 model on ESP32-S3 to perform object detection.

  • Deep learning model deployment
  • Model quantization
  • Inference optimization
  • Object detection algorithms
ItemQuantityNotes
ESP32-S3 Drone1-
OV2640 Camera Module1-
MicroSD Card18GB+
  1. Download a pre-trained TinyYOLOv3 model (COCO dataset)
  2. Use the tensorflow lite converter to convert the model to INT8 quantized .tflite format
  3. Copy the model and the label file coco_labels.txt to the MicroSD card

MicroSD card module → ESP32-S3 SPI interface

Unzip ai_detection.zip and open it with VS Code.

Open yolo_detect.c and implement object detection:

void yolo_detect(uint8_t* frame, int width, int height,
Detection* detections, int* detection_count) {
// 1. Preprocess image: resize to 416x416, normalize
preprocess_image(frame, width, height);
// 2. Load model and run inference
load_model("/sdcard/tiny_yolo_v3.tflite");
run_inference(preprocessed_frame);
// 3. Postprocess: decode output and filter low-confidence detections
decode_output(output, detections, detection_count);
filter_detections(detections, detection_count, 0.5); // confidence threshold 0.5
}
  1. Place different targets (e.g., person, chair) in front of the drone
  2. Observe the detection results
  3. Challenge: add a “target priority” feature so the drone tracks people first instead of other objects
  • Optimize the model size
  • Use INT8 quantization
  • Adjust the confidence threshold
  • Improve the input image quality

Congratulations! You have successfully implemented AI object detection — a cutting-edge technology in drone intelligence!

In the next project, you will learn how to build a multi-drone MESH network.