All Projects → BMW-InnovationLab → Bmw Yolov4 Inference Api Cpu

BMW-InnovationLab / Bmw Yolov4 Inference Api Cpu

Licence: other
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bmw Yolov4 Inference Api Cpu

Bmw Tensorflow Inference Api Cpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 158 (-12.22%)
Mutual labels:  api, rest-api, object-detection, cpu, inference, bounding-boxes
Bmw Yolov4 Inference Api Gpu
This is a repository for an nocode object detection inference API using the Yolov3 and Yolov4 Darknet framework.
Stars: ✭ 237 (+31.67%)
Mutual labels:  api, rest-api, yolov3, inference, bounding-boxes
Bmw Tensorflow Inference Api Gpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 277 (+53.89%)
Mutual labels:  api, rest-api, object-detection, deep-neural-networks, inference
Realtime object detection
Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
Stars: ✭ 260 (+44.44%)
Mutual labels:  api, object-detection, deep-neural-networks, opencv
Openvino Yolov3
YoloV3/tiny-YoloV3+RaspberryPi3/Ubuntu LaptopPC+NCS/NCS2+USB Camera+Python+OpenVINO
Stars: ✭ 500 (+177.78%)
Mutual labels:  object-detection, cpu, opencv, yolov3
Trainyourownyolo
Train a state-of-the-art yolov3 object detector from scratch!
Stars: ✭ 399 (+121.67%)
Mutual labels:  object-detection, yolov3, inference
Multi Object Tracker
Multi-object trackers in Python
Stars: ✭ 451 (+150.56%)
Mutual labels:  object-detection, opencv, yolov3
Object Detection Api
Yolov3 Object Detection implemented as APIs, using TensorFlow and Flask
Stars: ✭ 177 (-1.67%)
Mutual labels:  object-detection, yolov3, inference
Yolo Tf2
yolo(all versions) implementation in keras and tensorflow 2.4
Stars: ✭ 695 (+286.11%)
Mutual labels:  object-detection, deep-neural-networks, yolov3
Bmw Yolov4 Training Automation
This repository allows you to get started with training a state-of-the-art Deep Learning model with little to no configuration needed! You provide your labeled dataset or label your dataset using our BMW-LabelTool-Lite and you can start the training right away and monitor it in many different ways like TensorBoard or a custom REST API and GUI. NoCode training with YOLOv4 and YOLOV3 has never been so easy.
Stars: ✭ 533 (+196.11%)
Mutual labels:  rest-api, object-detection, yolov3
Hey Jetson
Deep Learning based Automatic Speech Recognition with attention for the Nvidia Jetson.
Stars: ✭ 161 (-10.56%)
Mutual labels:  rest-api, deep-neural-networks, inference
Yolo annotation tool
Annotation tool for YOLO in opencv
Stars: ✭ 17 (-90.56%)
Mutual labels:  object-detection, opencv, yolov3
Bmw Tensorflow Training Gui
This repository allows you to get started with a gui based training a State-of-the-art Deep Learning model with little to no configuration needed! NoCode training with TensorFlow has never been so easy.
Stars: ✭ 736 (+308.89%)
Mutual labels:  rest-api, object-detection, deep-neural-networks
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+431.11%)
Mutual labels:  object-detection, deep-neural-networks, opencv
Mmdetection To Tensorrt
convert mmdetection model to tensorrt, support fp16, int8, batch input, dynamic shape etc.
Stars: ✭ 262 (+45.56%)
Mutual labels:  object-detection, yolov3, inference
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (+223.33%)
Mutual labels:  object-detection, deep-neural-networks, opencv
Computer Vision Guide
📖 This guide is to help you understand the basics of the computerized image and develop computer vision projects with OpenCV. Includes Python, Java, JavaScript, C# and C++ examples.
Stars: ✭ 244 (+35.56%)
Mutual labels:  object-detection, deep-neural-networks, opencv
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (+676.11%)
Mutual labels:  object-detection, deep-neural-networks, yolov3
Openlabeling
Label images and video for Computer Vision applications
Stars: ✭ 706 (+292.22%)
Mutual labels:  object-detection, opencv, bounding-boxes
Server
Serve your Rubix ML models in production with scalable stand-alone model inference servers.
Stars: ✭ 30 (-83.33%)
Mutual labels:  api, rest-api, inference

YOLO v4-v3 CPU Inference API for Windows and Linux

This is a repository for an object detection inference API using the Yolov4 and Yolo v3 Opencv.

The inference REST API works on CPU and doesn't require any GPU usage. It's supported on both Windows and Linux Operating systems.

Models trained using our training Yolov4 or Yolov3 repository can be deployed in this API. Several object detection models can be loaded and used at the same time.

This repo can be deployed using either docker or docker swarm.

Please use docker swarm only if you need to:

  • Provide redundancy in terms of API containers: In case a container went down, the incoming requests will be redirected to another running instance.

  • Coordinate between the containers: Swarm will orchestrate between the APIs and choose one of them to listen to the incoming request.

  • Scale up the Inference service in order to get a faster prediction especially if there's traffic on the service.

