Git Product home page Git Product logo

caffe-yolov3's Introduction

caffe-yolov3

Paltform

Have tested on Ubuntu16.04LTS with Jetson-TX2 and Ubuntu16.04LTS with gtx1060;

NOTE: You need change CMakeList.txt on Ubuntu16.04LTS with GTX1060.

Install

git clone https://github.com/ChenYingpeng/caffe-yolov3

cd caffe-yolov3

mkdir build

cd build

cmake ..

make -j6

Darknet2Caffe

darknet2caffe link github

Demo

First,download model and put it into dir caffemodel.

$ ./x86_64/bin/demo ../prototxt/yolov4.prototxt ../caffemodel/yolov4.caffemodel ../images/dog.jpg

Eval

  1. Run $ ./x86_64/bin/eval ../prototxt/yolov4.prototxt ../caffemodel/yolov4.caffemodel /path/to/coco/val2017/

generate coco_results.json on results/.

  1. Run $ python coco_eval/coco_eval.py --gt-json path/to/coco/annotations/instances_val2017.json --pred-json results/coco_results.json

  2. Eval results Yolov4 input size 608x608 from this repo.

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.428
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.664
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.461
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.241
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.492
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.575
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.331
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.517
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.544
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.363
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.609
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.710

  1. Eval results Yolov4 input size 608x608 from offical model AlexeyAB/YoloV4.
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.505
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.749
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.557
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.357
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.559
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.613
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.368
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.598
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.634
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.500
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.680
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.757

Download Model

Baidu link model

Note

1.Only inference on GPU platform,such as RTX2080, GTX1060,Jetson Tegra X1,TX2,nano,Xavier etc.

2.Support model such as yolov4,yolov3,yolov3-spp,yolov3-tiny etc.

References

Appreciate the great work from the following repositories:

caffe-yolov3's People

Contributors

chenyingpeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caffe-yolov3's Issues

The cudaMemcpy is time consuming

I added a for loop in the main function to detect images, but the time consumption of cudaMemcpy in the cuda_make_array function located in cuda.cpp increased sharply, about 200 times, after the first detection.

Is there any method to solve this problem? THX.

downloading model files

Dear @ChenYingpeng
Can you upload your model to somewhere other than Baidu? it is not available in many countries, more over, the shitty donwloader software has no change-language option. after a few hours, I still can not download large files
thanks

how to convert yolo layer to caffe

Hi Mr. Chen:

When converting yolov3 to caffe proto, there is warning for yolo level not available?

Could you share the code upon yolo_layer.hpp yolo_layer.cpp if possible? or could you give us more detail upon how to add yolo layer into caffe?

Thanks you very much for your kindness in advance.

Wei

yolov3.prototxt 看起来缺乏layer 82,83?

hi, ChenYingPeng
我从你的百度盘里面下载了里面的yolov3.prototxt,但是看起来里面好像82、83层没有,这样是对的吗?还是漏了?

不管怎样,还是谢谢你的分享。

layer {
bottom: "layer81-conv"
top: "layer82-conv"
name: "layer82-conv"
type: "Convolution"
convolution_param {
num_output: 255
kernel_size: 1
pad: 0
stride: 1
bias_term: true
}
}
layer {
bottom: "layer80-conv"
top: "layer84-route"
name: "layer84-route"
type: "Concat"
}
layer {
bottom: "layer84-route"
top: "layer85-conv"
name: "layer85-conv"
type: "Convolution"
convolution_param {
num_output: 256
kernel_size: 1
pad: 0
stride: 1
bias_term: false
}
}

libprotobuf ERROR google/protobuf/text_format.cc:274

Hi, ChenYingpeng, I face the following error when i run the given examples:

