Built to order

Shoplifting Detection using Pose Estimation

A store monitoring aid that flags suspicious concealment gestures in footage. MediaPipe pose extracts body landmarks per person; hands are tracked across frames while a gesture-heuristics engine scores behaviors like hand-to-torso contact with rapid retraction, repeated reaching, and product-handling followed by pocket-zone motion. Sustained patterns raise an advisory alert with a timestamp and frame crop for human review — the system never accuses. The notebook evaluates the alert rule on staged actor footage. Advisory only, not evidence; test only on staged or consenting-subject footage.

Shoplifting Detection using Pose Estimation - project prototype demo screenshot

The problem

Retail shrinkage costs stores real money, and reviewing hours of CCTV to find one concealment gesture is exactly the kind of task humans do badly: attention fades, footage piles up, and incidents are found hours too late. Pose estimation offers a different angle from raw video classification — instead of asking "does this frame look like theft?", it tracks what the body is doing: where the hands go, how long they stay, whether a product-handling motion is followed by a pocket-zone motion. This project builds that pipeline: MediaPipe pose extracts real-time body landmarks, a tracking layer follows hand and wrist positions across frames, and a gesture-heuristics engine scores concealment-like patterns sustained over a time window. The output is deliberately an advisory alert log for human review, never an accusation — the honest framing for a student system with a high false-positive rate, and the report documents the privacy and ethics boundary explicitly.

How it works

  1. Store footage frames are sampled and MediaPipe pose extracts body landmarks for each visible person.
  2. Hand and wrist landmarks are tracked across frames; dwell time in torso and pocket zones is computed per person.
  3. The gesture-heuristics engine scores concealment-like behaviors: hand-to-torso contact with rapid retraction, repeated reaching motions, product-handling followed by pocket-zone motion.
  4. Gesture patterns sustained over a time window become advisory alerts with a timestamped log entry and a frame crop.
  5. The demo app presents alerts as a review queue — a human watches each flagged segment and decides, because the system never accuses.
  6. The notebook runs the staged evaluation: labeled actors perform normal shopping and concealment scenarios, and the alert rule's precision and recall are computed.

Tech stack:

  • Python 3.10, OpenCV (video capture, landmark overlays, frame crops)
  • MediaPipe pose (real-time body landmarks, Lugaresi et al.)
  • Gesture heuristics engine (hand-to-torso rules, dwell times, time windows)
  • NumPy, pandas (gesture features and alert logs)
  • Jupyter notebook (staged-footage evaluation procedure)
  • Matplotlib (gesture timelines and evaluation plots)
  • Flask demo app with footage upload and alert-review interface
Parameter Value
Pose model MediaPipe pose, real-time body landmarks
Gesture rules Hand-to-torso contact, rapid retraction, repeated reaching, product-then-pocket patterns
Alert logic Gesture pattern sustained over a time window; isolated gestures ignored
Output Advisory alert log with timestamps and frame crops for human review
Evaluation Precision and recall of the alert rule on staged footage, computed by the notebook
Input Store footage files or camera feed
Status Advisory only — not evidence, high false-positive risk

Project features

  • MediaPipe pose extracting real-time body landmarks per visible person
  • Hand and wrist tracking across frames with dwell-time measurement
  • Gesture heuristics: hand-to-torso contact, rapid retraction, repeated reaching, product-then-pocket patterns
  • Time-window alert rule: alerts only on sustained gesture patterns
  • Advisory alert log with timestamps and frame crops for human review
  • Review-oriented demo app: browse alerts, jump to the flagged footage segment
  • Buyer-run evaluation procedure on staged footage with labeled actors
  • Notebook computing the alert rule's precision and recall on the staged set

What is included

  • Complete source code (pose pipeline, gesture engine, alert logic, review app)
  • Jupyter notebook with the buyer-run staged-footage evaluation procedure
  • Project report PDF (background, pose methodology, gesture heuristics, evaluation, ethics and limits)
  • PPT presentation for final review
  • Viva Q&A preparation document (MediaPipe, landmark tracking, gesture design, precision/recall)
  • Setup guide (environment, camera angles, staging the evaluation footage, running the pipeline)

Limitations & prerequisites

  • The alerts are advisory only, NOT evidence: the system flags gestures that merely resemble concealment, with a high false-positive risk, and must never be used to accuse, detain or report any real person.
  • Testing must use staged footage with actors or consenting-subject footage only — running it on real customers without consent and notice is a privacy violation, and the report states this ethics boundary explicitly.
  • Occlusion, crowded aisles, loose clothing and camera angles outside the staged evaluation degrade landmark quality; the pipeline flags what the camera sees, never intent.

Frequently Asked Questions

How is this different from a CNN that classifies "shoplifting" frames?

Pose estimation tracks body mechanics — hand positions, dwell times, motion sequences — rather than raw pixels. The alerts are interpretable ("hand entered pocket zone for 4 seconds after handling a product"), which is exactly what a human reviewer needs to judge each flag.

Can its alerts be used as evidence?

No. They are advisory flags with a high false-positive rate, built from heuristics over landmarks. The system exists to prioritize footage for human review, and it must never be used to accuse, detain or report anyone.

How is it evaluated?

On staged footage: labeled actors perform normal shopping behavior and concealment scenarios, the notebook replays the set through the pipeline and computes the alert rule's precision and recall. Real customer footage is never used for testing.

What are the privacy constraints?

Test only on staged footage with actors or footage of consenting subjects with clear notice. The report documents this ethics boundary, and the system must never be run on real people without consent.

What causes false positives?

Adjusting clothing, scratching, putting a phone in a pocket, holding items against the torso — everyday gestures the heuristics cannot distinguish from concealment. The time-window rule suppresses one-off gestures, but the residual rate is why alerts stay advisory.

What camera setup works best?

A fixed overhead or high side-angle view of the aisle with stable lighting, so MediaPipe sees full upper bodies. Camera placement guidance is part of the setup guide. Suitable for B.E./B.Tech final-year projects in Computer Science, AI/ML and Data Science.

Components & software requirements
  • Python 3.10, OpenCV (video capture, landmark overlays, frame crops)
  • MediaPipe pose (real-time body landmarks, Lugaresi et al.)
  • Gesture heuristics engine (hand-to-torso rules, dwell times, time windows)
  • NumPy, pandas (gesture features and alert logs)
  • Jupyter notebook (staged-footage evaluation procedure)
  • Matplotlib (gesture timelines and evaluation plots)
  • Flask demo app with footage upload and alert-review interface
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation