Git Product home page Git Product logo

jiyuan-yin / shoplifting-detection-through-mediapipe-and-lstm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mehedicseruet/shoplifting-detection-through-mediapipe-and-lstm

0.0 0.0 0.0 50 KB

A project that utilizes mediapipe to extract body landmarks data and trains that data using LSTM to predict whether a customer is shoplifting or not.

License: MIT License

Jupyter Notebook 100.00%

shoplifting-detection-through-mediapipe-and-lstm's Introduction

Shoplifting-Detection-Through-Mediapipe-and-LSTM

Instructions for setting up the environment:

  1. Create a virtual environment using the following command in Anaconda conda create --name myenv python==3.8.0

  1. Install the required libraries from requirements.txt using the following command pip install -r requirements.txt

  1. If you want to train the model: Run train.ipynb file

    • Change the paths of the dataset and where the model will be saved.
    • Run all the cells

    Make sure that the data matches the following criteia

    • There can't be any header
    • Number of row in the Dataset must be a multiple of window_len variable.
    • For every window_len number of data, there must be a class in the target csv file. 0 for normal, 1 for shoplifting was used during training.

  1. To test the model: Run Framework.ipynb file
    • Set the video path or camera id
    • set the model path
    • run the cells
    • If you want the color to stay red when shoplifter is detected, comment out 129,130 number line

  1. To create dataset from video: Run Dataset_Maker.ipynb
    • Change the path of the video
    • Set window_len as you needed
    • Change the order of data points if needed.
    • Set the second argument of csv open line to 'w' if this is the first time of running the code.
    • Set the second argument to 'a' if you want to merge multiple videos together.
    • Run the cells

shoplifting-detection-through-mediapipe-and-lstm's People

Contributors

mehedicseruet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.