Giter Site home page Giter Site logo

faster-rcnn-flask's Introduction

faster-rcnn-flask

Small flask application demonstrating the Faster R-CNN object detection model. It takes in user input images and passes it to PyTorch's pre-trained Faster R-CNN model where it outputs predictions of objects within the input image. The predictions include bounding box coordinates, label of the object, and the confidence score probability for that object. Using the information from the predictions, I just mapped the bounding boxes and labels using Open-CV and returned that image back to the user for inspection.

Using this repository

$ git clone https://github.com/rae0924/faster-rcnn-flask.git
$ cd faster-rcnn-flask
$ python3 -m venv venv
$ source venv/bin/activate // venv/Scripts/activate for windows
$ pip3 install -r requirements.txt
$ python3 flask/run.py

The web server is hosted at http//:localhost:5000 and is accessible through your browser.

User Interface

Just upload image of choice once on the web application. Hit submit. The output of the model is shown as such:

Note: Some predictions are cut off on the image above.

Customize score threshold

I've included a way to reduce the amount of objects that are outputted into the screen by introducing a filter through score. By default, any objects under the score of 0.70 will be ignored in the mapping of bounding boxes and labels. You can change that parameter under flask/app/detection.py in the process_predictions() function. To include more objects.

faster-rcnn-flask's People

Contributors

ragibarnab avatar ra101112 avatar

Watchers

James Cloos avatar

Forkers

ivanshipanda

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.