[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 2719:20: Message type "caffe.LayerParameter" has no field named "upsample_param".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0819 16:18:51.481129 13794 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: ../../data/yolov3/prototxt/yolov3-spp.prototxt
*** Check failure stack trace: ***
Aborted (core dumped)

can you help me with this problem? thank you a lot

Class and confidence is correct but the position is wrong

Does anyone get the same result like me as the picture below?
I have compare the output to the Darknet's output.
I found the Class and the confidence is the same but the position is a little bit weird.
The caffemodel and the prototxt is converted from the darknet model that download from the official website.

dog
person

cmake successful but make failure

Thanks for your code! Following your instruction, I encounter errors when make:
just a lot of stuff and I paste some of that:

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h(432): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h(432): error: expected a ";"

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h(432): error: identifier "nullptr" is undefined

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h(432): error: expected a ";"

/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h(1861): error: expected a ";"

/usr/include/c++/4.8.2/exception(63): error: expected a ";"

/usr/include/c++/4.8.2/exception(68): error: expected a ";"

/usr/include/c++/4.8.2/exception(76): error: expected a ";"

/usr/include/c++/4.8.2/exception(83): error: expected a ";"

/usr/include/c++/4.8.2/exception(93): error: expected a "{"

/usr/include/c++/4.8.2/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"

......

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00002a9b_00000000-9_blas_kernels.compute_62.cpp1.ii".
Compilation terminated.
CMake Error at sysDetectSpeed_generated_activation_kernels.cu.o.cmake:264 (message):
Error generating file
~/caffe-yolov3/build/CMakeFiles/sysDetectSpeed.dir//./sysDetectSpeed_generated_activation_kernels.cu.o

CMake Error at sysDetectSpeed_generated_blas_kernels.cu.o.cmake:264 (message):
Error generating file
~/caffe-yolov3/build/CMakeFiles/sysDetectSpeed.dir//./sysDetectSpeed_generated_blas_kernels.cu.o

make[2]: *** [CMakeFiles/sysDetectSpeed.dir/./sysDetectSpeed_generated_activation_kernels.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/./sysDetectSpeed_generated_blas_kernels.cu.o] Error 1
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
make: *** [all] Error 2

What should I do with this? Many thx!

无法编译是我caffe环境的问题?caffe是按照常规流程编译安装

In file included from /home/u16/work/caffe-yolov3/box.h:9:0,
from /home/u16/work/caffe-yolov3/box.cpp:1:
/home/u16/work/caffe-yolov3/yolo_layer.h:9:27: fatal error: caffe/caffe.hpp: 没有那个文件或目录
compilation terminated.
CMakeFiles/sysDetectSpeed.dir/build.make:389: recipe for target 'CMakeFiles/sysDetectSpeed.dir/box.cpp.o' failed
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/box.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

About input size 608*608 vs 416*416

Hi chen, thank for your pretty work!
I hava a problem. If i set the input size is 608608, the result is wrong, and set to 416416 the result seems ok. but the input of yolov3.cfg is 608*608. can you help me?

How to label the detection box?

First of all, thank you very much for your work.
After the code runs successfully, the detection box is obtained.
but,How to label the detection box?
look forward to your reply

darknet-tiny to caffemodel error

Hi, I want to transform darknet-tiny.weight to caffemodel, I have got a darknet-tiny.weight of myself.But when I use your yolov3_darknet2caffe.py code to get caffemodel, error. This is my logfile.

I0611 16:48:43.215422 7977 layer_factory.hpp:77] Creating layer input
I0611 16:48:43.215435 7977 net.cpp:86] Creating Layer input
I0611 16:48:43.215438 7977 net.cpp:382] input -> data
I0611 16:48:43.215452 7977 net.cpp:124] Setting up input
I0611 16:48:43.215454 7977 net.cpp:131] Top shape: 1 3 416 416 (519168)
I0611 16:48:43.215459 7977 net.cpp:139] Memory required for data: 2076672
I0611 16:48:43.215462 7977 layer_factory.hpp:77] Creating layer layer1-conv
I0611 16:48:43.215469 7977 net.cpp:86] Creating Layer layer1-conv
I0611 16:48:43.215473 7977 net.cpp:408] layer1-conv <- data
I0611 16:48:43.215477 7977 net.cpp:382] layer1-conv -> layer1-conv
I0611 16:48:43.592209 7977 net.cpp:124] Setting up layer1-conv
I0611 16:48:43.592227 7977 net.cpp:131] Top shape: 1 16 416 416 (2768896)
I0611 16:48:43.592249 7977 net.cpp:139] Memory required for data: 13152256
I0611 16:48:43.592259 7977 layer_factory.hpp:77] Creating layer layer1-bn
I0611 16:48:43.592272 7977 net.cpp:86] Creating Layer layer1-bn
I0611 16:48:43.592275 7977 net.cpp:408] layer1-bn <- layer1-conv
I0611 16:48:43.592278 7977 net.cpp:369] layer1-bn -> layer1-conv (in-place)
I0611 16:48:43.592610 7977 net.cpp:124] Setting up layer1-bn
I0611 16:48:43.592615 7977 net.cpp:131] Top shape: 1 16 416 416 (2768896)
I0611 16:48:43.592633 7977 net.cpp:139] Memory required for data: 24227840
I0611 16:48:43.592638 7977 layer_factory.hpp:77] Creating layer layer1-scale
I0611 16:48:43.592659 7977 net.cpp:86] Creating Layer layer1-scale
I0611 16:48:43.592662 7977 net.cpp:408] layer1-scale <- layer1-conv
I0611 16:48:43.592664 7977 net.cpp:369] layer1-scale -> layer1-conv (in-place)
I0611 16:48:43.592672 7977 layer_factory.hpp:77] Creating layer layer1-scale
I0611 16:48:43.593137 7977 net.cpp:124] Setting up layer1-scale
I0611 16:48:43.593140 7977 net.cpp:131] Top shape: 1 16 416 416 (2768896)
I0611 16:48:43.593144 7977 net.cpp:139] Memory required for data: 35303424
I0611 16:48:43.593163 7977 layer_factory.hpp:77] Creating layer layer1-act
I0611 16:48:43.593168 7977 net.cpp:86] Creating Layer layer1-act
I0611 16:48:43.593171 7977 net.cpp:408] layer1-act <- layer1-conv
I0611 16:48:43.593174 7977 net.cpp:369] layer1-act -> layer1-conv (in-place)
I0611 16:48:43.593518 7977 net.cpp:124] Setting up layer1-act
I0611 16:48:43.593523 7977 net.cpp:131] Top shape: 1 16 416 416 (2768896)
I0611 16:48:43.593542 7977 net.cpp:139] Memory required for data: 46379008
I0611 16:48:43.593545 7977 layer_factory.hpp:77] Creating layer layer2-maxpool
I0611 16:48:43.593552 7977 net.cpp:86] Creating Layer layer2-maxpool
I0611 16:48:43.593555 7977 net.cpp:408] layer2-maxpool <- layer1-conv
I0611 16:48:43.593559 7977 net.cpp:382] layer2-maxpool -> layer2-maxpool
I0611 16:48:43.593569 7977 net.cpp:124] Setting up layer2-maxpool
I0611 16:48:43.593571 7977 net.cpp:131] Top shape: 1 16 208 208 (692224)
I0611 16:48:43.593575 7977 net.cpp:139] Memory required for data: 49147904
I0611 16:48:43.593577 7977 layer_factory.hpp:77] Creating layer layer3-conv
I0611 16:48:43.593583 7977 net.cpp:86] Creating Layer layer3-conv
I0611 16:48:43.593586 7977 net.cpp:408] layer3-conv <- layer2-maxpool
I0611 16:48:43.593590 7977 net.cpp:382] layer3-conv -> layer3-conv
I0611 16:48:43.594878 7977 net.cpp:124] Setting up layer3-conv
I0611 16:48:43.594885 7977 net.cpp:131] Top shape: 1 32 208 208 (1384448)
I0611 16:48:43.594905 7977 net.cpp:139] Memory required for data: 54685696
I0611 16:48:43.594909 7977 layer_factory.hpp:77] Creating layer layer3-bn
I0611 16:48:43.594915 7977 net.cpp:86] Creating Layer layer3-bn
I0611 16:48:43.594919 7977 net.cpp:408] layer3-bn <- layer3-conv
I0611 16:48:43.594938 7977 net.cpp:369] layer3-bn -> layer3-conv (in-place)
I0611 16:48:43.595031 7977 net.cpp:124] Setting up layer3-bn
I0611 16:48:43.595034 7977 net.cpp:131] Top shape: 1 32 208 208 (1384448)
I0611 16:48:43.595037 7977 net.cpp:139] Memory required for data: 60223488
I0611 16:48:43.595059 7977 layer_factory.hpp:77] Creating layer layer3-scale
I0611 16:48:43.595064 7977 net.cpp:86] Creating Layer layer3-scale
I0611 16:48:43.595067 7977 net.cpp:408] layer3-scale <- layer3-conv
I0611 16:48:43.595070 7977 net.cpp:369] layer3-scale -> layer3-conv (in-place)
I0611 16:48:43.595075 7977 layer_factory.hpp:77] Creating layer layer3-scale
I0611 16:48:43.595209 7977 net.cpp:124] Setting up layer3-scale
I0611 16:48:43.595213 7977 net.cpp:131] Top shape: 1 32 208 208 (1384448)
I0611 16:48:43.595216 7977 net.cpp:139] Memory required for data: 65761280
I0611 16:48:43.595235 7977 layer_factory.hpp:77] Creating layer layer3-act
I0611 16:48:43.595239 7977 net.cpp:86] Creating Layer layer3-act
I0611 16:48:43.595242 7977 net.cpp:408] layer3-act <- layer3-conv
I0611 16:48:43.595245 7977 net.cpp:369] layer3-act -> layer3-conv (in-place)
I0611 16:48:43.595610 7977 net.cpp:124] Setting up layer3-act
I0611 16:48:43.595615 7977 net.cpp:131] Top shape: 1 32 208 208 (1384448)
I0611 16:48:43.595634 7977 net.cpp:139] Memory required for data: 71299072
I0611 16:48:43.595636 7977 layer_factory.hpp:77] Creating layer layer4-maxpool
I0611 16:48:43.595660 7977 net.cpp:86] Creating Layer layer4-maxpool
I0611 16:48:43.595664 7977 net.cpp:408] layer4-maxpool <- layer3-conv
I0611 16:48:43.595666 7977 net.cpp:382] layer4-maxpool -> layer4-maxpool
I0611 16:48:43.595671 7977 net.cpp:124] Setting up layer4-maxpool
I0611 16:48:43.595674 7977 net.cpp:131] Top shape: 1 32 104 104 (346112)
I0611 16:48:43.595677 7977 net.cpp:139] Memory required for data: 72683520
I0611 16:48:43.595692 7977 layer_factory.hpp:77] Creating layer layer5-conv
I0611 16:48:43.595696 7977 net.cpp:86] Creating Layer layer5-conv
I0611 16:48:43.595698 7977 net.cpp:408] layer5-conv <- layer4-maxpool
I0611 16:48:43.595702 7977 net.cpp:382] layer5-conv -> layer5-conv
I0611 16:48:43.596855 7977 net.cpp:124] Setting up layer5-conv
I0611 16:48:43.596863 7977 net.cpp:131] Top shape: 1 64 104 104 (692224)
I0611 16:48:43.596881 7977 net.cpp:139] Memory required for data: 75452416
I0611 16:48:43.596886 7977 layer_factory.hpp:77] Creating layer layer5-bn
I0611 16:48:43.596907 7977 net.cpp:86] Creating Layer layer5-bn
I0611 16:48:43.596910 7977 net.cpp:408] layer5-bn <- layer5-conv
I0611 16:48:43.596927 7977 net.cpp:369] layer5-bn -> layer5-conv (in-place)
I0611 16:48:43.596963 7977 net.cpp:124] Setting up layer5-bn
I0611 16:48:43.596966 7977 net.cpp:131] Top shape: 1 64 104 104 (692224)
I0611 16:48:43.596984 7977 net.cpp:139] Memory required for data: 78221312
I0611 16:48:43.596989 7977 layer_factory.hpp:77] Creating layer layer5-scale
I0611 16:48:43.597009 7977 net.cpp:86] Creating Layer layer5-scale
I0611 16:48:43.597012 7977 net.cpp:408] layer5-scale <- layer5-conv
I0611 16:48:43.597015 7977 net.cpp:369] layer5-scale -> layer5-conv (in-place)
I0611 16:48:43.597023 7977 layer_factory.hpp:77] Creating layer layer5-scale
I0611 16:48:43.597074 7977 net.cpp:124] Setting up layer5-scale
I0611 16:48:43.597076 7977 net.cpp:131] Top shape: 1 64 104 104 (692224)
I0611 16:48:43.597079 7977 net.cpp:139] Memory required for data: 80990208
I0611 16:48:43.597100 7977 layer_factory.hpp:77] Creating layer layer5-act
I0611 16:48:43.597103 7977 net.cpp:86] Creating Layer layer5-act
I0611 16:48:43.597106 7977 net.cpp:408] layer5-act <- layer5-conv
I0611 16:48:43.597110 7977 net.cpp:369] layer5-act -> layer5-conv (in-place)
I0611 16:48:43.597551 7977 net.cpp:124] Setting up layer5-act
I0611 16:48:43.597558 7977 net.cpp:131] Top shape: 1 64 104 104 (692224)
I0611 16:48:43.597577 7977 net.cpp:139] Memory required for data: 83759104
I0611 16:48:43.597580 7977 layer_factory.hpp:77] Creating layer layer6-maxpool
I0611 16:48:43.597586 7977 net.cpp:86] Creating Layer layer6-maxpool
I0611 16:48:43.597589 7977 net.cpp:408] layer6-maxpool <- layer5-conv
I0611 16:48:43.597594 7977 net.cpp:382] layer6-maxpool -> layer6-maxpool
I0611 16:48:43.597599 7977 net.cpp:124] Setting up layer6-maxpool
I0611 16:48:43.597602 7977 net.cpp:131] Top shape: 1 64 52 52 (173056)
I0611 16:48:43.597618 7977 net.cpp:139] Memory required for data: 84451328
I0611 16:48:43.597621 7977 layer_factory.hpp:77] Creating layer layer7-conv
I0611 16:48:43.597642 7977 net.cpp:86] Creating Layer layer7-conv
I0611 16:48:43.597646 7977 net.cpp:408] layer7-conv <- layer6-maxpool
I0611 16:48:43.597651 7977 net.cpp:382] layer7-conv -> layer7-conv
I0611 16:48:43.598949 7977 net.cpp:124] Setting up layer7-conv
I0611 16:48:43.598958 7977 net.cpp:131] Top shape: 1 128 52 52 (346112)
I0611 16:48:43.598976 7977 net.cpp:139] Memory required for data: 85835776
I0611 16:48:43.598981 7977 layer_factory.hpp:77] Creating layer layer7-bn
I0611 16:48:43.598989 7977 net.cpp:86] Creating Layer layer7-bn
I0611 16:48:43.598991 7977 net.cpp:408] layer7-bn <- layer7-conv
I0611 16:48:43.598994 7977 net.cpp:369] layer7-bn -> layer7-conv (in-place)
I0611 16:48:43.599007 7977 net.cpp:124] Setting up layer7-bn
I0611 16:48:43.599010 7977 net.cpp:131] Top shape: 1 128 52 52 (346112)
I0611 16:48:43.599014 7977 net.cpp:139] Memory required for data: 87220224
I0611 16:48:43.599018 7977 layer_factory.hpp:77] Creating layer layer7-scale
I0611 16:48:43.599022 7977 net.cpp:86] Creating Layer layer7-scale
I0611 16:48:43.599025 7977 net.cpp:408] layer7-scale <- layer7-conv
I0611 16:48:43.599028 7977 net.cpp:369] layer7-scale -> layer7-conv (in-place)
I0611 16:48:43.599035 7977 layer_factory.hpp:77] Creating layer layer7-scale
I0611 16:48:43.599051 7977 net.cpp:124] Setting up layer7-scale
I0611 16:48:43.599054 7977 net.cpp:131] Top shape: 1 128 52 52 (346112)
I0611 16:48:43.599059 7977 net.cpp:139] Memory required for data: 88604672
I0611 16:48:43.599063 7977 layer_factory.hpp:77] Creating layer layer7-act
I0611 16:48:43.599066 7977 net.cpp:86] Creating Layer layer7-act
I0611 16:48:43.599069 7977 net.cpp:408] layer7-act <- layer7-conv
I0611 16:48:43.599073 7977 net.cpp:369] layer7-act -> layer7-conv (in-place)
I0611 16:48:43.599407 7977 net.cpp:124] Setting up layer7-act
I0611 16:48:43.599413 7977 net.cpp:131] Top shape: 1 128 52 52 (346112)
I0611 16:48:43.599417 7977 net.cpp:139] Memory required for data: 89989120
I0611 16:48:43.599421 7977 layer_factory.hpp:77] Creating layer layer8-maxpool
I0611 16:48:43.599426 7977 net.cpp:86] Creating Layer layer8-maxpool
I0611 16:48:43.599429 7977 net.cpp:408] layer8-maxpool <- layer7-conv
I0611 16:48:43.599432 7977 net.cpp:382] layer8-maxpool -> layer8-maxpool
I0611 16:48:43.599438 7977 net.cpp:124] Setting up layer8-maxpool
I0611 16:48:43.599442 7977 net.cpp:131] Top shape: 1 128 26 26 (86528)
I0611 16:48:43.599445 7977 net.cpp:139] Memory required for data: 90335232
I0611 16:48:43.599447 7977 layer_factory.hpp:77] Creating layer layer9-conv
I0611 16:48:43.599454 7977 net.cpp:86] Creating Layer layer9-conv
I0611 16:48:43.599457 7977 net.cpp:408] layer9-conv <- layer8-maxpool
I0611 16:48:43.599460 7977 net.cpp:382] layer9-conv -> layer9-conv
I0611 16:48:43.601083 7977 net.cpp:124] Setting up layer9-conv
I0611 16:48:43.601090 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601094 7977 net.cpp:139] Memory required for data: 91027456
I0611 16:48:43.601099 7977 layer_factory.hpp:77] Creating layer layer9-bn
I0611 16:48:43.601105 7977 net.cpp:86] Creating Layer layer9-bn
I0611 16:48:43.601109 7977 net.cpp:408] layer9-bn <- layer9-conv
I0611 16:48:43.601112 7977 net.cpp:369] layer9-bn -> layer9-conv (in-place)
I0611 16:48:43.601124 7977 net.cpp:124] Setting up layer9-bn
I0611 16:48:43.601126 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601130 7977 net.cpp:139] Memory required for data: 91719680
I0611 16:48:43.601147 7977 layer_factory.hpp:77] Creating layer layer9-scale
I0611 16:48:43.601151 7977 net.cpp:86] Creating Layer layer9-scale
I0611 16:48:43.601155 7977 net.cpp:408] layer9-scale <- layer9-conv
I0611 16:48:43.601172 7977 net.cpp:369] layer9-scale -> layer9-conv (in-place)
I0611 16:48:43.601178 7977 layer_factory.hpp:77] Creating layer layer9-scale
I0611 16:48:43.601188 7977 net.cpp:124] Setting up layer9-scale
I0611 16:48:43.601191 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601194 7977 net.cpp:139] Memory required for data: 92411904
I0611 16:48:43.601197 7977 layer_factory.hpp:77] Creating layer layer9-act
I0611 16:48:43.601200 7977 net.cpp:86] Creating Layer layer9-act
I0611 16:48:43.601203 7977 net.cpp:408] layer9-act <- layer9-conv
I0611 16:48:43.601220 7977 net.cpp:369] layer9-act -> layer9-conv (in-place)
I0611 16:48:43.601681 7977 net.cpp:124] Setting up layer9-act
I0611 16:48:43.601689 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601709 7977 net.cpp:139] Memory required for data: 93104128
I0611 16:48:43.601712 7977 layer_factory.hpp:77] Creating layer layer9-conv_layer9-act_0_split
I0611 16:48:43.601722 7977 net.cpp:86] Creating Layer layer9-conv_layer9-act_0_split
I0611 16:48:43.601725 7977 net.cpp:408] layer9-conv_layer9-act_0_split <- layer9-conv
I0611 16:48:43.601728 7977 net.cpp:382] layer9-conv_layer9-act_0_split -> layer9-conv_layer9-act_0_split_0
I0611 16:48:43.601733 7977 net.cpp:382] layer9-conv_layer9-act_0_split -> layer9-conv_layer9-act_0_split_1
I0611 16:48:43.601752 7977 net.cpp:124] Setting up layer9-conv_layer9-act_0_split
I0611 16:48:43.601753 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601756 7977 net.cpp:131] Top shape: 1 256 26 26 (173056)
I0611 16:48:43.601773 7977 net.cpp:139] Memory required for data: 94488576
I0611 16:48:43.601776 7977 layer_factory.hpp:77] Creating layer layer10-maxpool
I0611 16:48:43.601780 7977 net.cpp:86] Creating Layer layer10-maxpool
I0611 16:48:43.601783 7977 net.cpp:408] layer10-maxpool <- layer9-conv_layer9-act_0_split_0
I0611 16:48:43.601786 7977 net.cpp:382] layer10-maxpool -> layer10-maxpool
I0611 16:48:43.601794 7977 net.cpp:124] Setting up layer10-maxpool
I0611 16:48:43.601796 7977 net.cpp:131] Top shape: 1 256 13 13 (43264)
I0611 16:48:43.601800 7977 net.cpp:139] Memory required for data: 94661632
I0611 16:48:43.601802 7977 layer_factory.hpp:77] Creating layer layer11-conv
I0611 16:48:43.601820 7977 net.cpp:86] Creating Layer layer11-conv
I0611 16:48:43.601824 7977 net.cpp:408] layer11-conv <- layer10-maxpool
I0611 16:48:43.601826 7977 net.cpp:382] layer11-conv -> layer11-conv
I0611 16:48:43.604907 7977 net.cpp:124] Setting up layer11-conv
I0611 16:48:43.604919 7977 net.cpp:131] Top shape: 1 512 13 13 (86528)
I0611 16:48:43.604925 7977 net.cpp:139] Memory required for data: 95007744
I0611 16:48:43.604930 7977 layer_factory.hpp:77] Creating layer layer11-bn
I0611 16:48:43.604938 7977 net.cpp:86] Creating Layer layer11-bn
I0611 16:48:43.604943 7977 net.cpp:408] layer11-bn <- layer11-conv
I0611 16:48:43.604946 7977 net.cpp:369] layer11-bn -> layer11-conv (in-place)
I0611 16:48:43.604972 7977 net.cpp:124] Setting up layer11-bn
I0611 16:48:43.604975 7977 net.cpp:131] Top shape: 1 512 13 13 (86528)
I0611 16:48:43.604996 7977 net.cpp:139] Memory required for data: 95353856
I0611 16:48:43.605003 7977 layer_factory.hpp:77] Creating layer layer11-scale
I0611 16:48:43.605010 7977 net.cpp:86] Creating Layer layer11-scale
I0611 16:48:43.605012 7977 net.cpp:408] layer11-scale <- layer11-conv
I0611 16:48:43.605016 7977 net.cpp:369] layer11-scale -> layer11-conv (in-place)
I0611 16:48:43.605023 7977 layer_factory.hpp:77] Creating layer layer11-scale
I0611 16:48:43.605033 7977 net.cpp:124] Setting up layer11-scale
I0611 16:48:43.605037 7977 net.cpp:131] Top shape: 1 512 13 13 (86528)
I0611 16:48:43.605041 7977 net.cpp:139] Memory required for data: 95699968
I0611 16:48:43.605044 7977 layer_factory.hpp:77] Creating layer layer11-act
I0611 16:48:43.605048 7977 net.cpp:86] Creating Layer layer11-act
I0611 16:48:43.605051 7977 net.cpp:408] layer11-act <- layer11-conv
I0611 16:48:43.605054 7977 net.cpp:369] layer11-act -> layer11-conv (in-place)
I0611 16:48:43.605413 7977 net.cpp:124] Setting up layer11-act
I0611 16:48:43.605419 7977 net.cpp:131] Top shape: 1 512 13 13 (86528)
I0611 16:48:43.605424 7977 net.cpp:139] Memory required for data: 96046080
I0611 16:48:43.605427 7977 layer_factory.hpp:77] Creating layer layer12-maxpool
I0611 16:48:43.605434 7977 net.cpp:86] Creating Layer layer12-maxpool
I0611 16:48:43.605437 7977 net.cpp:408] layer12-maxpool <- layer11-conv
I0611 16:48:43.605442 7977 net.cpp:382] layer12-maxpool -> layer12-maxpool
I0611 16:48:43.605448 7977 net.cpp:124] Setting up layer12-maxpool
I0611 16:48:43.605450 7977 net.cpp:131] Top shape: 1 512 12 12 (73728)
I0611 16:48:43.605454 7977 net.cpp:139] Memory required for data: 96340992
I0611 16:48:43.605458 7977 layer_factory.hpp:77] Creating layer layer13-conv
I0611 16:48:43.605464 7977 net.cpp:86] Creating Layer layer13-conv
I0611 16:48:43.605468 7977 net.cpp:408] layer13-conv <- layer12-maxpool
I0611 16:48:43.605471 7977 net.cpp:382] layer13-conv -> layer13-conv
I0611 16:48:43.613621 7977 net.cpp:124] Setting up layer13-conv
I0611 16:48:43.613639 7977 net.cpp:131] Top shape: 1 1024 12 12 (147456)
I0611 16:48:43.613646 7977 net.cpp:139] Memory required for data: 96930816
I0611 16:48:43.613651 7977 layer_factory.hpp:77] Creating layer layer13-bn
I0611 16:48:43.613657 7977 net.cpp:86] Creating Layer layer13-bn
I0611 16:48:43.613660 7977 net.cpp:408] layer13-bn <- layer13-conv
I0611 16:48:43.613665 7977 net.cpp:369] layer13-bn -> layer13-conv (in-place)
I0611 16:48:43.613682 7977 net.cpp:124] Setting up layer13-bn
I0611 16:48:43.613685 7977 net.cpp:131] Top shape: 1 1024 12 12 (147456)
I0611 16:48:43.613688 7977 net.cpp:139] Memory required for data: 97520640
I0611 16:48:43.613692 7977 layer_factory.hpp:77] Creating layer layer13-scale
I0611 16:48:43.613710 7977 net.cpp:86] Creating Layer layer13-scale
I0611 16:48:43.613713 7977 net.cpp:408] layer13-scale <- layer13-conv
I0611 16:48:43.613715 7977 net.cpp:369] layer13-scale -> layer13-conv (in-place)
I0611 16:48:43.613739 7977 layer_factory.hpp:77] Creating layer layer13-scale
I0611 16:48:43.613750 7977 net.cpp:124] Setting up layer13-scale
I0611 16:48:43.613754 7977 net.cpp:131] Top shape: 1 1024 12 12 (147456)
I0611 16:48:43.613757 7977 net.cpp:139] Memory required for data: 98110464
I0611 16:48:43.613760 7977 layer_factory.hpp:77] Creating layer layer13-act
I0611 16:48:43.613765 7977 net.cpp:86] Creating Layer layer13-act
I0611 16:48:43.613767 7977 net.cpp:408] layer13-act <- layer13-conv
I0611 16:48:43.613771 7977 net.cpp:369] layer13-act -> layer13-conv (in-place)
I0611 16:48:43.614112 7977 net.cpp:124] Setting up layer13-act
I0611 16:48:43.614118 7977 net.cpp:131] Top shape: 1 1024 12 12 (147456)
I0611 16:48:43.614121 7977 net.cpp:139] Memory required for data: 98700288
I0611 16:48:43.614125 7977 layer_factory.hpp:77] Creating layer layer14-conv
I0611 16:48:43.614130 7977 net.cpp:86] Creating Layer layer14-conv
I0611 16:48:43.614133 7977 net.cpp:408] layer14-conv <- layer13-conv
I0611 16:48:43.614137 7977 net.cpp:382] layer14-conv -> layer14-conv
I0611 16:48:43.615723 7977 net.cpp:124] Setting up layer14-conv
I0611 16:48:43.615731 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.615734 7977 net.cpp:139] Memory required for data: 98847744
I0611 16:48:43.615738 7977 layer_factory.hpp:77] Creating layer layer14-bn
I0611 16:48:43.615743 7977 net.cpp:86] Creating Layer layer14-bn
I0611 16:48:43.615746 7977 net.cpp:408] layer14-bn <- layer14-conv
I0611 16:48:43.615749 7977 net.cpp:369] layer14-bn -> layer14-conv (in-place)
I0611 16:48:43.615758 7977 net.cpp:124] Setting up layer14-bn
I0611 16:48:43.615762 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.615766 7977 net.cpp:139] Memory required for data: 98995200
I0611 16:48:43.615770 7977 layer_factory.hpp:77] Creating layer layer14-scale
I0611 16:48:43.615774 7977 net.cpp:86] Creating Layer layer14-scale
I0611 16:48:43.615777 7977 net.cpp:408] layer14-scale <- layer14-conv
I0611 16:48:43.615780 7977 net.cpp:369] layer14-scale -> layer14-conv (in-place)
I0611 16:48:43.615787 7977 layer_factory.hpp:77] Creating layer layer14-scale
I0611 16:48:43.615795 7977 net.cpp:124] Setting up layer14-scale
I0611 16:48:43.615799 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.615803 7977 net.cpp:139] Memory required for data: 99142656
I0611 16:48:43.615806 7977 layer_factory.hpp:77] Creating layer layer14-act
I0611 16:48:43.615810 7977 net.cpp:86] Creating Layer layer14-act
I0611 16:48:43.615813 7977 net.cpp:408] layer14-act <- layer14-conv
I0611 16:48:43.615816 7977 net.cpp:369] layer14-act -> layer14-conv (in-place)
I0611 16:48:43.616253 7977 net.cpp:124] Setting up layer14-act
I0611 16:48:43.616261 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.616266 7977 net.cpp:139] Memory required for data: 99290112
I0611 16:48:43.616268 7977 layer_factory.hpp:77] Creating layer layer14-conv_layer14-act_0_split
I0611 16:48:43.616276 7977 net.cpp:86] Creating Layer layer14-conv_layer14-act_0_split
I0611 16:48:43.616279 7977 net.cpp:408] layer14-conv_layer14-act_0_split <- layer14-conv
I0611 16:48:43.616283 7977 net.cpp:382] layer14-conv_layer14-act_0_split -> layer14-conv_layer14-act_0_split_0
I0611 16:48:43.616288 7977 net.cpp:382] layer14-conv_layer14-act_0_split -> layer14-conv_layer14-act_0_split_1
I0611 16:48:43.616294 7977 net.cpp:124] Setting up layer14-conv_layer14-act_0_split
I0611 16:48:43.616297 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.616300 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.616303 7977 net.cpp:139] Memory required for data: 99585024
I0611 16:48:43.616307 7977 layer_factory.hpp:77] Creating layer layer15-conv
I0611 16:48:43.616312 7977 net.cpp:86] Creating Layer layer15-conv
I0611 16:48:43.616315 7977 net.cpp:408] layer15-conv <- layer14-conv_layer14-act_0_split_0
I0611 16:48:43.616319 7977 net.cpp:382] layer15-conv -> layer15-conv
I0611 16:48:43.619130 7977 net.cpp:124] Setting up layer15-conv
I0611 16:48:43.619139 7977 net.cpp:131] Top shape: 1 512 12 12 (73728)
I0611 16:48:43.619144 7977 net.cpp:139] Memory required for data: 99879936
I0611 16:48:43.619149 7977 layer_factory.hpp:77] Creating layer layer15-bn
I0611 16:48:43.619156 7977 net.cpp:86] Creating Layer layer15-bn
I0611 16:48:43.619160 7977 net.cpp:408] layer15-bn <- layer15-conv
I0611 16:48:43.619164 7977 net.cpp:369] layer15-bn -> layer15-conv (in-place)
I0611 16:48:43.619175 7977 net.cpp:124] Setting up layer15-bn
I0611 16:48:43.619179 7977 net.cpp:131] Top shape: 1 512 12 12 (73728)
I0611 16:48:43.619182 7977 net.cpp:139] Memory required for data: 100174848
I0611 16:48:43.619186 7977 layer_factory.hpp:77] Creating layer layer15-scale
I0611 16:48:43.619190 7977 net.cpp:86] Creating Layer layer15-scale
I0611 16:48:43.619194 7977 net.cpp:408] layer15-scale <- layer15-conv
I0611 16:48:43.619196 7977 net.cpp:369] layer15-scale -> layer15-conv (in-place)
I0611 16:48:43.619204 7977 layer_factory.hpp:77] Creating layer layer15-scale
I0611 16:48:43.619215 7977 net.cpp:124] Setting up layer15-scale
I0611 16:48:43.619217 7977 net.cpp:131] Top shape: 1 512 12 12 (73728)
I0611 16:48:43.619221 7977 net.cpp:139] Memory required for data: 100469760
I0611 16:48:43.619225 7977 layer_factory.hpp:77] Creating layer layer15-act
I0611 16:48:43.619230 7977 net.cpp:86] Creating Layer layer15-act
I0611 16:48:43.619231 7977 net.cpp:408] layer15-act <- layer15-conv
I0611 16:48:43.619235 7977 net.cpp:369] layer15-act -> layer15-conv (in-place)
I0611 16:48:43.619582 7977 net.cpp:124] Setting up layer15-act
I0611 16:48:43.619588 7977 net.cpp:131] Top shape: 1 512 12 12 (73728)
I0611 16:48:43.619592 7977 net.cpp:139] Memory required for data: 100764672
I0611 16:48:43.619596 7977 layer_factory.hpp:77] Creating layer layer16-conv
I0611 16:48:43.619621 7977 net.cpp:86] Creating Layer layer16-conv
I0611 16:48:43.619624 7977 net.cpp:408] layer16-conv <- layer15-conv
I0611 16:48:43.619628 7977 net.cpp:382] layer16-conv -> layer16-conv
I0611 16:48:43.620985 7977 net.cpp:124] Setting up layer16-conv
I0611 16:48:43.620993 7977 net.cpp:131] Top shape: 1 27 12 12 (3888)
I0611 16:48:43.620998 7977 net.cpp:139] Memory required for data: 100780224
I0611 16:48:43.621003 7977 layer_factory.hpp:77] Creating layer layer18-route
I0611 16:48:43.621008 7977 net.cpp:86] Creating Layer layer18-route
I0611 16:48:43.621012 7977 net.cpp:408] layer18-route <- layer14-conv_layer14-act_0_split_1
I0611 16:48:43.621016 7977 net.cpp:382] layer18-route -> layer18-route
I0611 16:48:43.621023 7977 net.cpp:124] Setting up layer18-route
I0611 16:48:43.621026 7977 net.cpp:131] Top shape: 1 256 12 12 (36864)
I0611 16:48:43.621031 7977 net.cpp:139] Memory required for data: 100927680
I0611 16:48:43.621050 7977 layer_factory.hpp:77] Creating layer layer19-conv
I0611 16:48:43.621055 7977 net.cpp:86] Creating Layer layer19-conv
I0611 16:48:43.621058 7977 net.cpp:408] layer19-conv <- layer18-route
I0611 16:48:43.621063 7977 net.cpp:382] layer19-conv -> layer19-conv
I0611 16:48:43.622438 7977 net.cpp:124] Setting up layer19-conv
I0611 16:48:43.622448 7977 net.cpp:131] Top shape: 1 128 12 12 (18432)
I0611 16:48:43.622469 7977 net.cpp:139] Memory required for data: 101001408
I0611 16:48:43.622474 7977 layer_factory.hpp:77] Creating layer layer19-bn
I0611 16:48:43.622481 7977 net.cpp:86] Creating Layer layer19-bn
I0611 16:48:43.622485 7977 net.cpp:408] layer19-bn <- layer19-conv
I0611 16:48:43.622488 7977 net.cpp:369] layer19-bn -> layer19-conv (in-place)
I0611 16:48:43.622514 7977 net.cpp:124] Setting up layer19-bn
I0611 16:48:43.622516 7977 net.cpp:131] Top shape: 1 128 12 12 (18432)
I0611 16:48:43.622519 7977 net.cpp:139] Memory required for data: 101075136
I0611 16:48:43.622541 7977 layer_factory.hpp:77] Creating layer layer19-scale
I0611 16:48:43.622547 7977 net.cpp:86] Creating Layer layer19-scale
I0611 16:48:43.622550 7977 net.cpp:408] layer19-scale <- layer19-conv
I0611 16:48:43.622555 7977 net.cpp:369] layer19-scale -> layer19-conv (in-place)
I0611 16:48:43.622561 7977 layer_factory.hpp:77] Creating layer layer19-scale
I0611 16:48:43.622586 7977 net.cpp:124] Setting up layer19-scale
I0611 16:48:43.622588 7977 net.cpp:131] Top shape: 1 128 12 12 (18432)
I0611 16:48:43.622609 7977 net.cpp:139] Memory required for data: 101148864
I0611 16:48:43.622612 7977 layer_factory.hpp:77] Creating layer layer19-act
I0611 16:48:43.622617 7977 net.cpp:86] Creating Layer layer19-act
I0611 16:48:43.622620 7977 net.cpp:408] layer19-act <- layer19-conv
I0611 16:48:43.622623 7977 net.cpp:369] layer19-act -> layer19-conv (in-place)
I0611 16:48:43.622975 7977 net.cpp:124] Setting up layer19-act
I0611 16:48:43.622982 7977 net.cpp:131] Top shape: 1 128 12 12 (18432)
I0611 16:48:43.622985 7977 net.cpp:139] Memory required for data: 101222592
I0611 16:48:43.622988 7977 layer_factory.hpp:77] Creating layer layer20-upsample
I0611 16:48:43.623013 7977 net.cpp:86] Creating Layer layer20-upsample
I0611 16:48:43.623015 7977 net.cpp:408] layer20-upsample <- layer19-conv
I0611 16:48:43.623021 7977 net.cpp:382] layer20-upsample -> layer20-upsample
I0611 16:48:43.623028 7977 net.cpp:124] Setting up layer20-upsample
I0611 16:48:43.623030 7977 net.cpp:131] Top shape: 1 128 24 24 (73728)
I0611 16:48:43.623034 7977 net.cpp:139] Memory required for data: 101517504
I0611 16:48:43.623036 7977 layer_factory.hpp:77] Creating layer layer21-route
I0611 16:48:43.623041 7977 net.cpp:86] Creating Layer layer21-route
I0611 16:48:43.623044 7977 net.cpp:408] layer21-route <- layer20-upsample
I0611 16:48:43.623064 7977 net.cpp:408] layer21-route <- layer9-conv_layer9-act_0_split_1
I0611 16:48:43.623067 7977 net.cpp:382] layer21-route -> layer21-route
F0611 16:48:43.623076 7977 concat_layer.cpp:42] Check failed: top_shape[j] == bottom[i]->shape(j) (24 vs. 26) All inputs must have the same shape, except at concat_axis.
*** Check failure stack trace: ***
已放弃 (核心已转储)

