All Projects → philipperemy → Yolo 9000

philipperemy / Yolo 9000

Licence: apache-2.0
YOLO9000: Better, Faster, Stronger - Real-Time Object Detection. 9000 classes!

Projects that are alternatives of or similar to Yolo 9000

Pytorch Caffe Darknet Convert
convert between pytorch, caffe prototxt/weights and darknet cfg/weights
Stars: ✭ 867 (-17.98%)
Mutual labels:  yolo, darknet, yolo2
Yolov2.pytorch
YOLOv2 algorithm reimplementation with pytorch
Stars: ✭ 31 (-97.07%)
Mutual labels:  yolo, darknet, yolo2
VideoRecognition-realtime-autotrainer-alerts
State of the art object detection in real-time using YOLOV3 algorithm. Augmented with a process that allows easy training of the classifier as a plug & play solution . Provides alert if an item in an alert list is detected.
Stars: ✭ 36 (-96.59%)
Mutual labels:  yolo, darknet, yolo2
Yolo2 Pytorch
YOLOv2 in PyTorch
Stars: ✭ 1,393 (+31.79%)
Mutual labels:  yolo, darknet, yolo2
Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (-51.28%)
Mutual labels:  yolo, darknet, yolo2
Tracking-with-darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 522 (-50.61%)
Mutual labels:  yolo, darknet, yolo2
Pytorch Yolo2
Convert https://pjreddie.com/darknet/yolo/ into pytorch
Stars: ✭ 941 (-10.97%)
Mutual labels:  yolo, darknet, yolo2
Yolo annotation tool
Annotation tool for YOLO in opencv
Stars: ✭ 17 (-98.39%)
Mutual labels:  yolo, darknet
MXNet-YOLO
mxnet implementation of yolo and darknet2mxnet converter
Stars: ✭ 17 (-98.39%)
Mutual labels:  darknet, yolo2
Gender Age Classification
gender/age classification
Stars: ✭ 39 (-96.31%)
Mutual labels:  yolo, yolo2
Alturos.yolo
C# Yolo Darknet Wrapper (real-time object detection)
Stars: ✭ 308 (-70.86%)
Mutual labels:  yolo, yolo2
darknet2caffe
Conversion of yolo from DarkNet to Caffe
Stars: ✭ 25 (-97.63%)
Mutual labels:  yolo, darknet
DarkHelp
C++ wrapper library for Darknet
Stars: ✭ 65 (-93.85%)
Mutual labels:  yolo, darknet
Node Yolo
Node bindings for YOLO/Darknet image recognition library
Stars: ✭ 364 (-65.56%)
Mutual labels:  yolo, darknet
DarkMark
Marking up images for use with Darknet.
Stars: ✭ 62 (-94.13%)
Mutual labels:  yolo, darknet
Mobilenet Yolo
A caffe implementation of MobileNet-YOLO detection network
Stars: ✭ 825 (-21.95%)
Mutual labels:  yolo, darknet
live-cctv
To detect any reasonable change in a live cctv to avoid large storage of data. Once, we notice a change, our goal would be track that object or person causing it. We would be using Computer vision concepts. Our major focus will be on Deep Learning and will try to add as many features in the process.
Stars: ✭ 23 (-97.82%)
Mutual labels:  yolo, darknet
Tensorflow 2.x Yolov3
YOLOv3 implementation in TensorFlow 2.3.1
Stars: ✭ 300 (-71.62%)
Mutual labels:  yolo, darknet
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 (-49.57%)
Mutual labels:  yolo, darknet
object-tracking
Multiple Object Tracking System in Keras + (Detection Network - YOLO)
Stars: ✭ 89 (-91.58%)
Mutual labels:  yolo, darknet

Yolo 9000

CI

YOLO9000: Better, Faster, Stronger - Real-Time Object Detection (State of the art). Official repository of CVPR17.


Scroll down if you want to make your own video.

How to get started?

Ubuntu/Linux/Mac OS

git clone --recursive https://github.com/philipperemy/yolo-9000.git
cd yolo-9000
cat yolo9000-weights/x* > yolo9000-weights/yolo9000.weights # it was generated from split -b 95m yolo9000.weights
cd darknet 
make # Will run on CPU. For GPU support, scroll down!
./darknet detector test cfg/combine9k.data cfg/yolo9000.cfg ../yolo9000-weights/yolo9000.weights data/horses.jpg

Windows

git clone --recursive https://github.com/philipperemy/yolo-9000.git
cd yolo-9000
type yolo9000-weights\xaa yolo9000-weights\xab > yolo9000-weights\yolo9000.weights
certUtil -hashfile yolo9000-weights\yolo9000.weights MD5
cd darknet
git reset --hard b61bcf544e8dbcbd2e978ca6a716fa96b37df767

You can use the latest version of darknet by running this command in the directory yolo-9000:

git submodule foreach git pull origin master

The output should be something like:

