diff --git a/components/modules/ai/who_human_face_detection.cpp b/components/modules/ai/who_human_face_detection.cpp
index fba33af..af7dfab 100644
--- a/components/modules/ai/who_human_face_detection.cpp
+++ b/components/modules/ai/who_human_face_detection.cpp
@@ -9,7 +9,22 @@
 
 #include "who_ai_utils.hpp"
 
-#define TWO_STAGE_ON 1
+#include "plumerai/model_defines.h"
+#include "plumerai/people_detection_micro.h"
+
+extern "C" void DebugLog(const char *format, va_list args) { vprintf(format, args); }
+
+int clip(float value, int max) { return std::max(0, std::min(static_cast<int>(value), max)); }
+
+void draw_detection(BoxPrediction &p, uint16_t * buffer, int width, int height) {
+    if (p.confidence < 0.7) { return; }   // confidence threshold, adjust as needed
+    int color = 63488;  // red in RGB565
+    int x_min = clip(p.x_min * width, width - 1);
+    int y_min = clip(p.y_min * height, height - 1);
+    int x_max = clip(p.x_max * width, width - 1);
+    int y_max = clip(p.y_max * height, height - 1);
+    dl::image::draw_hollow_rectangle(buffer, height, width, x_min, y_min, x_max, y_max, color);
+}
 
 constexpr int lcd_width = 240;
 constexpr int lcd_height = 240;
@@ -38,10 +53,17 @@ static void task_process_handler(void *arg)
     for (int i = 0; i < lcd_buffer->len; ++i) { lcd_buffer->buf[i] = 0; }
 
     camera_fb_t *frame = NULL;
-    HumanFaceDetectMSR01 detector(0.3F, 0.3F, 10, 0.3F);
-#if TWO_STAGE_ON
-    HumanFaceDetectMNP01 detector2(0.4F, 0.3F, 10);
-#endif
+
+    ESP_LOGI(TAG, "Reserving %d bytes of tensor arena in internal RAM", TENSOR_ARENA_SIZE);
+    auto tensor_arena = reinterpret_cast<unsigned char *>(heap_caps_aligned_alloc(16, TENSOR_ARENA_SIZE, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL));
+    if (tensor_arena == nullptr) { ESP_LOGI(TAG, "Error: could not allocate tensor arena"); }
+
+    ESP_LOGI(TAG, "Initializing the Plumerai People Detection");
+    auto error_code = PeopleDetectionInit(tensor_arena);
+    if (error_code != 0) { ESP_LOGI(TAG, "Error: could not initialize Plumerai People Detection"); }
+
+    constexpr int max_detections = 20;
+    BoxPrediction predictions[max_detections];
 
     while (true)
     {
@@ -54,19 +76,17 @@ static void task_process_handler(void *arg)
                     reinterpret_cast<uint16_t *>(frame->buf), {(int)frame->height, (int)frame->width, 1},
                     reinterpret_cast<uint16_t *>(lcd_buffer->buf), {lcd_display_height, lcd_width, 1}
                 );
-#if TWO_STAGE_ON
-                std::list<dl::detect::result_t> &detect_candidates = detector.infer((uint16_t *)frame->buf, {(int)frame->height, (int)frame->width, 3});
-                std::list<dl::detect::result_t> &detect_results = detector2.infer((uint16_t *)frame->buf, {(int)frame->height, (int)frame->width, 3}, detect_candidates);
-#else
-                std::list<dl::detect::result_t> &detect_results = detector.infer((uint16_t *)frame->buf, {(int)frame->height, (int)frame->width, 3});
-#endif
+
+                int num_results = 0;
+                constexpr float framerate = 2.5f;  // in frames-per-second (FPS)
+                error_code = PeopleDetectionProcessFrame(predictions, max_detections, &num_results, 1 / framerate, frame->buf);
+                if (error_code != 0) { ESP_LOGI(TAG, "Error: could not process a frame using Plumerai People Detection"); }
+                ESP_LOGI(TAG, "Detected %d person(s)", num_results);
 
                 esp_camera_fb_return(frame);
 
-                if (detect_results.size() > 0)
-                {
-                    draw_detection_result((uint16_t *)frame->buf, frame->height, frame->width, detect_results);
-                    print_detection_result(detect_results);
+                for (int result_id = 0; result_id < num_results; ++result_id) {
+                    draw_detection(predictions[result_id], reinterpret_cast<uint16_t *>(lcd_buffer->buf), lcd_width, lcd_display_height);
                     is_detected = true;
                 }
             }
@@ -112,7 +132,7 @@ void register_human_face_detection(const QueueHandle_t frame_i,
     xQueueResult = result;
     gReturnFB = camera_fb_return;
 
-    xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 0);
+    xTaskCreatePinnedToCore(task_process_handler, TAG, 8 * 1024, NULL, 5, NULL, 0);
     if (xQueueEvent)
         xTaskCreatePinnedToCore(task_event_handler, TAG, 4 * 1024, NULL, 5, NULL, 1);
 }
diff --git a/examples/human_face_detection/lcd/main/app_main.cpp b/examples/human_face_detection/lcd/main/app_main.cpp
index 454d5d8..71ad158 100755
--- a/examples/human_face_detection/lcd/main/app_main.cpp
+++ b/examples/human_face_detection/lcd/main/app_main.cpp
@@ -10,7 +10,7 @@ extern "C" void app_main()
     xQueueAIFrame = xQueueCreate(2, sizeof(camera_fb_t *));
     xQueueLCDFrame = xQueueCreate(2, sizeof(camera_fb_t *));
 
-    register_camera(PIXFORMAT_RGB565, FRAMESIZE_240X240, 2, xQueueAIFrame);
+    register_camera(PIXFORMAT_RGB565, FRAMESIZE_VGA, 1, xQueueAIFrame);
     register_human_face_detection(xQueueAIFrame, NULL, NULL, xQueueLCDFrame, false);
     register_lcd(xQueueLCDFrame, NULL, true);
 }
