STM32N6 NPU Deployment — Politecnico di Milano  1.0
Documentation for Neural Network Deployment on STM32N6 NPU - Politecnico di Milano 2024-2025
app_config.h
Go to the documentation of this file.
1 
45 #ifndef APP_CONFIG
46 #define APP_CONFIG
47 
48 #include "arm_math.h"
49 
56 /* ============================================================================
57  * SYSTEM CONFIGURATION
58  * ============================================================================ */
59 
76 #define USE_DCACHE
77 
78 /* ============================================================================
79  * CAMERA PIPELINE CONFIGURATION
80  * ============================================================================ */
81 
88 #define CAMERA_FLIP CMW_MIRRORFLIP_NONE
89 
110 #define ASPECT_RATIO_CROP (1)
111 
120 #define ASPECT_RATIO_FIT (2)
121 
129 #define ASPECT_RATIO_FULLSCREEN (3)
130  /* AspectRatioModes */
132 
145 #define ASPECT_RATIO_MODE ASPECT_RATIO_CROP
146 
147 /* ============================================================================
148  * POSTPROCESSING TYPE SELECTION
149  * ============================================================================ */
150 
169 #define POSTPROCESS_TYPE POSTPROCESS_SPE_MOVENET_UF
170 
171 /* ============================================================================
172  * NEURAL NETWORK INPUT DIMENSIONS
173  * ============================================================================ */
174 
182 #define NN_HEIGHT (192)
183 
195 #define NN_WIDTH (192)
196 
207 #define NN_BPP 3
208 
213 #define COLOR_BGR (0)
214 #define COLOR_RGB (1)
225 #define COLOR_MODE COLOR_RGB
226 
227 /* ============================================================================
228  * POSTPROCESSING PARAMETERS
229  * ============================================================================ */
230 
245 #define AI_POSE_PP_CONF_THRESHOLD (0.4)
246 
261 #define AI_POSE_PP_POSE_KEYPOINTS_NB (13)
262 
273 #define AI_SPE_MOVENET_POSTPROC_HEATMAP_WIDTH (NN_WIDTH / 4)
274 
281 #define AI_SPE_MOVENET_POSTPROC_HEATMAP_HEIGHT (NN_HEIGHT / 4)
282 
291 #define AI_SPE_MOVENET_POSTPROC_NB_KEYPOINTS (AI_POSE_PP_POSE_KEYPOINTS_NB)
292 
293 /* ============================================================================
294  * DISPLAY / WELCOME SCREEN MESSAGES
295  * ============================================================================ */
296 
301 #define WELCOME_MSG_0 "Single/multi pose estimation - Hand landmark"
302 
310 #define WELCOME_MSG_1 "st_movenet_lightning_heatmaps_192_int8_pc.tflite"
311 
316 #define WELCOME_MSG_2 "Model Running in STM32 MCU internal memory"
317  /* AppConfig */
319 
320 #endif /* APP_CONFIG */