实验室的电脑是win10,tensorflow

Yolo的tensorflow版本   https://github.com/ruiminshen/yolo-tf

YoloV2的windows版本 https://github.com/AlexeyAB/darknet

YOLO v2之总结篇(linux+windows) 点击打开链接

yolo 在windows下的配置http://blog.csdn.net/desert961467/article/details/78200787

ruiminshen/yolo2-pytorch: PyTorch implementation of the YOLO (You Only Look Once) v2
https://github.com/ruiminshen/yolo2-pytorch

如何使用:

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
命令行形式:

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.avidarknet.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.avidarknet.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 data/train.txt and save results of detection to result.txt use:
    darknet.exe detector test data/voc.data yolo-voc.cfg yolo-voc.weights -dont_show < data/train.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

  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/video?dummy=param.mjpg -i 0
  • 194 MB VOC-model: 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

----------------------------------------------------------------------------------------------------------------------------

从Windows生成的文件中又有以下命令格式

calc_anchors.cmd:  How to calculate Yolo v2 anchors using K-means++

darknet.exe detector calc_anchors data/voc.data -num_of_clusters 5 -final_width 13 -final_heigh 13

--------------------------------------------------------------------------------------------------------------------------

calc_mAP.cmd  

How to calculate mAP (mean average precision)
darknet.exe detector map data/voc.data tiny-yolo-voc.cfg tiny-yolo-voc.weights
darknet.exe detector map data/voc.data yolo-voc.cfg yolo-voc.weights

----------------------------------------------------------------------------------------------------------------------------

calc_mAP_voc_py.cmd

C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install numpy
C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install cPickle
C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install _pickle
darknet.exe detector valid data/voc.data tiny-yolo-voc.cfg tiny-yolo-voc.weights
darknet.exe detector valid data/voc.data yolo-voc.cfg yolo-voc.weights
reval_voc_py3.py --year 2007 --classes data\voc.names --image_set test --voc_dir E:\VOC2007_2012\VOCtrainval_11-May-2012\VOCdevkit results

-----------------------------------------------------------------------------------------------------------------------------

classifier_densenet201.cmd

darknet.exe classifier predict cfg/imagenet1k.data cfg/densenet201.cfg densenet201.weights
REM Download weights for DenseNet201 and ResNet50 by this link: https://pjreddie.com/darknet/imagenet/

-----------------------------------------------------------------------------------------------------------------------------

classifier_resnet50.cmd

darknet.exe classifier predict cfg/imagenet1k.data cfg/resnet50.cfg resnet50.weights
darknet.exe classifier predict cfg/imagenet1k.data cfg/resnet152.cfg resnet152.weights
REM Download weights for DenseNet201, ResNet50 and ResNet152 by this link: https://pjreddie.com/darknet/imagenet/

----------------------------------------------------------------------------------------------------------------------------


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值