GithubHelp home page GithubHelp logo

dafucoding / mtcnn_caffe Goto Github PK

View Code? Open in Web Editor NEW
240.0 20.0 134.0 9.94 MB

Simple implementation of kpzhang93's paper from Matlab to c++, and don't change models.

License: Other

CMake 2.77% Makefile 0.71% C++ 79.72% Cuda 5.64% MATLAB 0.90% M 0.01% Python 8.34% Shell 0.30% Protocol Buffer 1.62%
mtcnn caffe

mtcnn_caffe's People

Contributors

dafucoding 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  avatar  avatar  avatar  avatar  avatar

mtcnn_caffe's Issues

Questions about part of the code

int count = confidence->count()/2;
const float* confidence_data = confidence->cpu_data();
confidence_data += count;
const float* reg_data = reg->cpu_data();

Can I know why here confidence_data += count, but reg_data doesn't += count?

速度 GTX980 耗时400ms

您好,我用这个代码测试了下test1,test2.jpg 速度并不快,约400-500ms 每张 。就算是将minsize改到30,40 也没有多少变化。 请问你写的20ms是多大尺寸的图片?

Segmentation fault

Hi, when I ran the demo, ./build/examples/MTSrc/MTMain.bin model_dir test_image.jpg
I met the problem of : "Segmentation fault"

out of memory

RTX2080Ti 处理每帧图像 500ms 左右。而且运行一分钟左右就会报以下错误,请问可能是哪里的问题?

F1020 14:24:46.977366 18296 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory

crash on gpu mode, but work by cpu

change link below, if someone else has the same problam

MTCNN::MTCNN(const std::string &proto_model_dir){
//#ifdef CPU_ONLY
Caffe::set_mode(Caffe::CPU);
//#else
// Caffe::set_mode(Caffe::GPU);
//#endif

PNet_->num_inputs() return millions

Hello,
Code worked fine for me, but after I changed something (contains this algorithm snippet), all of projects which contain this algorithm can't run successfully anymore. I'm pretty sure they worked fine before I debug something...

When I tried to construct MTCNN object, PNet_->num_inputs() returns millions inputs :<
I'm inexperienced in Python/Caffe, could you please help me out? I want to know what did I ruin.

Thanks!

isd

Segmentation fault (core dumped)

我在Ubuntu下执行以下命令(路径已修改)时报“Segmentation fault (core dumped)”的错误
./build/examples/MTSrc/MTMain.bin '/home/dafu/workspace/MTCNN_Caffe/examples/MTmodel' '/home/dafu/workspace/MTCNN_Caffe/examples/MTSrc/test2.jpg'
gdb调试结果:
Thread 1 "MTMain.bin" received signal SIGSEGV, Segmentation fault.
0x00007ffff741c29f in caffe::ConvolutionLayer::Forward_gpu (this=0xb61f5b0, bottom=std::vector of length 1, capacity 1 = {...}, top=std::vector of length 1, capacity 1 = {...}) at src/caffe/layers/conv_layer.cu:22
22 std::cout<<*(tempTop+i)<<std::endl;
请问问题在哪呢?

图像转置

您好,我想请问:Detect里为什么要对图像转置( sample_single = sample_single.t();)?

CPU Benchmarking

Hi DaFu,

Thanks a lot for sharing your code. Did you get a chance to benchmark your code on CPU?

Thanks,
Sri

batch测试

请问我想改成按照一个batch来测试,要怎么改呢?麻烦么?

training code

Hi,
How did you train this MTmodel?
Did you change any settings compared to the training process in the raw paper?
Can you provide training code if u don't mind?

Train own models

Thanks for the great work.

Can this repo be used for training my own models?

速度500ms

请问为何在我的GTX1080Ti上测试450450像素的图像都需要500ms?,而且我已将试过了将下面 四行注释掉:
//const Dtype
tempTop = top[0]->gpu_data();
//for(int i=0;i<10;i++){
//std::cout<<*(tempTop+i)<<std::endl;
//}

error on mtcnn face detection

Detect 1080X1920F1229 22:31:31.232031 10620 data_transformer.cpp:167] Check fail
ed: channels == datum_channels (1095 vs. 3)
*** Check failure stack trace: ***

segement err

if #define CPU_ONLY the project work ok
if use gpu the work error at function MTCNN::Detect(const cv::Mat& image,std::vector& faceInfo,int minSize,double* threshold,double factor)
line PNet_->Forward();
thx

conv_layer.cu

Forward_gpu() has:
// const Dtype* tempTop = top[0]->gpu_data();
// for(int i=0;i<10;i++){
// std::cout<<*(tempTop+i)<<std::endl;
// }

为啥会出现这几行代码?直接打印gpu上的数据没有报错?

error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor

(py3.6_caffe) zhangxin@zhangxin-AW:~/github/MTCNN_Caffe$ sudo make
Package opencv3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv3' found
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/data_reader.cpp
In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from src/caffe/data_reader.cpp:6:
./include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING’ not handled in switch [-Wswitch]
   switch (status) {
          ^
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_IN_PROGRESS’ not handled in switch [-Wswitch]
./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value ‘CUDNN_STATUS_RUNTIME_FP_OVERFLOW’ not handled in switch [-Wswitch]
./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, cudnnTensorDescriptor_t, cudnnFilterDescriptor_t, int, int, int, int)’:
./include/caffe/util/cudnn.hpp:113:70: error: too few arguments to function ‘cudnnStatus_t cudnnSetConvolution2dDescriptor(cudnnConvolutionDescriptor_t, int, int, int, int, int, int, cudnnConvolutionMode_t, cudnnDataType_t)’
       pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION));
                                                                      ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro ‘CUDNN_CHECK’
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
In file included from ./include/caffe/util/cudnn.hpp:5:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from src/caffe/data_reader.cpp:6:
/usr/local/cuda/include/cudnn.h:537:27: note: declared here
 cudnnStatus_t CUDNNWINAPI cudnnSetConvolution2dDescriptor( cudnnConvolutionDescriptor_t convDesc,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:575: recipe for target '.build_release/src/caffe/data_reader.o' failed
make: *** [.build_release/src/caffe/data_reader.o] Error 1

I solve it by

copy caffe/include/caffe/util/cudnn.hpp to ./include/caffe/util/cudnn.hpp

Train data

Hi,
I want to know the training data used in this project?

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.