1amitos1 / Shoplifting-Detection

SL -Shoplifting detection Provides real-time alerts for the SMB market retailers, to monitor and report customer behavior when shoplifting incidents occur. 3D Convolutional Neural Network in Keras and AWS Sagemaker for model training and evaluation.
84 stars 31 forks source link

Shoplifting-Detection


Project creators

SL -Shoplifting detection Provides real-time alerts for the SMB market retailers, to monitor and report customer behavior when shoplifting occur, by analyzing security camera frames and performing real-time forecasting using cutting edge lightweight deep neural network 3D-CNN architecture

Table of contents


Project highlights


Architecture advantages:

Introduction


Computer vision and Human action recognition quick overview

Problem statement

Real-time analysis of each camera has become an exhaustive task due to human limitations. The primary human limitation is the visual focus of attention. The human gaze can only concentrate on one specific point at once. Although there are large screens and high-resolution cameras, a person can only regard a small segment of the image at a time. Thieves are well aware that watching all the video footage is too demanding for "SMBs" such as retailers\ grocery\convenience stores, which makes the technology lose its role as a deterrent.

Project goals:

provides a comprehensive solution for monitoring and detecting unusual events in real-time without the need for human supervision, the system will alert on a variety of scenarios. The following example describes the chain of events in the case of a shoplifting incident, where the customer steals an alcoholic beverage and hides it in a bag.

sl_proecess_1

When one of these actions will detected by our AI model, we will provide the store owner with an immediate alert.

The system monitors basic customer activities in the store, activities that we will define as pre- crime such as:

And activities that we will define as crime lapse in which our system will monitor and report in real- time on a case of theft in the store. crime lapse activities such as:

Data


Data collection

In order to train deep learning models, the first step is data collection raw video data collected from security cameras from two supermarkets, the theft was committed by actors in several different theft scenarios inside the store

Scenarios tested:

All the cases of theft were examined in a variety of shooting angles, and by rotation of actors and clothing.

we collect 4000 video clips after the filtering process. A link to the dataset sample is provided, for the entire Dataset

send email to info@silentvision.org

Model architecture


Network name: Gate_Flow_SlowFast

Model description:

Inspired by SlowFast Networks for Video Recognition and the mobileNet-SSD architecture. this Model design combines the Tow gate stream architecture and the SlowFastNetwork architecture. The idea is to simulate the human brain in the aspect of visual information processing and split the data into 2 channels.

For an in-depth understanding of the topic, I suggest reading the original paper SlowFast Networks for Video Recognition

The model architecture is based on mobileNet SSD. And the highlight of this model is utilizing tow path Slow and Fast, and for each path, there are tow channel one for optical flow and one for RGB channel.

Common models in the field of HAR

MODEL PLOT

Model training && Evaluation

The model was trained in the AWS-SageMaker environment, on instance of ec2 p3.2xlarge and for machine learning implementation TensorFlow ,Keras Python,OpenCV.

We try the Adam optimization algorithm with the common value for parameters beta 1 beta 2, epsilon as show in the table

T2

Achieved 87% in F1-score Examination of the model on our dataset achieved 85.77% in F1-score Compared to the SlowFast model we got the following results 76% ee

Input-Output

SL_event_record_1__ (1) SL_event_record_1__ SL_event_record_4__ SL_event_record_5__ SL_event_record_6__ (1) SL_event_record_6__ (2) SL_event_record_6__ SL_event_record_7__ (1) SL_event_record_7__ SL_THEFT_3 SL_event_record_4__ (1)

https://user-images.githubusercontent.com/34807427/171149238-3cabeffb-1087-4748-b7ca-1927cd4cf6f8.mp4

https://user-images.githubusercontent.com/34807427/171149909-50489465-6fb0-4e61-ad56-927233318259.mp4