GithubHelp home page GithubHelp logo

caichangqi / smoking-faces Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chok68/smoking-faces

0.0 1.0 0.0 20.9 MB

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

License: MIT License

Python 100.00%

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

Watchers

James Cloos 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.