Giter VIP home page Giter VIP logo

smoking-faces's Introduction

smoking-faces

Power Up Automation

Overview

This is a command line tool that analyze videos and detects if a person is smoking.

Demo video

https://youtu.be/8t70o5xGK60

Installation video

https://youtu.be/z45phsGa-BI

Setup

  • Windows 10
  • Python 3.6
  • Python PIP (installed along with Python)

Create and activate virtual env

Clone the repo to its own directory (e.g. smoking-faces) and inside the smoking-faces directory enter:

python -m venv myenv && myenv\Scripts\activate

Upgrade pip

You should consider upgrading Python Pip...

python -m pip install --upgrade pip

Install Python requirements

pip install -r requirements.txt

Model files

Download from: https://drive.google.com/open?id=1xk49IqOkQLLyMD3Uhj79E6d9sDJTjNRy

These files are:

  • hr_res101 - Tiny_Faces_in_Tensorflow converted as per their instructions (see below)
  • smoking-faces-output-graph.pb (smoking face detection tensorflow graph)
  • smoking-faces-output-graph.txt

Once you've downloaded the files, please put them into smoking-faces\detector\data\models directory.

About Tiny_Faces_in_Tensorflow: A Tensorflow Tiny Face Detector, implementing "Finding Tiny Faces" https://github.com/cydonia999/Tiny_Faces_in_Tensorflow

Running

Launch the tool using this syntax:

python smokingdetection.py (video_filename.mp4) "screen" (video_fps)

E.g.

python smokingdetection.py "data\videos\Smoking & Driving.mp4" "screen" 15

Verification

People smoking

People is not smoking

smoking-faces's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smoking-faces's Issues

training code

Thanks for your sharing! could you please provide training code to me? I hope I can get your help, thank you very much.

SyntaxError while running the program

Thank you for your brilliant program. I already installed the environment according to your readme instructions, but I now encounter a SyntaxError while running the program.
Would you please help me check what might cause this error? I already checked the path name or punctuation.

The error message is

File "", line 1
python smokingdetection.py "C:/Users/Karina/smokingfaces/data/videos/Smoking&Driving.mp4" "screen" 15
^
SyntaxError: invalid syntax

Thank you.

dataset

Thank you for sharing the project. Can you provide a link to download the training dataset? Thank you very much

module 'pylab' has no attribute 'frange'

When I try to run the code, I find that it has a attributeerror which says module 'pylab' has no attribute 'frange'. Does anyone know how to solve this problem?

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.