Darknet: Open Source Neural Networks in C - Classifying With Pre-Trained Models

Darknet: Open Source Neural Networks in C - Classifying With Pre-Trained Models

https://pjreddie.com/darknet/

这里写图片描述

Darknet is an open source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU computation. You can find the source on GitHub or you can read more about what Darknet can do right here:
https://github.com/pjreddie/darknet

ImageNet Classification

Classify images with popular models like ResNet and ResNeXt.
You can use Darknet to classify images for the 1000-class ImageNet challenge. If you haven’t installed Darknet yet, you should do that first.
http://image-net.org/challenges/LSVRC/2015/index
https://pjreddie.com/darknet/install/

Classifying With Pre-Trained Models

Here are the commands to install Darknet, download a classification weights file, and run a classifier on an image:

git clone https://github.com/pjreddie/darknet.git
cd darknet
make
wget https://pjreddie.com/media/files/extraction.weights
./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights data/dog.jpg

(1) make clean

strong@foreverstrong:~/darknet_work/darknet_180906$ git clone https://github.com/pjreddie/darknet.git
Cloning into 'darknet'...
remote: Counting objects: 5878, done.
remote: Total 5878 (delta 0), reused 0 (delta 0), pack-reused 5878
Receiving objects: 100% (5878/5878), 6.11 MiB | 1.76 MiB/s, done.
Resolving deltas: 100% (3934/3934), done.
Checking connectivity... done.
strong@foreverstrong:~/darknet_work/darknet_180906$ 
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ make clean

(2) Makefile

Makefile:

GPU=0
CUDNN=0
OPENCV=0
OPENMP=0
DEBUG=0

===>>>

Makefile:

GPU=1
CUDNN=1
OPENCV=0
OPENMP=0
DEBUG=0

(3) make

strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ make

(4) extraction.weights

strong@foreverstrong:~/darknet_work/darknet_180906$ cd darknet/
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ wget https://pjreddie.com/media/files/extraction.weights
--2018-09-06 20:07:14--  https://pjreddie.com/media/files/extraction.weights
Resolving pjreddie.com (pjreddie.com)... 128.208.3.39
Connecting to pjreddie.com (pjreddie.com)|128.208.3.39|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93821616 (89M) [application/octet-stream]
Saving to: ‘extraction.weights’

extraction.weights             100%[=================================================>]  89.47M  67.7KB/s    in 23m 51s 

2018-09-06 20:31:06 (64.0 KB/s) - ‘extraction.weights’ saved [93821616/93821616]

strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ 

(5) ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/extraction.cfg ./extraction.weights ./data/dog.jpg

strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/extraction.cfg ./extraction.weights ./data/dog.jpg
layer     filters    size              input                output
    0 conv     64  7 x 7 / 2   224 x 224 x   3   ->   112 x 112 x  64  0.236 BFLOPs
    1 max          2 x 2 / 2   112 x 112 x  64   ->    56 x  56 x  64
    2 conv    192  3 x 3 / 1    56 x  56 x  64   ->    56 x  56 x 192  0.694 BFLOPs
    3 max          2 x 2 / 2    56 x  56 x 192   ->    28 x  28 x 192
    4 conv    128  1 x 1 / 1    28 x  28 x 192   ->    28 x  28 x 128  0.039 BFLOPs
    5 conv    256  3 x 3 / 1    28 x  28 x 128   ->    28 x  28 x 256  0.462 BFLOPs
    6 conv    256  1 x 1 / 1    28 x  28 x 256   ->    28 x  28 x 256  0.103 BFLOPs
    7 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
    8 max          2 x 2 / 2    28 x  28 x 512   ->    14 x  14 x 512
    9 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   10 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   11 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   12 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   13 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   14 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   15 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   16 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   17 conv    512  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 512  0.103 BFLOPs
   18 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   19 max          2 x 2 / 2    14 x  14 x1024   ->     7 x   7 x1024
   20 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   21 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   22 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   23 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   24 conv   1000  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x1000  0.100 BFLOPs
   25 avg                        7 x   7 x1000   ->  1000
   26 softmax                                        1000