Could You Help Me……

can train & test own dataset after yolov3 transfer to caffe model ?

basically, I use "./x86_64/bin/detectnet 0 ../../data/yolov3/prototxt/yolov3.prototxt ../../data/yolov3/caffemodel/yolov3.caffemodel" to inference original yolov3 model for coco dataset is ok
the dog.jpg have the correct box.
but when I train my dataset and do inference ,the result is strange .a lot of boxes appear .my dataset only 10 class .
below picture is the test result.

how to convrt mobilenet_yolov3 to caffe model?

I try like this:
python yolov3_darknet2caffe.py mobilenet_v1_yolov3.cfg mobilenet_v1_yolov3_final.weights mobilenet_yolov3.prototxt mobilenet_yolov3.caffemodel

and get an error:

F0627 23:02:02.249997 26192 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: ConvolutionDepthwise (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Clip, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, Swish, TanH, Threshold, Tile, Upsample, WindowData)
*** Check failure stack trace: ***

could u help me?

Has anyone tested the time-consuming of the code?

hello, I see the code process an image use time is (52+252)ms, which 52ms is processing data, and 252ms is network.
Has anyone tested the time-consuming of the code?I want to know if my test is correct.

ImportError: No module named interp

"I1204 16:36:42.620281 6418 net.cpp:139] Memory required for data: 721989632
I1204 16:36:42.620295 6418 layer_factory.hpp:77] Creating layer Interp202
ImportError: No module named interp
terminate called after throwing an instance of 'boost::python::error_already_set'
Aborted (core dumped)"

