开源!适用于Win和Linux平台的YOLO4和YOLO3( 三 )
How to use on the command lineOn Linux use ./darknet instead of darknet.exe, like this:./darknet detector test ./cfg/coco.data ./cfg/yolov4.cfg ./yolov4.weights
On Linux find executable file ./darknet in the root directory, while on Windows find it in the directory builddarknet\x64
- Yolo v4 COCO - image: darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -thresh 0.25
- Output coordinates of objects: darknet.exe detector test cfg/coco.data yolov4.cfg yolov4.weights -ext_output dog.jpg
- Yolo v4 COCO - video: darknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output test.mp4
- Yolo v4 COCO - WebCam 0: darknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights -c 0
- Yolo v4 COCO for net-videocam - Smart WebCam: darknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights http://192.168.0.80:8080/video?dummy=param.mjpg
- Yolo v4 - save result videofile res.avi: darknet.exe detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights test.mp4 -out_filename res.avi
- Yolo v3 Tiny COCO - video: darknet.exe detector demo cfg/coco.data cfg/yolov3-tiny.cfg yolov3-tiny.weights test.mp4
- JSON and MJPEG server that allows multiple connections from your soft or Web-browser ip-address:8070 and 8090: ./darknet detector demo ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights test50.mp4 -json_port 8070 -mjpeg_port 8090 -ext_output
- Yolo v3 Tiny on GPU #1: darknet.exe detector demo cfg/coco.data cfg/yolov3-tiny.cfg yolov3-tiny.weights -i 1 test.mp4
- Alternative method Yolo v3 COCO - image: darknet.exe detect cfg/yolov4.cfg yolov4.weights -i 0 -thresh 0.25
- Train on Amazon EC2, to see mAP & Loss-chart using URL like: http://ec2-35-160-228-91.us-west-2.compute.amazonaws.com:8090 in the Chrome/Firefox (Darknet should be compiled with OpenCV): ./darknet detector train cfg/coco.data yolov4.cfg yolov4.conv.137 -dont_show -mjpeg_port 8090 -map
- 186 MB Yolo9000 - image: darknet.exe detector test cfg/combine9k.data cfg/yolo9000.cfg yolo9000.weights
- 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.json file use: darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < data/train.txt
- To process a list of images data/train.txt and save results of detection to result.txt use:
darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -dont_show -ext_output < data/train.txt > result.txt - Pseudo-lableing - to process a list of images data/new_train.txt and save results of detection in Yolo training format for each image as label <image_name>.txt (in this way you can increase the amount of training data) use: darknet.exe detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -thresh 0.25 -dont_show -save_labels < data/new_train.txt
- To calculate anchors: darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -height 416
- To check accuracy mAP@IoU=50: darknet.exe detector map data/obj.data yolo-obj.cfg backupyolo-obj_7000.weights
- To check accuracy mAP@IoU=75: darknet.exe detector map data/obj.data yolo-obj.cfg backupyolo-obj_7000.weights -iou_thresh 0.75
- Download for Android phone mjpeg-stream soft: IP Webcam / Smart WebCamSmart WebCam - preferably: https://play.google.com/store/apps/details?id=com.acontech.android.SmartWebCam2IP Webcam: https://play.google.com/store/apps/details?id=com.pas.webcam
- Connect your Android phone to computer by WiFi (through a WiFi-router) or USB
- Start Smart WebCam on your phone
- Replace the address below, on shown in the phone application (Smart WebCam) and launch:
- Yolo v4 COCO-model: darknet.exe detector demo data/coco.data yolov4.cfg yolov4.weights http://192.168.0.80:8080/video?dummy=param.mjpg -i 0
Open a bash terminal inside the cloned repository and launch:
./build.sh
How to compile on Linux (using make)Just do make in the darknet directory. (You can try to compile and run it on Google Colab in cloud link (press «Open in Playground» button at the top-left corner) and watch the video link ) Before make, you can set such options in the Makefile: link- GPU=1 to build with CUDA to accelerate by using GPU (CUDA should be in /usr/local/cuda)
- CUDNN=1 to build with cuDNN v5-v7 to accelerate training by using GPU (cuDNN should be in /usr/local/cudnn)
推荐阅读
- windows.old可以删除吗?
- 一个可放大图像的开源的浏览器扩展
- 新windows勒索软件变种,通过USB驱动横向传播
- 让Mac电脑读取NTFS硬盘的免费开源的软件
- 9个优秀的 VUE 开源项目
- Win 10系统盘突然满了,不下载第三方软件,应该怎么清理?
- CentOS7上安装与配置开源堡垒机Teleport
- 全球知名25种开源情报库
- Win7家庭版如何给文件夹设置密码?Win7文件夹加密方法
- Ubuntu安装及配置