Code Monkey home page Code Monkey logo

deeplearningcomputervision's Introduction

Recognition and Classification System with Deep Learning and Computer Vision Techniques

Team: Phillip Ly, Resham Rajendra Jhangiani, Anoop Jeerige, Eizat Mushtaq, Tong Zhou, Matt Corrente

Professor: Lidia Morrison

CPSC 587 Computer Vision and Deep Learning - Fall 2017 - California State University Fullerton

Link to PPT slides: https://goo.gl/BKr2zL

Language

  • Python 3.5.2

Prerequisites

  1. TensorFlow 1.3
  2. TensorFlow Object Detection API
  3. OpenCV 3.2
  4. Flask 0.12.2

Install packages

# apt-get update
# apt-get install -y protobuf-compiler python-pil python-lxml python-pip python-dev git
# pip install Flask==0.12.2 WTForms==2.1 Flask_WTF==0.14.2 Werkzeug==0.12.2

Install the Object Detection API library

# cd /opt
# git clone https://github.com/tensorflow/models
# cd models/research
# protoc object_detection/protos/*.proto --python_out=.

Download the pretrained model binaries

# mkdir -p /opt/graph_def
# cd /tmp
# for model in \
    ssd_mobilenet_v1_coco_11_06_2017 \
    ssd_inception_v2_coco_11_06_2017 \
    rfcn_resnet101_coco_11_06_2017 \
    faster_rcnn_resnet101_coco_11_06_2017 \
    faster_rcnn_inception_resnet_v2_atrous_coco_11_06_2017
  do \
    curl -OL http://download.tensorflow.org/models/object_detection/$model.tar.gz
    tar -xzf $model.tar.gz $model/frozen_inference_graph.pb
    cp -a $model /opt/graph_def/
  done
# ln -sf /opt/graph_def/faster_rcnn_resnet101_coco_11_06_2017/frozen_inference_graph.pb /opt/graph_def/frozen_inference_graph.pb

Running the application

# cd ~/realtimeCV/obj_detect_multi
# export FLASK_APP=detector.app
# flask run

You have to wait around 60secs for the application to finish loading the pretrained model graph. You'll see the message Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) when it's ready.

Now you can access the instance's IP address using a web browser. When you upload an image file with a jpeg, jpg, or png extension, the application shows the result of the object detection inference. The inference may take up to 10 seconds, depending on the image.

You can check the objects by clicking labels shown to the right of the image.

You can upload an video file (preferably small < 5MB, .mp4, 3gp), for the object detection inference. The Real-time detection take the web cam as the source for the object detection.

How to use different models

There are five pretrained models that can be used by the application. They have diffrent characteristics in terms of accuracy and speed. You can change the model used by the application by setting the PATH_TO_CKPT to point the frozen weights of the required model.

You specify one of the following models.

  • ssd_mobilenet_v1_coco_11_06_2017
  • ssd_inception_v2_coco_11_06_2017
  • rfcn_resnet101_coco_11_06_2017
  • faster_rcnn_resnet101_coco_11_06_2017
  • faster_rcnn_inception_resnet_v2_atrous_coco_11_06_2017

References

deeplearningcomputervision's People

Contributors

philliply avatar

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.