flutter_pose_detection 0.2.1
flutter_pose_detection: ^0.2.1 copied to clipboard
Hardware-accelerated pose detection using LiteRT (successor to TensorFlow Lite) with NPU/GPU/CPU acceleration. Detects 33 body landmarks in MediaPipe-compatible format.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.1 - 2025-12-31 #
Fixed #
- Android: Updated QNN SDK from 2.34.0 to 2.41.0
- Fixes
NoSuchMethodError: getBackendType()Icrash on Snapdragon 8 Elite - Resolves native JNI method signature mismatch with newer Android firmware
- Fixes
Added #
- Android:
ChipsetDetectorfor runtime SoC detection (Snapdragon, Exynos, Tensor, MediaTek) - iOS:
CoreMLPoseDetectorfor native Core ML inference with ANE optimization- Direct MLModel API usage (no Vision framework overhead)
- ImageNet normalization for HRNet models
0.2.0 - 2024-12-31 #
Changed #
- BREAKING: Migrated from TensorFlow Lite to LiteRT 2.1.0 (Google's successor to TFLite)
- Android: New
LiteRtPoseDetectorusing CompiledModel API with NPU/GPU/CPU fallback- Replaces
TFLitePoseDetectorandDelegateFactory - Uses
Accelerator.NPU,Accelerator.GPUfor hardware acceleration - Automatic fallback chain: NPU → GPU → CPU
- Replaces
- iOS: New
LiteRtPoseDetectorusing TensorFlowLiteSwift 2.14.0- Replaces
VisionPoseDetectorwith MoveNet-based detection - CoreML delegate for Neural Engine (A12+), Metal delegate for GPU
- Automatic fallback chain: Neural Engine → Metal → CPU
- Replaces
- Both Platforms: Now use same MoveNet Lightning/Thunder models for consistent results
- Cross-platform landmark positions match within 5% variance
- Lightning (192x192) for fast mode, Thunder (256x256) for accurate mode
Removed #
TFLitePoseDetector.kt- replaced byLiteRtPoseDetector.ktDelegateFactory.kt- accelerator selection now handled by CompiledModel APIVisionPoseDetector.swift- replaced byLiteRtPoseDetector.swift
Fixed #
- Consistent 17-landmark COCO format output across platforms
- Proper resource cleanup on dispose()
0.1.0 - 2024-12-30 #
Added #
- Initial release of NPU Pose Detection plugin
- iOS Support: Apple Vision Framework with Neural Engine acceleration
- Automatic NPU/GPU acceleration on A12+ devices
- VNDetectHumanBodyPoseRequest for 17 body landmarks
- Landmark mapping to MediaPipe 33-point format
- Android Support: TensorFlow Lite with MoveNet Lightning model
- GPU Delegate for hardware acceleration
- NNAPI support for devices API 27-34
- CPU fallback with XNNPack optimization
- Core Features:
- Static image pose detection (
detectPose,detectPoseFromFile) - Real-time camera frame processing (
processFrame,startCameraDetection) - Video file analysis (
analyzeVideowith progress tracking) - Configurable detection parameters (
PoseDetectorConfig)
- Static image pose detection (
- Data Models:
Posewith 33 MediaPipe-compatible landmarksPoseLandmarkwith normalized coordinates (0-1) and confidence scoresBoundingBoxfor detected person regionLandmarkTypeenum for easy landmark access
- Error Handling:
- Typed
DetectionErrorwith error codes - Graceful fallback from NPU to GPU to CPU
- Typed
- Example App:
- Image detection demo with gallery picker
- Real-time camera detection with pose overlay
- Video analysis with progress UI