Giter Club home page Giter Club logo

torch-opencv-demos's Introduction

Torch7-OpenCV demos

Real-time demos that use deep convolutional neural networks to classify and caption what they see in real-time from a webcam stream.

All demos use CPU, but it's trivial to fix them to work with CUDA or OpenCL.

Quick install on OS X:

brew instal opencv3 --with-contrib
OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0/share/OpenCV luarocks install cv
brew install protobuf
luarocks install loadcaffe

In Linux you have to build OpenCV3 manually. Follow the instructions in

ImageNet classification

The demo simply takes a central crop from a webcam and uses a small ImageNet classification pretrained network to classify what it see on it. top-5 predicted classes are shown on top, the top one is the most probable.

Run as th demo.lua

Example:

sunglasses

Age&Gender prediction

This demo uses two networks described here http://www.openu.ac.il/home/hassner/projects/cnn_agegender/ to predict age and gender of the faces that it finds with a simple cascade detector.

Run as

th demo.lua `locate haarcascade_frontalface_default.xml`

IMAGINE Lab gives an example:

age&gender

NeuralTalk2 demo

This demo uses NeuralTalk2 captioning code from Andrej Karpathy: https://github.com/karpathy/neuraltalk2

The code captions live webcam demo. Follow the installation instructions at https://github.com/karpathy/neuraltalk2 first and then run the demo as:

th videocaptioning.lua -gpuid -1 -model model_id1-501-1448236541_cpu.t7

Caption is displayed on top:

neuraltalk2

Realtime stylization with texture networks

Check https://github.com/DmitryUlyanov/texture_nets

screen shot 2016-04-25 at 00 08 15

Credits

2016 Sergey Zagoruyko and Egor Burkov

Thanks to VisionLabs for putting up https://github.com/VisionLabs/torch-opencv bindings!

torch-opencv-demos's People

Contributors

shrubb avatar szagoruyko avatar

Watchers

 avatar  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.