All Projects → deep-machine-learning → restful-yolo

deep-machine-learning / restful-yolo

Licence: other
RESTful Web Service and C++ compilable version of YOLO written in C and CUDA for object detection.

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
Cuda
1817 projects

Projects that are alternatives of or similar to restful-yolo

ansible-nvidia
No description or website provided.
Stars: ✭ 32 (+68.42%)
Mutual labels:  nvidia-docker
fahclient
Dockerized Folding@home client with NVIDIA GPU support to help battle COVID-19
Stars: ✭ 38 (+100%)
Mutual labels:  nvidia-docker
Image Super Resolution
🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
Stars: ✭ 3,293 (+17231.58%)
Mutual labels:  nvidia-docker
Nvidia Docker
Build and run Docker containers leveraging NVIDIA GPUs
Stars: ✭ 13,961 (+73378.95%)
Mutual labels:  nvidia-docker
GPU-Jupyterhub
Setting up a Jupyterhub Dockercontainer to spawn Jupyter Notebooks with GPU support (containing Tensorflow, Pytorch and Keras)
Stars: ✭ 23 (+21.05%)
Mutual labels:  nvidia-docker
docker-ce docker-compose nvidia-docker2
脚本离线安装支持 NVIDIA GPU 的 Docker 套装
Stars: ✭ 29 (+52.63%)
Mutual labels:  nvidia-docker
ngc-container-replicator
NGC Container Replicator
Stars: ✭ 19 (+0%)
Mutual labels:  nvidia-docker
docker-nvidia-glx-desktop
MATE Desktop container designed for Kubernetes supporting OpenGL GLX and Vulkan for NVIDIA GPUs with WebRTC and HTML5, providing an open source remote cloud graphics or game streaming platform. Spawns its own fully isolated X Server instead of using the host X server, therefore not requiring /tmp/.X11-unix host sockets or host configuration.
Stars: ✭ 47 (+147.37%)
Mutual labels:  nvidia-docker
folding-at-home
A Folding@Home Docker container with GPU support
Stars: ✭ 38 (+100%)
Mutual labels:  nvidia-docker
pixel-decoder
A tool for running deep learning algorithms for semantic segmentation with satellite imagery
Stars: ✭ 68 (+257.89%)
Mutual labels:  nvidia-docker
mpu
A shim driver allows in-docker nvidia-smi showing correct process list without modify anything
Stars: ✭ 27 (+42.11%)
Mutual labels:  nvidia-docker
handbrake-nvenc-docker
Handbrake GUI with Web browser and VNC access. Supports NVENC encoding
Stars: ✭ 32 (+68.42%)
Mutual labels:  nvidia-docker
lc0-docker
lc0docker: run lc0 chess client and lichess bot under Docker and Kubernetes
Stars: ✭ 26 (+36.84%)
Mutual labels:  nvidia-docker
DistributedDeepLearning
Tutorials on running distributed deep learning on Batch AI
Stars: ✭ 23 (+21.05%)
Mutual labels:  nvidia-docker

Object Detection Web API

RESTful Web Service and C++ compilable version of YOLO written in C and CUDA for object detection.

Features

  • Uses same code-base as original yolo (ie same .c files are used). Modifications include runtime bug-fixes, compile time fixes for c++, the build system itself, and wrapping a REST API around it.

  • Build system supports 2 targets -

    • original darknet-yolo (with gcc compiler),
    • darknet-cpp (with g++ compiler)
  • Up and running with OpenCV3, Ubuntu 16.04 and CUDA 8.x

Usage

  • make darknet - only yolo (original code), with OPENCV=0
  • make darknet-cpp - only the CPP version, with OPENCV=1

External Dependencies

OpenCV

OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing.

Download the latest source archive for OpenCV 3.1 from https://github.com/opencv/opencv. (Do not download it from http://opencv.org/downloads.html, because the official OpenCV 3.1 does not support CUDA 8.0.)

Compilation and Installation

git clone https://github.com/opencv/opencv
mkdir opencv/build
cd opencv/build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..    
cd opencv/build
make -j $(($(nproc) + 1))
make install

Jansson

Jansson is a C library for encoding, decoding and manipulating JSON data.

Jansson is available on Jansson's official github! here

Compilation and Installation

git clone https://github.com/akheron/jansson.git
autoreconf -fi
./configure
make
make check
make install

Restbed

Restbed is a comprehensive and consistent programming model for building applications that require seamless and secure communication over HTTP, with the ability to model a range of business processes, designed to target mobile, tablet, desktop and embedded production environments.

Restbed is available on Restbed's official github! here

Compilation and Installation

cd /usr/local/lib
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir /usr/local/lib/restbed/build
cd /usr/local/lib/restbed/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
cd /usr/local/lib/restbed/build
make -j $(($(nproc) + 1)) install

Train as below

To train the model you will need all of the VOC data from 2007 to 2012 (or different datasets). You can find links to the data here.

  • Now we need to generate the label files. We need a .txt file for each image with a line for each ground truth object in the image that looks like:

<object-class> <x> <y> <width> <height>

  • To generate these file we will run the voc_label.py script in scripts/ directory.
python voc_label.py
  • Now go to your project directory. Change the files per below:
yolo-voc.cfg - change line classes=20 to suit desired number of classes
yolo-voc.cfg - change the number of filters in the CONV layer above the region layer - (#classes + 4 + 1)*(5)
voc.data - change line classes=20, and paths to training image list file
voc.names - number of lines must be equal the number of classes
  • For training we use convolutional weights that are pre-trained on Imagenet. You can just download the weights for the convolutional layers here.

  • Now we can train! Run the command:

./darknet-cpp detector train ./cfg/voc-myclasses.data ./cfg/yolo-myconfig.cfg darknet19_448.conv.23

Run the server

  • Now we can run the object detection server! Run the command:

./darknet-cpp detector load ./cfg/voc-myclasses.data ./cfg/yolo-myconfig.cfg my-yolo.weights

How to deploy on Amazon EC2 with Docker (GPU support)

  • Assuming the NVIDIA drivers and Docker are properly installed. Install nvidia-docker and nvidia-docker-plugin.
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb
  • Now go to your project directory. In DockerImage/ folder run the command:

docker build -t <image-name> .

  • Wait for the image to be built and run a container of that image by doing:

nvidia-docker run -it -p 1984:1984 <image-name> /bin/bash

  • Just run the server inside the container and have fun!

ai-content-moderation

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].