GithubHelp home page GithubHelp logo

fagan2888 / object-detection-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atharva-18/object-detection-api

0.0 0.0 0.0 2.07 MB

A django web-app that provides object detection using YOLOv3 and an API.

Home Page: https://object-detection-yolo.herokuapp.com/

License: GNU General Public License v3.0

Python 81.69% CSS 6.07% JavaScript 5.19% HTML 7.05%

object-detection-api's Introduction

Object-Detection-API

A web-app that provides object detection using YOLOv3 and also an API.

It's implemented using django framework and PyTorch (for YOLO model). The app uses cloudinary API for image hosting.

Maintenance GitHub pull-requests GitHub issues
GitHub contributors Generic badge

Dependencies

You also need to download the yolo.weights file and place it in the "weights" directory.

You can download the weights by -

    $ wget https://pjreddie.com/media/files/yolov3.weights

Usage

Firstly, you need to put your cloudinary credentials (cloud_name, api_key and api_secret) in settings.py file.

To run the server

    $ pip3 install -r requirements.txt
    $ python3 manage.py collectstatic
    $ python3 manage.py runserver

The website is hosted at - https://object-detection-yolo.herokuapp.com

The detection service is currently not working because of memory limits of Heroku.

Web API

To use the web API, you can send a POST request to - https://object-detection-yolo.herokuapp.com/detect/api

Input

You can send either of the following parameters -

Parameter Type Description
image file Image file that you want to detect.
image64 text Image in base64 form that you want to detect. Currently supports JPEG images only

Result

Parameter Type Description
success bool Whether classification was successful or not
detect class label, float pair of label and its confidence
url image URL Link to the result image uploaded to cloudinary

Example: {"success": true, "detect": { "dog": 0.9989, "truck": 0.9999 }, 'url':"https://example.com/image.png"}
"detect" will be empty if no objects are detected.

Example

The website also shows the detection output with bounding boxes around the detected objects. There will be no box if the input doesn't contain any object.

Input

Dog

Output

Output

No. of objects detected - 3

The result image is generated using matplotlib.

TO-DO

  • Move app to Google Cloud Platform
  • Create a docker image

Contribute

If you want to contribute and/or find any bug, feel free to do a pull request!

object-detection-api's People

Contributors

atharva-18 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.