๐ Live Website: https://liftproof-ai-website-7oediq4sy-md-s-projects-90825e24.vercel.app/
LiftProof.Ai is an advanced real-time shoplifting detection system that uses YOLOv8-Pose for skeleton tracking combined with behavioral analysis algorithms to identify potential theft in retail environments. Unlike traditional object detection systems, LiftProof.Ai analyzes human behavior patterns to detect concealment actions before items leave the store.
- $100+ billion lost annually to retail theft globally
- Traditional CCTV requires constant human monitoring
- Object-based detection fails to catch concealment behaviors
- Existing solutions are expensive and complex
LiftProof.Ai provides:
- Real-time behavioral analysis using pose estimation
- Multi-camera support for major CCTV brands
- Instant alerts to security personnel
- Evidence capture with timestamps and video clips
- Cost-effective deployment on standard hardware
| Feature | Description |
|---|---|
| ๐๏ธ Pocket Concealment | Detects hand-to-pocket movements indicating item hiding |
| ๐ Under-Shirt Hiding | Identifies items being tucked under clothing |
| ๐ฉณ Waistband Concealment | Monitors waistband area for hiding behavior |
| โก Quick Grab Detection | Catches rapid snatching movements |
| ๐ Nervous Behavior | Tracks suspicious head movements and looking around |
- โ Real-time Processing - 30+ FPS on modern hardware
- โ Multi-Person Tracking - Track multiple subjects simultaneously
- โ Skeleton Visualization - Full 17-keypoint pose estimation
- โ Progressive Alerts - Normal โ Watching โ Suspicious โ Alert
- โ Suspicion Scoring - 0-100% risk assessment per person
- โ Evidence Capture - Automatic screenshot/video on alert
- โ CCTV Integration - Works with Hikvision, Dahua, Lorex, UNV, and more
- Python 3.8 or higher
- Webcam or CCTV camera (RTSP compatible)
- macOS, Windows, or Linux
# Clone the repository
git clone https://github.com/Mrabbi3/LiftProofAI.git
cd LiftProofAI
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtultralytics>=8.1.0
opencv-python>=4.8.0
numpy>=1.24.0
torch>=2.0.0
The model downloads automatically on first run, or manually:
python3 -c "from ultralytics import YOLO; YOLO('yolov8n-pose.pt')"# Activate virtual environment
source venv/bin/activate
# Run detection
python3 liftproof_v2.pypython3 main.py --camera rtsp://admin:password@192.168.1.64:554/stream1Once running, test these behaviors:
| Action | Expected Response |
|---|---|
| Stand normally | ๐ข Green skeleton - "NORMAL" |
| Hand in pocket (hold 1-2 sec) | ๐กโ๐ โ๐ด Alert triggered |
| Hand to waistband | ๐กโ๐ โ๐ด Alert triggered |
| Hand under shirt | ๐กโ๐ โ๐ด Alert triggered |
| Quick grabbing motion | Rapid score increase |
| Look around nervously | "NERVOUS_LOOKING" detected |
| Key | Action |
|---|---|
Q |
Quit application |
S |
Save screenshot |
R |
Reset tracking |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LiftProof.Ai โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Camera โโโโโถโ YOLOv8-Pose โโโโโถโ Behavioral Analysis โ โ
โ โ Input โ โ Detection โ โ Engine โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Skeleton โ โ Suspicion โ โ
โ โ Tracking โ โ Scoring โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ Alert System โ โ
โ โ & Notification โ โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Frame Capture - Video input from webcam or RTSP stream
- Pose Estimation - YOLOv8-Pose extracts 17 body keypoints
- Person Tracking - Persistent IDs across frames
- Behavior Analysis - Analyze keypoint positions and movements
- Temporal Analysis - Track behavior duration over time
- Risk Scoring - Calculate 0-100% suspicion score
- Alert Generation - Trigger alerts when threshold exceeded
0: Nose
/ \
1 2: Eyes
/ \
3 4: Ears
\ /
5โโโ6: Shoulders
โ โ
7 8: Elbows
โ โ
9 10: Wrists โ Primary detection points
โ โ
11โโ12: Hips โ Primary detection points
โ โ
13 14: Knees
โ โ
15 16: Ankles
Edit these in liftproof_v2.py to tune sensitivity:
self.config = {
# Distance thresholds (relative to body height)
'POCKET_THRESHOLD': 0.12, # Hand near pocket
'WAIST_THRESHOLD': 0.10, # Hand at waistband
'CHEST_THRESHOLD': 0.15, # Hand under shirt
# Time thresholds (frames at ~30fps)
'POCKET_FRAMES': 25, # ~0.8 sec to trigger
'WAIST_FRAMES': 20, # ~0.7 sec to trigger
'CHEST_FRAMES': 25, # ~0.8 sec to trigger
# Alert thresholds
'ALERT_THRESHOLD': 70, # Score to trigger alert
'SUSPICIOUS_THRESHOLD': 40, # Score for suspicious
'WATCHING_THRESHOLD': 20, # Score to start watching
}| Brand | RTSP URL Format |
|---|---|
| Hikvision | rtsp://{user}:{pass}@{ip}:554/Streaming/Channels/{ch}01 |
| Dahua | rtsp://{user}:{pass}@{ip}:554/cam/realmonitor?channel={ch} |
| Lorex | rtsp://{user}:{pass}@{ip}:554/ch{ch}/main |
| Uniview (UNV) | rtsp://{user}:{pass}@{ip}:554/unicast/c{ch}/s0/live |
| Reolink | rtsp://{user}:{pass}@{ip}:554/h264Preview_{ch}_main |
LiftProofAI/
โโโ liftproof_v2.py # Main detection script (recommended)
โโโ main.py # Multi-camera orchestrator
โโโ test_webcam.py # Simple webcam test
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
โ
โโโ config/
โ โโโ settings.py # Configuration settings
โ
โโโ modules/
โ โโโ __init__.py
โ โโโ detection_engine.py # Core detection logic
โ โโโ rtsp_loader.py # CCTV stream handler
โ โโโ notification_manager.py
โ
โโโ models/ # Trained models (git-ignored)
โโโ data/evidence/ # Captured alert images
โโโ logs/ # Application logs
โโโ assets/ # Documentation assets
| Hardware | Resolution | FPS | Persons Tracked |
|---|---|---|---|
| MacBook Air M1 | 720p | 25-30 | Up to 5 |
| MacBook Pro M2 | 1080p | 30+ | Up to 10 |
| RTX 3060 | 1080p | 45+ | Up to 15 |
| RTX 4090 | 4K | 60+ | Up to 20+ |
| Model | Size | Speed | Accuracy |
|---|---|---|---|
yolov8n-pose.pt |
6 MB | Fastest | Good |
yolov8s-pose.pt |
23 MB | Fast | Better |
yolov8m-pose.pt |
52 MB | Medium | Best |
- Basic pose detection
- Behavioral analysis engine
- Multi-person tracking
- Webcam support
- CCTV integration
- Mobile app notifications (Firebase)
- SMS alerts (Twilio)
- Web dashboard
- Cloud deployment
- Custom model training pipeline
Contributions are welcome! Here's how:
- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a Pull Request
This project is licensed under the MIT License
This software is intended for legitimate security purposes only. Users are responsible for:
- Complying with local privacy laws and regulations
- Obtaining necessary permissions for surveillance
- Proper signage indicating video monitoring
- Ethical use of the technology
- Issues: GitHub Issues
- Email: mrifat205@gmail.com
- Ultralytics - YOLOv8 framework
- OpenCV - Computer vision library
- Roboflow - Dataset management
Built with โค๏ธ for retail security
โญ Star this repo if you find it useful!