layer     filters    size              input                output
    0 conv     32  3 x 3 / 1   544 x 544 x   3   ->   544 x 544 x  32
    1 max          2 x 2 / 2   544 x 544 x  32   ->   272 x 272 x  32
    2 conv     64  3 x 3 / 1   272 x 272 x  32   ->   272 x 272 x  64
    3 max          2 x 2 / 2   272 x 272 x  64   ->   136 x 136 x  64
    4 conv    128  3 x 3 / 1   136 x 136 x  64   ->   136 x 136 x 128
    5 conv     64  1 x 1 / 1   136 x 136 x 128   ->   136 x 136 x  64
    6 conv    128  3 x 3 / 1   136 x 136 x  64   ->   136 x 136 x 128
    7 max          2 x 2 / 2   136 x 136 x 128   ->    68 x  68 x 128
    8 conv    256  3 x 3 / 1    68 x  68 x 128   ->    68 x  68 x 256
    9 conv    128  1 x 1 / 1    68 x  68 x 256   ->    68 x  68 x 128
   10 conv    256  3 x 3 / 1    68 x  68 x 128   ->    68 x  68 x 256
   11 max          2 x 2 / 2    68 x  68 x 256   ->    34 x  34 x 256
   12 conv    512  3 x 3 / 1    34 x  34 x 256   ->    34 x  34 x 512
   13 conv    256  1 x 1 / 1    34 x  34 x 512   ->    34 x  34 x 256
   14 conv    512  3 x 3 / 1    34 x  34 x 256   ->    34 x  34 x 512
   15 conv    256  1 x 1 / 1    34 x  34 x 512   ->    34 x  34 x 256
   16 conv    512  3 x 3 / 1    34 x  34 x 256   ->    34 x  34 x 512
   17 max          2 x 2 / 2    34 x  34 x 512   ->    17 x  17 x 512
   18 conv   1024  3 x 3 / 1    17 x  17 x 512   ->    17 x  17 x1024
   19 conv    512  1 x 1 / 1    17 x  17 x1024   ->    17 x  17 x 512
   20 conv   1024  3 x 3 / 1    17 x  17 x 512   ->    17 x  17 x1024
   21 conv    512  1 x 1 / 1    17 x  17 x1024   ->    17 x  17 x 512
   22 conv   1024  3 x 3 / 1    17 x  17 x 512   ->    17 x  17 x1024
   23 conv  28269  1 x 1 / 1    17 x  17 x1024   ->    17 x  17 x28269
   24 detection
Loading weights from ../yolo9000-weights/yolo9000.weights...Done!
data/horses.jpg: Predicted in 7.556429 seconds.
wild horse: 50%
Shetland pony: 84%
Aberdeen Angus: 72%
Not compiled with OpenCV, saving to predictions.png instead

The image with the bounding boxes is in predictions.png.

Names of the 9k classes

Available here:

Examples

./darknet detector test cfg/combine9k.data cfg/yolo9000.cfg ../yolo9000-weights/yolo9000.weights data/horses.jpg



./darknet detector test cfg/combine9k.data cfg/yolo9000.cfg ../yolo9000-weights/yolo9000.weights data/person.jpg



Browse on https://pjreddie.com/darknet/yolo/ to find how to compile it for GPU as well. It's much faster!

GPU Support

Make sure that your NVIDIA GPU is properly configured beforehand. nvcc should be in the PATH. If not, something like this should do the job:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Let's now compile darknet with GPU support!

cd darknet
make clean
vim Makefile # Change the first two lines to: GPU=1 and CUDNN=1. You can also use emacs or nano!
make
./darknet detector test cfg/combine9k.data cfg/yolo9000.cfg ../yolo9000-weights/yolo9000.weights data/dog.jpg

The inference should be much faster:

Loading weights from ../yolo9000-weights/yolo9000.weights...Done!
data/dog.jpg: Predicted in 0.035112 seconds.
car: 70%
canine: 56%
bicycle: 57%
Not compiled with OpenCV, saving to predictions.png instead

You can also run the command and monitor its status with nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  TITAN X (Pascal)    Off  | 0000:02:00.0      On |                  N/A |
| 26%   49C    P2    76W / 250W |   4206MiB / 12189MiB |     10%      Default |
+-------------------------------+----------------------+----------------------+
|   1  TITAN X (Pascal)    Off  | 0000:04:00.0     Off |                  N/A |
| 29%   50C    P8    20W / 250W |      3MiB / 12189MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   2  TITAN X (Pascal)    Off  | 0000:05:00.0     Off |                  N/A |
| 31%   53C    P8    18W / 250W |      3MiB / 12189MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   3  TITAN X (Pascal)    Off  | 0000:06:00.0     Off |                  N/A |
| 29%   50C    P8    22W / 250W |      3MiB / 12189MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0     30782    C   ./darknet                                     3991MiB |
+-----------------------------------------------------------------------------+

Here, we can see that our process darknet is running on the first GPU.

NOTE: We highly recommend a recent GPU with 8GB (or more) of memory to run flawlessly. GTX 1070, GTX 1080 Ti or Titan X are a great choice!

Make your own video! (Ubuntu/Linux)

First we have to install some dependencies (OpenCV and ffmpeg):

sudo apt-get install libopencv-dev python-opencv ffmpeg
cd darknet
make clean
vim Makefile # Change the first three lines to: GPU=1, CUDNN=1 and OPENCV=1. You can also use emacs or nano!
make
./darknet detector demo cfg/combine9k.data cfg/yolo9000.cfg ../yolo9000-weights/yolo9000.weights  -prefix output <path_to_your_video_mp4> -thresh 0.15

By default the threshold is set to 0.25. It means that Yolo displays the bounding boxes of elements with a 25%+ confidence. In practice, a lower threshold means more detected items (but also more errors).

Once this command returns, we merge the output images in a video:

ffmpeg -framerate 25 -i output_%08d.jpg output.mp4

We can now safely remove the temporary generated images:

rm output_*.jpg

The final video is output.mp4.

Convert the weights to Keras

Comment the following lines in the yolo9000.cfg file:

batch=1
subdivisions=1

Then browse the instructions at:

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