ShelfPulse AI — YOLO11-SKU110K Edge Retail Detector
NCNN FP16 · Vulkan GPU · ByteTrack-cpp · SAHI 3×3 Ultra · C++17 · Android arm64-v8a
📌 Overview
ShelfPulse AI is a production-grade, 100% offline edge-AI Android retail inventory counter. It runs YOLO11 Nano exported to NCNN FP16 (via PNNX dynamic export) and deployed natively via C++17 JNI on Android arm64-v8a devices with dynamic CPU ARM NEON / Vulkan GPU toggling.
The model is class-agnostic: it detects and counts all consumer-packaged goods visible on retail shelf facings without granular SKU classification, complemented by integrated offline barcode scanning (zxing-cpp) and Open Food Facts enrichment for SKU binding.
Key capabilities of the full ShelfPulse AI suite:
- 🔍 Dense object detection with SAHI 3×3 Ultra Tiling — +48% recall vs single-pass inference
- 🏃 Real-time tracking via ByteTrack-cpp (Kalman 8D + LAPJV) @ 30 FPS
- 📊 Shelf Depth Multiplier (1×–20×) for rear-row product estimation
- 🔁 ERP Integration via WorkManager: Generic Webhooks, InvenTree REST, ERPNext Stock Reconciliation
- 📄 Multi-format export: Bilingual PDF (AR/EN RTL), Annotated JPEG, CSV BOM, JSON 2.2
- 🌐 Arabic/English in-app switcher with full RTL layout support
🏗️ Architecture & Edge Pipeline
Model Architecture
| Property | Value |
|---|---|
| Base Architecture | Ultralytics YOLO11 Nano (CSPDarknet + C3k2 + SPPF) |
| Task | Class-agnostic dense product detection & counting |
| Training Dataset | SKU-110K Dense Object Detection |
| Export Format | PNNX Dynamic NCNN FP16 |
| Inference Engine | Tencent NCNN v20241226 |
| Target Hardware | Android arm64-v8a (ARM NEON CPU + Adreno/Mali Vulkan GPU) |
| Input Shapes | 320×320 (Live Scan) / 640×640 (Snap & Verify) |
| Output Tensor | [1, 5, N] — cx, cy, w, h, conf (class-agnostic) |
| Confidence Threshold | 0.25f (default UI: 0.32f) |
| NMS IoU Threshold | 0.45f |
| License | Apache-2.0 |
C++17 Native Inference Pipeline
CameraX RGBA_8888 (640×480)
│
▼
kanna_rotate_c4 (JNI direct buffer, ~1.3–2.2 ms)
│
▼ [Mode Select]
┌──────┴──────────────────────────────────┐
│ │
Live Scan (320×320) Snap & Verify / Video Audit
CPU NEON: ~21 ms ┌─────────────────────────┐
Vulkan GPU: ~54.5 ms │ Single 640px (~85 ms) │
ByteTrack 8D Kalman │ SAHI 2×2 (5 passes) │
LAPJV Assignment │ SAHI 3×3 Ultra (10 p.) │
30.2 FPS sustained └─────────────────────────┘
│ │
└──────────────┬──────────────────┘
▼
Dynamic tensor parser [4+C, N]
Geometric FP filter (area, aspect ratio)
Letterbox-unpad normalization → [0,1]
CoordinateMapper.kt (sub-pixel alignment)
│
▼
Bounding Box Canvas (Compose)
HUD + Confidence Slider
SAHI 3×3 Ultra Tiling — Recall Benchmarks
Tested on a 1920×1080 dense retail warehouse shelf panorama (Samsung Galaxy Note 10, SM-N970U):
| Mode | Inferences | Raw Candidates | Final Detections | Total Latency |
|---|---|---|---|---|
| Single-Pass 640px | 1 | 57 | 57 items | ~149 ms |
| SAHI 2×2 HD | 5 | 1,184 | 75 items | ~421 ms |
| SAHI 3×3 Ultra | 10 | 2,460 | 101 items (+77%) | ~835 ms |
Live Scan Latency Benchmarks (Samsung Note 10, arm64-v8a)
| Pipeline Stage | CPU (ARM NEON FP16) | Vulkan GPU (Adreno 640 FP16) |
|---|---|---|
CameraX Preprocessing (kanna_rotate_c4) |
1.3–4.5 ms (avg ~2.2 ms) | 1.5–3.9 ms (avg ~2.5 ms) |
| YOLO11 NCNN Inference (320×320) | 14.0–26.5 ms (avg ~21.0 ms) | 50.9–60.9 ms (avg ~54.5 ms) |
| ByteTrack (Kalman 8D + LAPJV) | ~0.01 ms | ~0.01 ms |
| Total Frame Latency | ~23.5 ms | ~58.0 ms |
| Sustained FPS | ~30 FPS | ~18 FPS |
Note: CPU ARM NEON is 2.6× faster than Vulkan on this device; CPU is the recommended default for smooth 30 FPS Live Scan.
📦 Model Files
| File | Size | Description | Format |
|---|---|---|---|
model.ncnn.param |
~21.7 KB | Network topology & layer definitions (PNNX dynamic shape) | NCNN .param |
model.ncnn.bin |
~5.1 MB | Quantized FP16 weights for ARM NEON & Vulkan kernels | NCNN .bin |
These files are sourced from the latest GitHub Release v2.4.0.
SHA-256 checksums are available inSHA256SUMS.txt.
🚀 How to Use / Integration Guide
Option 1 — Install the Pre-Built Android APK (Recommended)
Download and sideload the latest release APK directly onto any Android 8.0+ device:
# Download the latest APK
wget https://github.com/tahadeab-ai/shelf-pulse-ai/releases/latest/download/ShelfPulse-AI-arm64-v8a.apk
# Sideload via ADB
adb install -r ShelfPulse-AI-arm64-v8a.apk
Option 2 — Use Model Weights in Your Own NCNN Android App
- Download weights from this repository:
from huggingface_hub import hf_hub_download
param_path = hf_hub_download(
repo_id="taha201201/shelf-pulse-ai",
filename="model.ncnn.param"
)
bin_path = hf_hub_download(
repo_id="taha201201/shelf-pulse-ai",
filename="model.ncnn.bin"
)
print(f"Param: {param_path}")
print(f"Bin: {bin_path}")
- Place weights into your Android project assets:
app/src/main/assets/models/
├── model.ncnn.param # ~21.7 KB
└── model.ncnn.bin # ~5.1 MB
- Load in C++ via NCNN (PNNX dynamic shape, FP16):
#include "net.h"
ncnn::Net yolo;
yolo.opt.use_vulkan_compute = true; // Enable Vulkan GPU
yolo.opt.use_fp16_packed = true; // FP16 half precision
yolo.opt.num_threads = 4; // ARM big-core threads
yolo.load_param("model.ncnn.param");
yolo.load_model("model.ncnn.bin");
// Input: BGR image, normalized 1/255.0, letterboxed to 640×640
ncnn::Mat in = ncnn::Mat::from_pixels_resize(bgr_data, ncnn::Mat::PIXEL_BGR,
img_w, img_h, 640, 640);
const float mean_vals[3] = {0.f, 0.f, 0.f};
const float norm_vals[3] = {1 / 255.f, 1 / 255.f, 1 / 255.f};
in.substract_mean_normalize(mean_vals, norm_vals);
ncnn::Extractor ex = yolo.create_extractor();
ex.input("images", in);
ncnn::Mat out;
ex.extract("output0", out);
// out shape: [1, 5, N] -> cx, cy, w, h, conf (class-agnostic)
Option 3 — Retrain on SKU-110K via Google Colab
The repository includes a complete self-contained Colab notebook for training YOLO11s/YOLO11m from scratch on the SKU-110K retail dataset and exporting dynamic PNNX NCNN FP16 weights:
Training configuration highlights:
mosaic=1.0— Multi-image mosaic for dense retail augmentationcopy_paste=0.3— Synthetic occlusion simulationdegrees=0.0— Rotation disabled (shelf orientation prior)- PNNX export with Nihui dynamic shape patch →
model.ncnn.{param,bin}
🔌 ERP & Webhook Integration
ShelfPulse AI supports offline-queued ERP sync via WorkManager:
ShelfPulse AI App
│
▼
WorkManager SyncAuditWorker
│
├──► Generic Webhook (n8n / Zapier / POS)
├──► InvenTree REST API (/api/stock/count/)
└──► ERPNext Stock Reconciliation
Configuration in-app: History & Export → Settings ⚙️
📎 Links
| Resource | URL |
|---|---|
| 🐙 GitHub Repository | tahadeab-ai/shelf-pulse-ai |
| 📱 Android APK (v2.4.0) | GitHub Releases |
| 📓 Training Notebook | train_yolo11_sku110k_colab.ipynb |
| 🏗️ Architecture Doc | docs/ARCHITECTURE.md |
| 🧾 Model Card (GitHub) | docs/MODEL_CARD.md |
📄 License & Compliance
- Model Weights & Deployment Pipeline: Apache License 2.0
- Training Notebook: Uses Ultralytics YOLO11 (AGPL-3.0) — training is strictly cloud-only to avoid copyleft encumbrance on the core Android application
- NCNN: BSD 3-Clause License (Tencent)
- ByteTrack: MIT License
- Eigen: MPL-2.0
🧰 Open-Source Stack
| Component | Library | License |
|---|---|---|
| Object Detection | Ultralytics YOLO11 | AGPL-3.0 (training only) |
| Neural Net Inference | Tencent NCNN | BSD-3-Clause |
| Multi-Object Tracking | ByteTrack-cpp | MIT |
| Linear Algebra | Eigen 3.4.0 | MPL-2.0 |
| Barcode Scanner | zxing-cpp | Apache-2.0 |
| CV Utilities | opencv-mobile | Apache-2.0 |
| Android Platform | Kotlin 2.0.21, Jetpack Compose, CameraX, Room v6, WorkManager | Apache-2.0 |
| Training Dataset | SKU-110K | Research only |
ShelfPulse AI — Bringing state-of-the-art dense object detection, multi-object tracking, and enterprise ERP integration directly into retail workers' pockets, 100% offline.
Evaluation results
- Single-Pass 640px Recall (items detected) on SKU-110Kself-reported0.570
- SAHI 2×2 HD Recall (items detected) on SKU-110Kself-reported0.750
- SAHI 3×3 Ultra Recall (items detected, normalized) on SKU-110Kself-reported1.010
- Vulkan GPU Inference Latency (ms) @ 320×320 on SKU-110Kself-reported15.900
- Sustained FPS (Live Scan, Samsung Note 10) on SKU-110Kself-reported30.200