I have cloned the repo and included input image, yolov3 caffemodel , yolov3 prototxt.
Edited the detectnet.cpp with proper input.

Am getting the error while running "sudo ./detectnet" on jetson TX2 with cuda 9, cudnn 7, tensorrt 4.
kindly share your comments to fix the issue..
Thanks

out of memory

首先,非常感谢您能分享出这么好的代码。
下面我说一下我遇到的问题,编译好您的代码之后,在运行detectnet时,出现了下面的问题:

num_inputs is 1
num_outputs is 3
I0117 16:22:17.890136 7075 detectnet.cpp:75] Input data layer channels is 3
I0117 16:22:17.890156 7075 detectnet.cpp:76] Input data layer width is 608
I0117 16:22:17.890162 7075 detectnet.cpp:77] Input data layer height is 608
Cannot load image "/home/jincan/deeplearning/examples/images/cat.jpg"
F0117 16:22:18.198128 7075 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory
*** Check failure stack trace: ***
已放弃 (核心已转储)

我知道这是显存不足导致的(我用的是GTX 950M,2G显存),但是有没有什么方法可以解决这个问题,除了换显卡?
非常感谢!

似乎可以通过修改caffe代码来支持maxpool层(size=2,stride=1)

switch (round_mode_) {
case PoolingParameter_RoundMode_CEIL:
pooled_height_ = static_cast(ceil(static_cast(
height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;
pooled_width_ = static_cast(ceil(static_cast(
width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1;
if (height_ % 2 == 1) {
pooled_height_ += 1;
}
if (width_ % 2 == 1) {
pooled_width_ += 1;
}

break;
case PoolingParameter_RoundMode_FLOOR:
pooled_height_ = static_cast(floor(static_cast(
height_ + 2 * pad_h_ - kernel_h_) / stride_h_)) + 1;
pooled_width_ = static_cast(floor(static_cast(
width_ + 2 * pad_w_ - kernel_w_) / stride_w_)) + 1;
if (height_ % 2 == 1) {
pooled_height_ += 1;
}
if (width_ % 2 == 1) {
pooled_width_ += 1;
}

break;
}

可以在pooling_layer.cpp的Reshape函数中加入几行代码,来对最大池化后map的宽度和高度进行调整以支持yolov3-tiny中的maxpool层(size=2,stride=1)。当然,这样可能只对这种特殊情况有效。
另外,需要对模型转换代码和检测代码做修改。

Caffe compilation error after addition of upsample_layer as per instructions

I have this compilation error while recompiling caffe after installing the upsample layer. It's seemingly due to me not having CUDA installed, so I'll try to do that now, since:

  • all the errors stem from the upsample_layer.cu file;
  • the function caffe_gpu_set is included in file "caffe/util/math_functions.hpp" but only available if these guards are passed:
#ifndef CPU_ONLY  // GPU
#ifdef USE_CUDA

and I'm defining USE_CUDA=OFF at the CMake level (instructions taken from here).

Could somebody help me with this? Would it be possible to keep the upsample layer in CPU mode? Is it mandatory to keep it to convert YOLOv3 to caffemodel?

/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: At global scope:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:9:1: error: ‘__device__’ does not name a type; did you mean ‘device’?
 __device__ int translate_idx(int ii, int d1, int d2, int d3, int scale_factor) {
 ^~~~~~~~~~
 device
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:25:1: error: ‘__device__’ does not name a type; did you mean ‘device’?
 __device__ int translate_idx_inv(
 ^~~~~~~~~~
 device
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:43:1: error: ‘__global__’ does not name a type; did you mean ‘__locale_t’?
 __global__ void upscale(const Dtype *input, Dtype *output,
 ^~~~~~~~~~
 __locale_t
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:52:1: error: ‘__global__’ does not name a type; did you mean ‘__locale_t’?
 __global__ void downscale(Dtype *gradInput_data, const Dtype *gradOutput_data,
 ^~~~~~~~~~
 __locale_t
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In member function ‘virtual void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:3: error: ‘upscale’ was not declared in this scope
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:3: note: suggested alternative: ‘scale_’
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~
   scale_
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:16: error: expected primary-expression before ‘>’ token
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
                ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:7: error: expected primary-expression before ‘<<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
       ^~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:9: error: expected primary-expression before ‘<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
         ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:10: error: there are no arguments to ‘CAFFE_GET_BLOCKS’ that depend on a template parameter, so a declaration of ‘CAFFE_GET_BLOCKS’ must be available [-fpermissive]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ^~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:10: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:41: error: ‘CAFFE_CUDA_NUM_THREADS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:65: error: expected primary-expression before ‘>’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                 ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In member function ‘virtual void caffe::UpsampleLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:3: error: ‘downscale’ was not declared in this scope
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:3: note: suggested alternative: ‘dscal’
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~~~
   dscal
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:18: error: expected primary-expression before ‘>’ token
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
                  ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:7: error: expected primary-expression before ‘<<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
       ^~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:9: error: expected primary-expression before ‘<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
         ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:10: error: there are no arguments to ‘CAFFE_GET_BLOCKS’ that depend on a template parameter, so a declaration of ‘CAFFE_GET_BLOCKS’ must be available [-fpermissive]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ^~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:41: error: ‘CAFFE_CUDA_NUM_THREADS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:65: error: expected primary-expression before ‘>’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                 ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = half_float::half]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION

The full log from compilation is this one, just in case some context is needed:

~/code/clCaffe/build$ make -j8
[  1%] Built target proto
[  1%] Built target pretune_convert
[  2%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/upsample_layer.cu.o
In file included from /opt/intel/opencl/OpenCL-Headers/CL/cl.h:32:0,
                 from /home/ap/code/clCaffe/include/caffe/greentea/greentea.hpp:30,
                 from /home/ap/code/clCaffe/include/caffe/common.hpp:25,
                 from /home/ap/code/clCaffe/include/caffe/blob.hpp:8,
                 from /home/ap/code/clCaffe/include/caffe/filler.hpp:10,
                 from /home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:3:
/opt/intel/opencl/OpenCL-Headers/CL/cl_version.h:34:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
                                                                                                        ^
In file included from /home/ap/local/include/viennacl/ocl/backend.hpp:26:0,
                 from /home/ap/local/include/viennacl/backend/opencl.hpp:28,
                 from /home/ap/code/clCaffe/include/caffe/greentea/greentea.hpp:35,
                 from /home/ap/code/clCaffe/include/caffe/common.hpp:25,
                 from /home/ap/code/clCaffe/include/caffe/blob.hpp:8,
                 from /home/ap/code/clCaffe/include/caffe/filler.hpp:10,
                 from /home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:3:
/home/ap/local/include/viennacl/ocl/context.hpp: In member function ‘void viennacl::ocl::context::add_queue(cl_device_id)’:
/home/ap/local/include/viennacl/ocl/context.hpp:260:117: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Wdeprecated-declarations]
     viennacl::ocl::handle<cl_command_queue> temp(clCreateCommandQueue(h_.get(), dev, CL_QUEUE_PROFILING_ENABLE, &err), *this);
                                                                                                                     ^
In file included from /home/ap/code/clCaffe/include/caffe/greentea/greentea.hpp:30:0,
                 from /home/ap/code/clCaffe/include/caffe/common.hpp:25,
                 from /home/ap/code/clCaffe/include/caffe/blob.hpp:8,
                 from /home/ap/code/clCaffe/include/caffe/filler.hpp:10,
                 from /home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:3:
/opt/intel/opencl/OpenCL-Headers/CL/cl.h:1777:1: note: declared here
 clCreateCommandQueue(cl_context                     context,
 ^~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: At global scope:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:9:1: error: ‘__device__’ does not name a type; did you mean ‘device’?
 __device__ int translate_idx(int ii, int d1, int d2, int d3, int scale_factor) {
 ^~~~~~~~~~
 device
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:25:1: error: ‘__device__’ does not name a type; did you mean ‘device’?
 __device__ int translate_idx_inv(
 ^~~~~~~~~~
 device
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:43:1: error: ‘__global__’ does not name a type; did you mean ‘__locale_t’?
 __global__ void upscale(const Dtype *input, Dtype *output,
 ^~~~~~~~~~
 __locale_t
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:52:1: error: ‘__global__’ does not name a type; did you mean ‘__locale_t’?
 __global__ void downscale(Dtype *gradInput_data, const Dtype *gradOutput_data,
 ^~~~~~~~~~
 __locale_t
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In member function ‘virtual void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:3: error: ‘upscale’ was not declared in this scope
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:3: note: suggested alternative: ‘scale_’
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~
   scale_
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:78:16: error: expected primary-expression before ‘>’ token
   upscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
                ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:7: error: expected primary-expression before ‘<<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
       ^~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:9: error: expected primary-expression before ‘<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
         ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:10: error: there are no arguments to ‘CAFFE_GET_BLOCKS’ that depend on a template parameter, so a declaration of ‘CAFFE_GET_BLOCKS’ must be available [-fpermissive]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ^~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:10: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:41: error: ‘CAFFE_CUDA_NUM_THREADS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:65: error: expected primary-expression before ‘>’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                 ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In member function ‘virtual void caffe::UpsampleLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:3: error: ‘downscale’ was not declared in this scope
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:3: note: suggested alternative: ‘dscal’
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
   ^~~~~~~~~
   dscal
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:94:18: error: expected primary-expression before ‘>’ token
   downscale<Dtype>  // NOLINT_NEXT_LINE(whitespace/operators)
                  ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:7: error: expected primary-expression before ‘<<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
       ^~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:9: error: expected primary-expression before ‘<’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
         ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:10: error: there are no arguments to ‘CAFFE_GET_BLOCKS’ that depend on a template parameter, so a declaration of ‘CAFFE_GET_BLOCKS’ must be available [-fpermissive]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ^~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:41: error: ‘CAFFE_CUDA_NUM_THREADS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:65: error: expected primary-expression before ‘>’ token
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                 ^
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = half_float::half]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:46: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:48: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
                                                ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:58: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:62: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~
       bottom[0]->gpu_data(),
       ~~~~~~~~~~~~~~~~~~~~~~                                  
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:46: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:48: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
                                                ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:58: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:62: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~
       bottom[0]->gpu_data(),
       ~~~~~~~~~~~~~~~~~~~~~~                                  
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:79:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:46: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:48: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
                                                ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:58: warning: right operand of comma operator has no effect [-Wunused-value]
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:81:62: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~
       bottom[0]->gpu_data(),
       ~~~~~~~~~~~~~~~~~~~~~~                                  
       top[0]->mutable_gpu_data(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = half_float::half]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:93:16: error: ‘caffe_gpu_set’ was not declared in this scope
   caffe_gpu_set(bottom[0]->count(), Dtype(0), bottom_diff);
   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:18: warning: left operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:51: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:53: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
                                                     ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:63: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:67: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~ 
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:93:16: error: ‘caffe_gpu_set’ was not declared in this scope
   caffe_gpu_set(bottom[0]->count(), Dtype(0), bottom_diff);
   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:18: warning: left operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:51: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:53: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
                                                     ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:63: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:67: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~ 
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu: In instantiation of ‘void caffe::UpsampleLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:99:1:   required from here
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:93:16: error: ‘caffe_gpu_set’ was not declared in this scope
   caffe_gpu_set(bottom[0]->count(), Dtype(0), bottom_diff);
   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: error: ‘CAFFE_GET_BLOCKS’ was not declared in this scope
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:95:26: note: suggested alternative: ‘CAFFE_VERSION’
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
          ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
          CAFFE_VERSION
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:18: warning: left operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:51: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:53: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
                                                     ^~~~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:63: warning: right operand of comma operator has no effect [-Wunused-value]
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/ap/code/clCaffe/src/caffe/layers/upsample_layer.cu:96:67: warning: right operand of comma operator has no effect [-Wunused-value]
       <<<CAFFE_GET_BLOCKS(no_elements), CAFFE_CUDA_NUM_THREADS>>>(
                                                                  ~ 
       bottom_diff, top[0]->gpu_diff(), no_elements, scale_, d1, d2, d3);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/caffe/CMakeFiles/caffe.dir/build.make:2802: recipe for target 'src/caffe/CMakeFiles/caffe.dir/layers/upsample_layer.cu.o' failed
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layers/upsample_layer.cu.o] Error 1
CMakeFiles/Makefile2:281: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

OverflowError: cannot fit 'int' into an index-sized integer

Hi,I have this problem :

Traceback (most recent call last):
File "yolov3_darknet2caffe.py", line 533, in
darknet2caffe(cfgfile, weightfile, protofile, caffemodel)
File "yolov3_darknet2caffe.py", line 19, in darknet2caffe
params = net.params
File "/home/oyrq/caffe/python/caffe/pycaffe.py", line 67, in _Net_params
self._layer_names, self.layers)
File "/home/oyrq/caffe/python/caffe/pycaffe.py", line 68, in
if len(lr.blobs) > 0])
OverflowError: cannot fit 'int' into an index-sized integer
Segmentation fault (core dumped)

Thanks!

a step interview

hi ,make passed,and the next step is ? I want to a step interview.
default

Why network is splitted into two in yolov3-tiny?

There are two prototxt files for caffe yolov3-tiny, namely yolov3-tiny-1.prototxt and yolov3-tiny-2.prototxt.
The network is broken after layer11-conv? However, the yolov3 network is kept as one, why?

model covert problem

user@7b114a18e77a:~/daniel_ws/caffe-yolov3-master/model_convert$ python yolov3_darknet2caffe.py yolov3.cfg yolov3.weights yolov3.prototxt yolov3.caffemodel
File "yolov3_darknet2caffe.py", line 102
elif block['type'] == 'upsample':
^
TabError: inconsistent use of tabs and spaces in indentation

run detectnet failed,error "no kernel image is available for execution on the device" at forward_yolo_layer_gpu

I0809 17:26:14.176947 22577 upgrade_proto.cpp:80] Successfully upgraded batch norm layers using deprecated params.
num_inputs is 1
num_outputs is 3
I0809 17:26:14.237879 22577 detectnet.cpp:78] Input data layer channels is 3
I0809 17:26:14.237900 22577 detectnet.cpp:79] Input data layer width is 416
I0809 17:26:14.237920 22577 detectnet.cpp:80] Input data layer height is 416
output blob1 shape c= 255, h = 13, w = 13
output blob2 shape c= 255, h = 26, w = 26
output blob3 shape c= 255, h = 52, w = 52
blobs.size()=3
0-step1
0-step2
0-step3
forward_yolo_layer_gpu 1 43095
a8240000 63800000 a826a15c 6382a15c
forward_yolo_layer_gpu 2
CUDA Error: no kernel image is available for execution on the device
CUDA Error: no kernel image is available for execution on the device: Resource temporarily unavailable

the prediction failed when I use caffe c++ api and transformed model

I use the transformed weight file and model file to predict with caffe c++ api.

after feeding the input data and run
net->forward();
the prediction from the output blob are incorrect.
I feed the data to cpu and set it to cpu only. Does that make a difference with gpu mode?
Thanks.

Got core dumped error

I added a for loop in the main function to detect images. However, the time consumption for the function get_detections was growing continuously, and I finally got the Segmentation fault (core dumped) error.

Could anyone help me to figure out what was wrong? THX

Segmentation fault (core dumped)

hello! there is a new problem :
when i use the command ./detectnet
the code will stop here:
output blob1 shape c= 255, h = 13, w = 13
output blob2 shape c= 255, h = 26, w = 26
output blob3 shape c= 255, h = 52, w = 52
Segmentation fault (core dumped)
I think may be the code below cause this problem:

int nboxes =0;
detection *dets = get_detections(blobs,im.w,im.h,&nboxes);

but i think the code is ok, can u tell me how to solve this problem?

yolov3-tiny.prototxt Check failed: net->num_outputs() == 3 (2 vs. 3) in detectnet

there is a question when use yolov3-tiny network ,the question is
num_inputs is 1 num_outputs is 2 F0807 10:35:53.908385 11051 detectnet.cpp:71] Check failed: net->num_outputs() == 3 (2 vs. 3) Network should have exactly three outputs.
when i modify the outputs in detetcnet.cpp(cancel the thrid output reveice variable,so there are only two feature to calculation result) , the application can show img but there is no effect at all ,even the person in img is so obviously.

caffemodel link

Is there anybody to upload(for Google Drive) the caffe weights with prototxt file. I could not achieve this conversion.

Thanks.

Compile problem

[ 40%] Building CXX object CMakeFiles/sysDetectSpeed.dir/box.cpp.o
[ 50%] Building CXX object CMakeFiles/sysDetectSpeed.dir/image.cpp.o
[ 70%] Building CXX object CMakeFiles/sysDetectSpeed.dir/yolo_layer.cpp.o
[ 70%] Building CXX object CMakeFiles/sysDetectSpeed.dir/cuda.cpp.o
/home/user/daniel_ws/caffe-yolov3-master/cuda.cpp: In function 'dim3 cuda_gridsize(size_t)':
/home/user/daniel_ws/caffe-yolov3-master/cuda.cpp:53:22: warning: narrowing conversion of 'x' from 'size_t {aka long unsigned int}' to 'unsigned int' inside { } [-Wnarrowing]
dim3 d = {x, y, 1};
^
/home/user/daniel_ws/caffe-yolov3-master/cuda.cpp:53:22: warning: narrowing conversion of 'y' from 'size_t {aka long unsigned int}' to 'unsigned int' inside { } [-Wnarrowing]
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

KeyError: 'layer1-conv'

hi, ChenYingPeng
我运行了你的darknet2caffe代码,然后遇到了这个错误:
------------

Traceback (most recent call last):
File "darknet2caffe.py", line 429, in
darknet2caffe(cfgfile, weightfile, protofile, caffemodel)
File "darknet2caffe.py", line 57, in darknet2caffe
start = load_conv_bn2caffe(buf, start, params[conv_layer_name], params[bn_layer_name], params[scale_layer_name])
KeyError: 'layer1-conv'

------------
我加载的是yolov3-tiny版模型。

请问是哪里出现问题了吗?

yolov3_tiny模型测试与darknet结果不一致

您好,请问您测试过yolov3_tiny模型吗?我在Windows下测试与darknet结果不一致
已经将分享的代码make_yolo_layer部分针对yolov3_tiny进行了修改,得到的预测结果差异较大
反推回到两个输出层向量有差异

What protoc version does this project needs?

/home/dell/anaconda3/include/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^
/home/dell/anaconda3/include/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
/home/dell/anaconda3/include/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
#error your headers.
^
In file included from /home/dell/anaconda3/include/caffe/blob.hpp:9:0,
from /home/dell/anaconda3/include/caffe/caffe.hpp:7,
from /home/dell/darknet2caffe_yolov3/yolo_layer.h:9,
from /home/dell/darknet2caffe_yolov3/box.h:9,
from /home/dell/darknet2caffe_yolov3/box.cpp:1:
/home/dell/anaconda3/include/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.
CMakeFiles/sysDetectSpeed.dir/build.make:83: recipe for target 'CMakeFiles/sysDetectSpeed.dir/box.cpp.o' failed
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/box.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I had installed caffe with protoc version 2.6.1.
But failed to make this project with the error above.
I tried different protoc version of 3.7.1 3.6.1 they all failed.
Does someone know how to fix it ?
Thanks.

yolov3-tiny 检测不出内容

通过转换工具,我只获得了一个tiny-yolo-voc.prototxt 和 tiny-yolo-voc.caffemodel。通过修改detectnet.cpp(减少了一个blob),yolo_layer.cpp(改变循环参数),能够进行检测,但是没有检测到任何东西,请问这是怎么回事呢?

detectnet compile problem

  • Copying /home/user/daniel_ws/caffe-yolov3-master/box.h
    -- Copying /home/user/daniel_ws/caffe-yolov3-master/cuda.h
    -- Copying /home/user/daniel_ws/caffe-yolov3-master/image.h
    -- Copying /home/user/daniel_ws/caffe-yolov3-master/max_pool_1d.h
    -- Copying /home/user/daniel_ws/caffe-yolov3-master/yolo_layer.h
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/user/daniel_ws/caffe-yolov3-master/build
    [ 80%] Built target sysDetectSpeed
    Scanning dependencies of target detectnet
    [ 90%] Building CXX object detectnet/CMakeFiles/detectnet.dir/detectnet.cpp.o
    /home/user/daniel_ws/caffe-yolov3-master/detectnet/detectnet.cpp:20:30: fatal error: opencv2/opencv.hpp: No such file or directory
    compilation terminated.
    detectnet/CMakeFiles/detectnet.dir/build.make:62: recipe for target 'detectnet/CMakeFiles/detectnet.dir/detectnet.cpp.o' failed
    make[2]: *** [detectnet/CMakeFiles/detectnet.dir/detectnet.cpp.o] Error 1
    CMakeFiles/Makefile2:122: recipe for target 'detectnet/CMakeFiles/detectnet.dir/all' failed
    make[1]: *** [detectnet/CMakeFiles/detectnet.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2

caffe/caffe.hpp: No such file or directory

when I make the project, I met this error

In file included from /home/jane/Files/caffe/include/caffe/caffe.hpp:7:0,
from /home/jane/Files/object_detection/caffe-yolov3/yolo_layer.h:9,
from /home/jane/Files/object_detection/caffe-yolov3/box.h:9,
from /home/jane/Files/object_detection/caffe-yolov3/box.cpp:1:
/home/jane/Files/caffe/include/caffe/blob.hpp:9:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
compilation terminated.
CMakeFiles/sysDetectSpeed.dir/build.make:107: recipe for target 'CMakeFiles/sysDetectSpeed.dir/box.cpp.o' failed
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/box.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/jane/Files/caffe/include/caffe/caffe.hpp:7:0,
from /home/jane/Files/object_detection/caffe-yolov3/yolo_layer.h:9,
from /home/jane/Files/object_detection/caffe-yolov3/yolo_layer.cpp:7:
/home/jane/Files/caffe/include/caffe/blob.hpp:9:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
compilation terminated.
CMakeFiles/sysDetectSpeed.dir/build.make:155: recipe for target 'CMakeFiles/sysDetectSpeed.dir/yolo_layer.cpp.o' failed
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/yolo_layer.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

could you please help me?

/usr/bin/ld: cannot find -lopencv_dep_cudart

make failure

[ 80%] Linking CXX shared library x86_64/lib/libsysDetectSpeed.so
/usr/bin/ld: cannot find -lopencv_dep_cudart
/usr/bin/ld: cannot find -lopencv_dep_nppial
/usr/bin/ld: cannot find -lopencv_dep_nppicc
/usr/bin/ld: cannot find -lopencv_dep_nppicom
/usr/bin/ld: cannot find -lopencv_dep_nppidei
/usr/bin/ld: cannot find -lopencv_dep_nppif
/usr/bin/ld: cannot find -lopencv_dep_nppig
/usr/bin/ld: cannot find -lopencv_dep_nppim
/usr/bin/ld: cannot find -lopencv_dep_nppist
/usr/bin/ld: cannot find -lopencv_dep_nppisu
/usr/bin/ld: cannot find -lopencv_dep_nppitc
collect2: error: ld returned 1 exit status
CMakeFiles/sysDetectSpeed.dir/build.make:228: recipe for target 'x86_64/lib/libsysDetectSpeed.so' failed
make[2]: *** [x86_64/lib/libsysDetectSpeed.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

caffe problem?

I run make command and face these problem, I don't know how to fix it.

file included from /home/user/workspace/caffe-yolov3/box.h:9:0,
from /home/user/workspace/caffe-yolov3/box.cpp:1:
/home/user/workspace/caffe-yolov3/yolo_layer.h:9:27: fatal error: caffe/caffe.hpp: No such file or directory
compilation terminated.
CMakeFiles/sysDetectSpeed.dir/build.make:341: recipe for target 'CMakeFiles/sysDetectSpeed.dir/box.cpp.o' failed
make[2]: *** [CMakeFiles/sysDetectSpeed.dir/box.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sysDetectSpeed.dir/all' failed
make[1]: *** [CMakeFiles/sysDetectSpeed.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

thanks

opencv path fixing, help me , how to add path

CMake Error at CMakeLists.txt:68 (FIND_PACKAGE):
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.

Could not find a package configuration file provided by "OpenCV" with any
of the following names:

OpenCVConfig.cmake
opencv-config.cmake

Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDART_LIBRARY (ADVANCED)
linked by target "sysDetectSpeed" in directory /home/adhir/caffe-yolov3
linked by target "detectnet" in directory /home/adhir/caffe-yolov3/detectnet
CUDA_TOOLKIT_INCLUDE (ADVANCED)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.