CUDA Error: out of memory
darknet: ./src/cuda.c:36: check_error: Assertion `0' failed.
Aborted (core dumped)
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$
[net]
batch=128
subdivisions=1
height=224
width=224

===>>>

[net]
# Training
#batch=128
#subdivisions=2

# Testing
batch=1
subdivisions=1
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/extraction.cfg ./extraction.weights ./data/dog.jpg
layer     filters    size              input                output
    0 conv     64  7 x 7 / 2   224 x 224 x   3   ->   112 x 112 x  64  0.236 BFLOPs
    1 max          2 x 2 / 2   112 x 112 x  64   ->    56 x  56 x  64
    2 conv    192  3 x 3 / 1    56 x  56 x  64   ->    56 x  56 x 192  0.694 BFLOPs
    3 max          2 x 2 / 2    56 x  56 x 192   ->    28 x  28 x 192
    4 conv    128  1 x 1 / 1    28 x  28 x 192   ->    28 x  28 x 128  0.039 BFLOPs
    5 conv    256  3 x 3 / 1    28 x  28 x 128   ->    28 x  28 x 256  0.462 BFLOPs
    6 conv    256  1 x 1 / 1    28 x  28 x 256   ->    28 x  28 x 256  0.103 BFLOPs
    7 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
    8 max          2 x 2 / 2    28 x  28 x 512   ->    14 x  14 x 512
    9 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   10 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   11 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   12 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   13 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   14 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   15 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   16 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   17 conv    512  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 512  0.103 BFLOPs
   18 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   19 max          2 x 2 / 2    14 x  14 x1024   ->     7 x   7 x1024
   20 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   21 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   22 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   23 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   24 conv   1000  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x1000  0.100 BFLOPs
   25 avg                        7 x   7 x1000   ->  1000
   26 softmax                                        1000
Loading weights from ./extraction.weights...Done!
./data/dog.jpg: Predicted in 0.005154 seconds.
12.78%: malamute
10.04%: Siberian husky
 7.22%: Eskimo dog
 4.91%: miniature schnauzer
 4.89%: Afghan hound
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$

(6) ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/darknet53_448.cfg ./darknet53_448.weights ./data/dog.jpg

strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/darknet53_448.cfg ./darknet53_448.weights ./data/dog.jpg
layer     filters    size              input                output
    0 conv     32  3 x 3 / 1   448 x 448 x   3   ->   448 x 448 x  32  0.347 BFLOPs
    1 conv     64  3 x 3 / 2   448 x 448 x  32   ->   224 x 224 x  64  1.850 BFLOPs
    2 conv     32  1 x 1 / 1   224 x 224 x  64   ->   224 x 224 x  32  0.206 BFLOPs
    3 conv     64  3 x 3 / 1   224 x 224 x  32   ->   224 x 224 x  64  1.850 BFLOPs
    4 res    1                 224 x 224 x  64   ->   224 x 224 x  64
    5 conv    128  3 x 3 / 2   224 x 224 x  64   ->   112 x 112 x 128  1.850 BFLOPs
    6 conv     64  1 x 1 / 1   112 x 112 x 128   ->   112 x 112 x  64  0.206 BFLOPs
    7 conv    128  3 x 3 / 1   112 x 112 x  64   ->   112 x 112 x 128  1.850 BFLOPs
    8 res    5                 112 x 112 x 128   ->   112 x 112 x 128
    9 conv     64  1 x 1 / 1   112 x 112 x 128   ->   112 x 112 x  64  0.206 BFLOPs
   10 conv    128  3 x 3 / 1   112 x 112 x  64   ->   112 x 112 x 128  1.850 BFLOPs
   11 res    8                 112 x 112 x 128   ->   112 x 112 x 128
   12 conv    256  3 x 3 / 2   112 x 112 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   13 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   14 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   15 res   12                  56 x  56 x 256   ->    56 x  56 x 256
   16 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   17 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   18 res   15                  56 x  56 x 256   ->    56 x  56 x 256
   19 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   20 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   21 res   18                  56 x  56 x 256   ->    56 x  56 x 256
   22 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   23 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   24 res   21                  56 x  56 x 256   ->    56 x  56 x 256
   25 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   26 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   27 res   24                  56 x  56 x 256   ->    56 x  56 x 256
   28 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   29 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   30 res   27                  56 x  56 x 256   ->    56 x  56 x 256
   31 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   32 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   33 res   30                  56 x  56 x 256   ->    56 x  56 x 256
   34 conv    128  1 x 1 / 1    56 x  56 x 256   ->    56 x  56 x 128  0.206 BFLOPs
   35 conv    256  3 x 3 / 1    56 x  56 x 128   ->    56 x  56 x 256  1.850 BFLOPs
   36 res   33                  56 x  56 x 256   ->    56 x  56 x 256
   37 conv    512  3 x 3 / 2    56 x  56 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   38 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   39 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   40 res   37                  28 x  28 x 512   ->    28 x  28 x 512
   41 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   42 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   43 res   40                  28 x  28 x 512   ->    28 x  28 x 512
   44 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   45 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   46 res   43                  28 x  28 x 512   ->    28 x  28 x 512
   47 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   48 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   49 res   46                  28 x  28 x 512   ->    28 x  28 x 512
   50 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   51 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   52 res   49                  28 x  28 x 512   ->    28 x  28 x 512
   53 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   54 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   55 res   52                  28 x  28 x 512   ->    28 x  28 x 512
   56 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   57 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   58 res   55                  28 x  28 x 512   ->    28 x  28 x 512
   59 conv    256  1 x 1 / 1    28 x  28 x 512   ->    28 x  28 x 256  0.206 BFLOPs
   60 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
   61 res   58                  28 x  28 x 512   ->    28 x  28 x 512
   62 conv   1024  3 x 3 / 2    28 x  28 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   63 conv    512  1 x 1 / 1    14 x  14 x1024   ->    14 x  14 x 512  0.206 BFLOPs
   64 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   65 res   62                  14 x  14 x1024   ->    14 x  14 x1024
   66 conv    512  1 x 1 / 1    14 x  14 x1024   ->    14 x  14 x 512  0.206 BFLOPs
   67 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   68 res   65                  14 x  14 x1024   ->    14 x  14 x1024
   69 conv    512  1 x 1 / 1    14 x  14 x1024   ->    14 x  14 x 512  0.206 BFLOPs
   70 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   71 res   68                  14 x  14 x1024   ->    14 x  14 x1024
   72 conv    512  1 x 1 / 1    14 x  14 x1024   ->    14 x  14 x 512  0.206 BFLOPs
   73 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   74 res   71                  14 x  14 x1024   ->    14 x  14 x1024
   75 avg                       14 x  14 x1024   ->  1024
   76 conv   1000  1 x 1 / 1     1 x   1 x1024   ->     1 x   1 x1000  0.002 BFLOPs
   77 softmax                                        1000
Loading weights from ./darknet53_448.weights...Done!
./data/dog.jpg: Predicted in 0.023981 seconds.
97.59%: malamute
 0.65%: Eskimo dog
 0.46%: Siberian husky
 0.46%: Tibetan mastiff
 0.24%: Great Pyrenees
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ 

This example uses the Extraction model, you can read more about it below. After running this command you should see the following output:
https://pjreddie.com/darknet/imagenet/#extraction

0: Convolutional Layer: 224 x 224 x 3 image, 64 filters -> 112 x 112 x 64 image
1: Maxpool Layer: 112 x 112 x 64 image, 2 size, 2 stride
...
23: Convolutional Layer: 7 x 7 x 512 image, 1024 filters -> 7 x 7 x 1024 image
24: Convolutional Layer: 7 x 7 x 1024 image, 1000 filters -> 7 x 7 x 1000 image
25: Avgpool Layer: 7 x 7 x 1000 image
26: Softmax Layer: 1000 inputs
27: Cost Layer: 1000 inputs
Loading weights from extraction.weights...Done!
298 224
data/dog.jpg: Predicted in 3.756339 seconds.
malamute: 0.194782
Eskimo dog: 0.155007
Siberian husky: 0.143937
dogsled: 0.020943
miniature schnauzer: 0.020566

Darknet displays information as it loads the config file and weights, then it classifies the image and prints the top-10 classes for the image. Kelp is a mixed breed dog but she has a lot of malamute in her so we’ll consider this a success!
You can also try with other images, like the bald eagle image:

./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights data/eagle.jpg

Which produces:

...
data/eagle.jpg: Predicted in 4.036698 seconds.
bald eagle: 0.797689
kite: 0.185116
vulture: 0.006402
prairie chicken: 0.001041
hen: 0.000888

Pretty good!

If you don’t specify an image file you will be prompted at run-time for an image. This way you can classify multiple in a row without reloading the whole model. Use the command:

./darknet classifier predict cfg/imagenet1k.data cfg/extraction.cfg extraction.weights

Then you will get a prompt that looks like:

....
27: Softmax Layer: 1000 inputs
28: Cost Layer: 1000 inputs
Loading weights from extraction.weights...Done!
Enter Image Path:

Whenever you get bored of classifying images you can use C t r l C to exit the program.

strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ 
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$ ./darknet classifier predict ./cfg/imagenet1k.data ./cfg/extraction.cfg ./extraction.weights
layer     filters    size              input                output
    0 conv     64  7 x 7 / 2   224 x 224 x   3   ->   112 x 112 x  64  0.236 BFLOPs
    1 max          2 x 2 / 2   112 x 112 x  64   ->    56 x  56 x  64
    2 conv    192  3 x 3 / 1    56 x  56 x  64   ->    56 x  56 x 192  0.694 BFLOPs
    3 max          2 x 2 / 2    56 x  56 x 192   ->    28 x  28 x 192
    4 conv    128  1 x 1 / 1    28 x  28 x 192   ->    28 x  28 x 128  0.039 BFLOPs
    5 conv    256  3 x 3 / 1    28 x  28 x 128   ->    28 x  28 x 256  0.462 BFLOPs
    6 conv    256  1 x 1 / 1    28 x  28 x 256   ->    28 x  28 x 256  0.103 BFLOPs
    7 conv    512  3 x 3 / 1    28 x  28 x 256   ->    28 x  28 x 512  1.850 BFLOPs
    8 max          2 x 2 / 2    28 x  28 x 512   ->    14 x  14 x 512
    9 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   10 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   11 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   12 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   13 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   14 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   15 conv    256  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 256  0.051 BFLOPs
   16 conv    512  3 x 3 / 1    14 x  14 x 256   ->    14 x  14 x 512  0.462 BFLOPs
   17 conv    512  1 x 1 / 1    14 x  14 x 512   ->    14 x  14 x 512  0.103 BFLOPs
   18 conv   1024  3 x 3 / 1    14 x  14 x 512   ->    14 x  14 x1024  1.850 BFLOPs
   19 max          2 x 2 / 2    14 x  14 x1024   ->     7 x   7 x1024
   20 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   21 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   22 conv    512  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x 512  0.051 BFLOPs
   23 conv   1024  3 x 3 / 1     7 x   7 x 512   ->     7 x   7 x1024  0.462 BFLOPs
   24 conv   1000  1 x 1 / 1     7 x   7 x1024   ->     7 x   7 x1000  0.100 BFLOPs
   25 avg                        7 x   7 x1000   ->  1000
   26 softmax                                        1000
Loading weights from ./extraction.weights...Done!
Enter Image Path: data/dog.jpg
data/dog.jpg: Predicted in 0.005104 seconds.
12.78%: malamute
10.04%: Siberian husky
 7.22%: Eskimo dog
 4.91%: miniature schnauzer
 4.89%: Afghan hound
Enter Image Path: data/eagle.jpg
data/eagle.jpg: Predicted in 0.020505 seconds.
61.72%: bald eagle
36.87%: kite
 0.48%: vulture
 0.19%: ptarmigan
 0.14%: hen
Enter Image Path: ^C
strong@foreverstrong:~/darknet_work/darknet_180906/darknet$

Wordbook

you only look once,YOLO
Visual Object Classes,VOC
Pattern Analysis, Statistical Modelling and Computational Learning,PASCAL
mean Average Precision,mAP:平均精度均值
floating point operations per second,FLOPS
frame rate or frame frequency, frames per second,FPS
hertz,Hz
billion,Bn
operations,Ops
configuration,cfg
ImageNet Large Scale Visual Recognition Challenge,ILSVRC
Microsoft Common Objects in Context,MS COCO

猜你喜欢

转载自blog.csdn.net/chengyq116/article/details/82469703
今日推荐