If none of the aforementioned requirements are needed, simply use docker.

predict image

Prerequisites

  • OS:
    • Ubuntu 16.04/18.04
    • Windows 10 pro/enterprise
  • Docker

Check for prerequisites

To check if you have docker-ce installed:

docker --version

Install prerequisites

Ubuntu

Use the following command to install docker on Ubuntu:

chmod +x install_prerequisites.sh && source install_prerequisites.sh

Windows 10

To install Docker on Windows, please follow the link.

P.S: For Windows users, open the Docker Desktop menu by clicking the Docker Icon in the Notifications area. Select Settings, and then Advanced tab to adjust the resources available to Docker Engine.

Build The Docker Image

In order to build the project run the following command from the project's root directory:

sudo docker build -t yolov4_inference_api_cpu -f ./docker/dockerfile .

Behind a proxy

sudo docker build --build-arg http_proxy='' --build-arg https_proxy='' -t yolov4_inference_api_cpu -f ./docker/dockerfile .

Run The Docker Container

As mentioned before, this container can be deployed using either docker or docker swarm.

If you wish to deploy this API using docker, please issue the following run command.

If you wish to deploy this API using docker swarm, please refer to following link docker swarm documentation. After deploying the API with docker swarm, please consider returning to this documentation for further information about the API endpoints as well as the model structure sections.

To run the API, go the to the API's directory and run the following:

Using Linux based docker:

sudo docker run -itv $(pwd)/models:/models -v $(pwd)/models_hash:/models_hash -p <docker_host_port>:7770 yolov4_inference_api_cpu

Using Windows based docker:

docker run -itv ${PWD}/models:/models -v ${PWD}/models_hash:/models_hash -p <docker_host_port>:7770 yolov4_inference_api_cpu

The <docker_host_port> can be any unique port of your choice.

The API file will be run automatically, and the service will listen to http requests on the chosen port.

API Endpoints

To see all available endpoints, open your favorite browser and navigate to:

http://<machine_IP>:<docker_host_port>/docs

The 'predict_batch' endpoint is not shown on swagger. The list of files input is not yet supported.

P.S: If you are using custom endpoints like /load, /detect, and /get_labels, you should always use the /load endpoint first and then use /detect or /get_labels

Endpoints summary

/load (GET)

Loads all available models and returns every model with it's hashed value. Loaded models are stored and aren't loaded again

load model

/detect (POST)

Performs inference on specified model, image, and returns bounding-boxes

detect image

/get_labels (POST)

Returns all of the specified model labels with their hashed values

get model labels

/models/{model_name}/predict_image (POST)

Performs inference on specified model, image, draws bounding boxes on the image, and returns the actual image as response

predict image

/models (GET)

Lists all available models

/models/{model_name}/load (GET)

Loads the specified model. Loaded models are stored and aren't loaded again

/models/{model_name}/predict (POST)

Performs inference on specified model, image, and returns bounding boxes.

/models/{model_name}/labels (GET)

Returns all of the specified model labels

/models/{model_name}/config (GET)

Returns the specified model's configuration

/models/{model_name}/predict_batch (POST)

Performs inference on specified model and a list of images, and returns bounding boxes

P.S: Custom endpoints like /load, /detect, and /get_labels should be used in a chronological order. First you have to call /load, and then call /detect or /get_labels

Model structure

The folder "models" contains subfolders of all the models to be loaded. Inside each subfolder there should be a:

  • Cfg file (yolo-obj.cfg): contains the configuration of the model

  • Weights file (yolo-obj.weights)

  • Names file (obj.names) : contains the names of the classes

  • Config.json (This is a json file containing information about the model)

      {
        "inference_engine_name": "yolov4_opencv_cpu_detection",
        "confidence": 60,
        "nms_threshold": 0.6,
        "image": {
          "width": 416,
          "height": 416,
          "scale": 0.00392,
          "swapRB": true,
          "crop": false,
          "mean": {
            "R": 0,
            "G": 0,
            "B": 0
          }
        },
        "framework": "yolo",
        "type": "detection",
        "network": "network_name"
      }
    

    P.S

    • You can choose "inference_engine_name": between yolov4_opencv_cpu_detection and yolov3_opencv_cpu_detection depending on the model you have.

    • You can change confidence and nms_threshold values while running the API

    • The API will return bounding boxes with a confidence higher than the "confidence" value. A high "confidence" can show you only accurate predictions

Benchmarking

Ubuntu
Network\Hardware Intel Xeon CPU 2.3 GHz Intel Core i9-7900 3.3 GHZ Tesla V100
COCO Dataset 0.259 seconds/image 0.281 seconds/image 0.0691 seconds/image

Acknowledgment

inmind.ai

robotron.de

Antoine Charbel, inmind.ai , Beirut, Lebanon

Daniel Anani, inmind.ai, Beirut, Lebanon

Hadi Koubeissy, Beirut, Lebanon

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].