|
1 | 1 | # ESP-DL |
2 | 2 |
|
3 | | -ESP-DL is designed to maintain optimal performance while significantly reducing the workload in model deployment. Our project has achieved the following key features: |
| 3 | +ESP-DL is a lightweight and efficient neural network inference framework specifically designed for ESP series chips (ESP32, ESP32-S3, ESP32-P4). It is built to maintain optimal performance while significantly reducing the workload in model deployment. Our project has achieved the following key features: |
4 | 4 |
|
5 | 5 | ### ESP-DL Standard Model Format |
6 | 6 |
|
@@ -29,4 +29,68 @@ The automatic dual-core scheduling enables computationally intensive operators t |
29 | 29 |
|
30 | 30 | --- |
31 | 31 |
|
| 32 | +## Project Structure |
| 33 | + |
| 34 | +The ESP-DL project is organized to provide a clear separation of concerns for different functionalities. Here's a breakdown of the main directories and their purposes to help beginners get started quickly: |
| 35 | + |
| 36 | +``` |
| 37 | +esp-dl/ |
| 38 | +├── dl/ # Core deep learning library |
| 39 | +│ ├── base/ # Fundamental data types and utilities |
| 40 | +│ ├── tensor/ # TensorBase class for data handling |
| 41 | +│ ├── model/ # Model class for loading, building, and running neural networks |
| 42 | +│ ├── module/ # Base Module class for operators/layers |
| 43 | +│ ├── math/ # Mathematical functions and operations |
| 44 | +│ ├── tool/ # Utility tools for the framework |
| 45 | +│ ├── dl_define.hpp # Global definitions, quantization and activation types |
| 46 | +│ └── dl_define_private.hpp # Private definitions |
| 47 | +├── fbs_loader/ # FlatBuffers model loading functionality |
| 48 | +│ ├── include/ # Header files for the loader |
| 49 | +│ ├── src/ # Source files for the loader |
| 50 | +│ ├── lib/ # Pre-compiled FlatBuffers model library |
| 51 | +│ └── pack_espdl_models.py # Script to pack multiple models |
| 52 | +├── audio/ # Audio processing module |
| 53 | +│ ├── common/ # Common audio processing utilities (WAV decoding, etc.) |
| 54 | +│ ├── speech_features/ # Speech feature extraction (Fbank, MFCC, Spectrogram) |
| 55 | +│ └── README.md # Detailed documentation for audio processing |
| 56 | +├── vision/ # Vision processing module |
| 57 | +│ ├── image/ # Image processing utilities (JPEG, BMP, drawing, preprocessing) |
| 58 | +│ ├── detect/ # Object detection post-processors (YOLO, etc.) |
| 59 | +│ ├── classification/ # Image classification post-processors (ImageNet, etc.) |
| 60 | +│ └── recognition/ # Face recognition components |
| 61 | +├── CMakeLists.txt # CMake build configuration for the ESP-IDF component |
| 62 | +├── idf_component.yml # ESP-IDF component manifest |
| 63 | +├── LICENSE # Project license information |
| 64 | +└── README.md # This file |
| 65 | +``` |
| 66 | + |
| 67 | +### Core Components (`dl/`) |
| 68 | + |
| 69 | +This is the heart of the ESP-DL framework. It contains the fundamental classes and functions required for neural network inference. |
| 70 | + |
| 71 | +- `base/`: Contains basic utilities and low-level operations. |
| 72 | +- `tensor/`: Defines the `TensorBase` class, which is used throughout the framework to represent data. |
| 73 | +- `model/`: Contains the `Model` class, which handles loading `.espdl` files, building an execution plan, and running inference. |
| 74 | +- `module/`: Defines the `Module` base class, from which all neural network operators (like Conv2D, Pool2D) are derived. |
| 75 | +- `math/`: Provides optimized mathematical functions used by operators. |
| 76 | +- `tool/`: Offers various utility functions for the framework. |
| 77 | +- `dl_define.hpp`: Central place for global definitions like quantization and activation types. |
| 78 | + |
| 79 | +### FlatBuffers Loader (`fbs_loader/`) |
| 80 | + |
| 81 | +This component is responsible for loading models stored in the `.espdl` format, which is based on FlatBuffers. |
| 82 | + |
| 83 | +### Audio Processing (`audio/`) |
| 84 | + |
| 85 | +This module provides functionalities for audio signal processing, particularly focused on speech feature extraction. It includes utilities for WAV decoding and extracting features like Fbank, MFCC, and Spectrogram, optimized for ESP platforms. |
| 86 | + |
| 87 | +### Vision Processing (`vision/`) |
| 88 | + |
| 89 | +This module provides functionalities for computer vision tasks. |
| 90 | + |
| 91 | +- `image/`: Utilities for image loading (JPEG, BMP), preprocessing, color space conversion, and drawing. |
| 92 | +- `detect/`: Post-processors for object detection models (e.g., YOLO variants). |
| 93 | +- `classification/`: Post-processors for image classification models (e.g., ImageNet classifiers). |
| 94 | +- `recognition/`: Components for face recognition tasks. |
| 95 | + |
32 | 96 | Explore ESP-DL to streamline your AI model deployment and achieve optimal performance with minimal resource usage. |
0 commit comments