Code Monkey home page Code Monkey logo

yolo_service's Introduction

YOLO Object Detection Service

Dockerized object detection service using YOLO based on AlexeyAB's darknet fork and exposed as a REST API using connexion. For details see this post.

Quick start

Pull the image from Docker Hub and spin up a container:

docker run -d --rm --name yolo_service -p 8080:8080 johannestang/yolo_service:1.0-yolov3_coco 

This will expose two endpoints: detect which returns the detected classes, and annotate which returns a copy of the image annotated with the detections. Use a GET request if you want to provide an URL to the image, or a POST request if you want to upload an image file.

The service provides a user interface at localhost:8080/ui where the endpoints can be tested and the details of the input parameters are listed.

Python examples showing how to use the API are provided in the examples folder.

Image variants

You can build the images yourself using the build-local.sh script or pull them from Docker Hub. They come in multiple variants based on different models/data sets and different configurations of the darknet library. The different models are:

  1. YOLOv3 trained on the COCO dataset covering 80 classes listed here. Tag: yolov3_coco.
  2. YOLOv3 trained on the Open Images dataset covering 601 classes listed here. Tag: yolov3_openimages.
  3. YOLO9000 covering more than 9000 classes listed here. Tag: yolo9000.
  4. YOLOv4 trained on the COCO dataset covering 80 classes listed here. Tag: yolov4_coco.

The different darknet configurations:

  1. The base configuration set up to run on a CPU. Tag: 1.0
  2. Compiled using CUDA 10.0 and cudNN in order to utilize a GPU. Tag: 1.0_cuda10.0.
  3. Compiled using CUDA 10.0 and cudNN with Tensor Cores enabled in order to utilize a GPU with Tensor Cores. Tag: 1.0_cuda10.0_tc.

When using the CUDA images make sure to use Docker version 19.03 (or newer) and have NVIDIA Container Toolkit installed, then the container can be started by running e.g.:

docker run -d --rm --name yolo_service -p 8080:8080 --gpus all johannestang/yolo_service:1.0_cuda10.0-yolov3_coco 

CORS Support added

CORS support has been added for this to be used as an external service.

yolo_service's People

Contributors

johannestang avatar farrukhism avatar

Watchers

James Cloos avatar

Forkers

hassanmohiuddin

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.