# Yolo-v2 Windows and Linux version
[![CircleCI](https://circleci.com/gh/AlexeyAB/darknet.svg?style=svg)](https://circleci.com/gh/AlexeyAB/darknet)
1. [How to use](#how-to-use)
2. [How to compile on Linux](#how-to-compile-on-linux)
3. [How to compile on Windows](#how-to-compile-on-windows)
4. [How to train (Pascal VOC Data)](#how-to-train-pascal-voc-data)
5. [How to train (to detect your custom objects)](#how-to-train-to-detect-your-custom-objects)
6. [When should I stop training](#when-should-i-stop-training)
7. [How to calculate mAP on PascalVOC 2007](#how-to-calculate-map-on-pascalvoc-2007)
8. [How to improve object detection](#how-to-improve-object-detection)
9. [How to mark bounded boxes of objects and create annotation files](#how-to-mark-bounded-boxes-of-objects-and-create-annotation-files)
10. [Using Yolo9000](#using-yolo9000)
11. [How to use Yolo as DLL](#how-to-use-yolo-as-dll)
| ![Darknet Logo](http://pjreddie.com/media/files/darknet-black-small.png) | ![map_fps](https://hsto.org/files/a24/21e/068/a2421e0689fb43f08584de9d44c2215f.jpg) https://arxiv.org/abs/1612.08242 |
|---|---|
| ![Darknet Logo](http://pjreddie.com/media/files/darknet-black-small.png) | ![map_fps](https://hsto.org/files/3a6/fdf/b53/3a6fdfb533f34cee9b52bdd9bb0b19d9.jpg) https://arxiv.org/abs/1612.08242 |
|---|---|
# "You Only Look Once: Unified, Real-Time Object Detection (version 2)"
A Yolo cross-platform Windows and Linux version (for object detection). Contributtors: https://github.com/pjreddie/darknet/graphs/contributors
This repository is forked from Linux-version: https://github.com/pjreddie/darknet
More details: http://pjreddie.com/darknet/yolo/
This repository supports:
* both Windows and Linux
* both OpenCV 2.x.x and OpenCV <= 3.4.0 (3.4.1 and higher isn't supported)
* both cuDNN v5-v7
* CUDA >= 7.5
* also create SO-library on Linux and DLL-library on Windows
##### Requires:
* **Linux GCC>=4.9 or Windows MS Visual Studio 2015 (v140)**: https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409 (or offline [ISO image](https://go.microsoft.com/fwlink/?LinkId=615448&clcid=0x409))
* **CUDA 9.1**: https://developer.nvidia.com/cuda-downloads
* **OpenCV 3.4.0**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.4.0/opencv-3.4.0-vc14_vc15.exe/download
* **or OpenCV 2.4.13**: https://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.13/opencv-2.4.13.2-vc14.exe/download
- OpenCV allows to show image or video detection in the window and store result to file that specified in command line `-out_filename res.avi`
* **GPU with CC >= 2.0** if you use CUDA, or **GPU CC >= 3.0** if you use cuDNN + CUDA: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
##### Pre-trained models for different cfg-files can be downloaded from (smaller -> faster & lower quality):
* `yolo.cfg` (194 MB COCO-model) - require 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo.weights
* `yolo-voc.cfg` (194 MB VOC-model) - require 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo-voc.weights
* `tiny-yolo.cfg` (60 MB COCO-model) - require 1 GB GPU-RAM: http://pjreddie.com/media/files/tiny-yolo.weights
* `tiny-yolo-voc.cfg` (60 MB VOC-model) - require 1 GB GPU-RAM: http://pjreddie.com/media/files/tiny-yolo-voc.weights
* `yolo9000.cfg` (186 MB Yolo9000-model) - require 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo9000.weights
Put it near compiled: darknet.exe
You can get cfg-files by path: `darknet/cfg/`
##### Examples of results:
[![Everything Is AWESOME](http://img.youtube.com/vi/VOC3huqHrss/0.jpg)](https://www.youtube.com/watch?v=VOC3huqHrss "Everything Is AWESOME")
Others: https://www.youtube.com/channel/UC7ev3hNVkx4DzZ3LO19oebg
### How to use:
##### Example of usage in cmd-files from `build\darknet\x64\`:
* `darknet_voc.cmd` - initialization with 194 MB VOC-model yolo-voc.weights & yolo-voc.cfg and waiting for entering the name of the image file
* `darknet_demo_voc.cmd` - initialization with 194 MB VOC-model yolo-voc.weights & yolo-voc.cfg and play your video file which you must rename to: test.mp4
* `darknet_demo_store.cmd` - initialization with 194 MB VOC-model yolo-voc.weights & yolo-voc.cfg and play your video file which you must rename to: test.mp4, and store result to: res.avi
* `darknet_net_cam_voc.cmd` - initialization with 194 MB VOC-model, play video from network video-camera mjpeg-stream (also from you phone)
* `darknet_web_cam_voc.cmd` - initialization with 194 MB VOC-model, play video from Web-Camera number #0
* `darknet_coco_9000.cmd` - initialization with 186 MB Yolo9000 COCO-model, and show detection on the image: dog.jpg
* `darknet_coco_9000_demo.cmd` - initialization with 186 MB Yolo9000 COCO-model, and show detection on the video (if it is present): street4k.mp4, and store result to: res.avi
##### How to use on the command line:
On Linux use `./darknet` instead of `darknet.exe`, like this:`./darknet detector test ./cfg/coco.data ./cfg/yolo.cfg ./yolo.weights`
* 194 MB COCO-model - image: `darknet.exe detector test data/coco.data yolo.cfg yolo.weights -i 0 -thresh 0.2`
* Alternative method 194 MB COCO-model - image: `darknet.exe detect yolo.cfg yolo.weights -i 0 -thresh 0.2`
* 194 MB VOC-model - image: `darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights -i 0`
* 194 MB COCO-model - video: `darknet.exe detector demo data/coco.data yolo.cfg yolo.weights test.mp4 -i 0`
* 194 MB VOC-model - video: `darknet.exe detector demo data/voc.data yolo-voc.cfg yolo-voc.weights test.mp4 -i 0`
* 194 MB COCO-model - **save result to the file res.avi**: `darknet.exe detector demo data/coco.data yolo.cfg yolo.weights test.mp4 -i 0 -out_filename res.avi`
* 194 MB VOC-model - **save result to the file res.avi**: `darknet.exe detector demo data/voc.data yolo-voc.cfg yolo-voc.weights test.mp4 -i 0 -out_filename res.avi`
* Alternative method 194 MB VOC-model - video: `darknet.exe yolo demo yolo-voc.cfg yolo-voc.weights test.mp4 -i 0`
* 60 MB VOC-model for video: `darknet.exe detector demo data/voc.data tiny-yolo-voc.cfg tiny-yolo-voc.weights test.mp4 -i 0`
* 194 MB COCO-model for net-videocam - Smart WebCam: `darknet.exe detector demo data/coco.data yolo.cfg yolo.weights http://192.168.0.80:8080/video?dummy=param.mjpg -i 0`
* 194 MB VOC-model for net-videocam - Smart WebCam: `darknet.exe detector demo data/voc.data yolo-voc.cfg yolo-voc.weights http://192.168.0.80:8080/video?dummy=param.mjpg -i 0`
* 194 MB VOC-model - WebCamera #0: `darknet.exe detector demo data/voc.data yolo-voc.cfg yolo-voc.weights -c 0`
* 186 MB Yolo9000 - image: `darknet.exe detector test cfg/combine9k.data yolo9000.cfg yolo9000.weights`
* 186 MB Yolo9000 - video: `darknet.exe detector demo cfg/combine9k.data yolo9000.cfg yolo9000.weights test.mp4`
* Remeber to put data/9k.tree and data/coco9k.map under the same folder of your app if you use the cpp api to build an app
* To process a list of images `image_list.txt` and save results of detection to `result.txt` use:
`darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights < image_list.txt > result.txt`
You can comment this line so that each image does not require pressing the button ESC: https://github.com/AlexeyAB/darknet/blob/6ccb41808caf753feea58ca9df79d6367dedc434/src/detector.c#L509
##### For using network video-camera mjpeg-stream with any Android smartphone:
1. Download for Android phone mjpeg-stream soft: IP Webcam / Smart WebCam
* Smart WebCam - preferably: https://play.google.com/store/apps/details?id=com.acontech.android.SmartWebCam2
* IP Webcam: https://play.google.com/store/apps/details?id=com.pas.webcam
2. Connect your Android phone to computer by WiFi (through a WiFi-router) or USB
3. Start Smart WebCam on your phone
4. Replace the address below, on shown in the phone application (Smart WebCam) and launch:
* 194 MB COCO-model: `darknet.exe detector demo data/coco.data yolo.cfg yolo.weights http://192.168.0.80:8080/vide
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
智慧视频识别c++代码 (1860个子文件)
libpthreadGC2.a 91KB
libpthreadGCE2.a 91KB
libpthreadGC2.a 91KB
image.c 41KB
getopt.c 39KB
detector.c 37KB
parser.c 37KB
classifier.c 35KB
data.c 32KB
go.c 26KB
convolutional_layer.c 19KB
network.c 16KB
region_layer.c 16KB
darknet.c 15KB
gru_layer.c 14KB
coco.c 14KB
rnn.c 13KB
utils.c 13KB
yolo.c 12KB
captcha.c 11KB
compare.c 11KB
detection_layer.c 11KB
connected_layer.c 10KB
crnn_layer.c 10KB
nightmare.c 9KB
kmeansiou.c 9KB
rnn_layer.c 9KB
local_layer.c 9KB
gemm.c 9KB
demo.c 9KB
cifar.c 8KB
batchnorm_layer.c 8KB
blas.c 8KB
box.c 7KB
rnn_vid.c 7KB
deconvolutional_layer.c 6KB
normalization_layer.c 5KB
voxel.c 5KB
tag.c 4KB
writing.c 4KB
cuda.c 4KB
layer.c 4KB
cost_layer.c 4KB
route_layer.c 4KB
maxpool_layer.c 4KB
matrix.c 4KB
super.c 4KB
dice.c 4KB
activations.c 3KB
reorg_layer.c 3KB
reorg_old_layer.c 3KB
softmax_layer.c 3KB
crop_layer.c 3KB
tree.c 3KB
option_list.c 3KB
swag.c 3KB
cpu_gemm.c 2KB
shortcut_layer.c 2KB
art.c 2KB
avgpool_layer.c 2KB
activation_layer.c 2KB
dropout_layer.c 2KB
gettimeofday.c 1KB
list.c 1KB
col2im.c 1KB
im2col.c 1KB
densenet201_yolo.cfg 20KB
densenet201.cfg 19KB
densenet201.cfg 19KB
msr_152.cfg 16KB
msr_152.cfg 16KB
resnet152_yolo.cfg 15KB
resnet152.cfg 15KB
resnet152.cfg 15KB
msr_50.cfg 6KB
msr_50.cfg 6KB
resnet50_yolo.cfg 5KB
resnet50.cfg 5KB
resnet50.cfg 5KB
msr_34.cfg 3KB
msr_34.cfg 3KB
yolo.cfg 3KB
yolo.cfg 3KB
yolo.cfg 3KB
yolo-voc.cfg 3KB
yolo-voc.cfg 3KB
yolo-voc.cfg 3KB
yolo.train.cfg 3KB
yolo.cfg 3KB
yolo-coco.cfg 3KB
yolo2.cfg 3KB
yolo.2.0.cfg 3KB
yolo.2.0.cfg 3KB
yolo.2.0.cfg 3KB
yolo-voc.2.0.cfg 2KB
yolo-voc.2.0.cfg 2KB
yolo-voc.2.0.cfg 2KB
yolo-small.cfg 2KB
yolo9000.cfg 2KB
yolo9000.cfg 2KB
共 1860 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
- weixin_441844862020-03-03请问这个怎么使用?
皮皮君
- 粉丝: 279
- 资源: 23
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功