GithubHelp home page GithubHelp logo

tingsongyu / cascaded_mobilenet-v2 Goto Github PK

View Code? Open in Web Editor NEW
264.0 264.0 102.0 5.37 MB

cascaded convolutional neural network for facial point detection

Python 55.43% Shell 0.57% C++ 30.13% Cuda 13.87%

cascaded_mobilenet-v2's People

Contributors

tingsongyu 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

cascaded_mobilenet-v2's Issues

caffe编译出错

您好,感谢您的代码,
我替换文件后编译caffe,出现了如下错误,请问是什么原因呢?

guo@guo-System-Product-Name:~/caffe$ make all
CXX src/caffe/layers/image_data_layer.cpp
src/caffe/layers/image_data_layer.cpp: In instantiation of ‘void caffe::ImageDataLayer::load_batch(caffe::Batch) [with Dtype = float]’:
src/caffe/layers/image_data_layer.cpp:175:1: required from here
src/caffe/layers/image_data_layer.cpp:157:29: error: cannot convert ‘std::vector’ to ‘float’ in assignment
prefetch_label[item_id] = lines_[lines_id_].second;
^
src/caffe/layers/image_data_layer.cpp: In instantiation of ‘void caffe::ImageDataLayer::load_batch(caffe::Batch
) [with Dtype = double]’:
src/caffe/layers/image_data_layer.cpp:175:1: required from here
src/caffe/layers/image_data_layer.cpp:157:29: error: cannot convert ‘std::vector’ to ‘double’ in assignment
make: *** [.build_release/src/caffe/layers/image_data_layer.o] 错误 1

caffe version

Hi,thx for your job!
Can you provide your caffe version?Or which one you fork from?Mine is from weiliu.When I try to compile caffe after updating image_data_layer,there are several mistakes like follows:

src/caffe/layers/image_data_layer.cpp: In member function ‘virtual void caffe::ImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&)’:
src/caffe/layers/image_data_layer.cpp:74:41: error: ‘solver_rank’ is not a member of ‘caffe::Caffe’
if (this->phase_ == TRAIN && Caffe::solver_rank() > 0 &&
^~~~~~~~~~~
src/caffe/layers/image_data_layer.cpp: In instantiation of ‘void caffe::ImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’:
src/caffe/layers/image_data_layer.cpp:200:1: required from here
src/caffe/layers/image_data_layer.cpp:101:39: error: request for member ‘size’ in ‘((caffe::ImageDataLayer)this)->caffe::ImageDataLayer::.caffe::BasePrefetchingDataLayer::prefetch_’, which is of non-class type ‘caffe::Batch [3]’
for (int i = 0; i < this->prefetch_.size(); ++i) {
~~~~~~~~~~~~~~~~^~~~
src/caffe/layers/image_data_layer.cpp:102:5: error: base operand of ‘->’ has non-pointer type ‘caffe::Batch’
this->prefetch_[i]->data_.Reshape(top_shape);
^~~~
src/caffe/layers/image_data_layer.cpp:113:39: error: request for member ‘size’ in ‘((caffe::ImageDataLayer
)this)->caffe::ImageDataLayer::.caffe::BasePrefetchingDataLayer::prefetch_’, which is of non-class type ‘caffe::Batch [3]’
for (int i = 0; i < this->prefetch_.size(); ++i) {
~~~~~~~~~~~~~~~~^~~~
src/caffe/layers/image_data_layer.cpp:114:5: error: base operand of ‘->’ has non-pointer type ‘caffe::Batch’
this->prefetch_[i]->label_.Reshape(label_shape);
^~~~
src/caffe/layers/image_data_layer.cpp: In instantiation of ‘void caffe::ImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = double]’:
src/caffe/layers/image_data_layer.cpp:200:1: required from here
src/caffe/layers/image_data_layer.cpp:101:39: error: request for member ‘size’ in ‘((caffe::ImageDataLayer)this)->caffe::ImageDataLayer::.caffe::BasePrefetchingDataLayer::prefetch_’, which is of non-class type ‘caffe::Batch [3]’
for (int i = 0; i < this->prefetch_.size(); ++i) {
~~~~~~~~~~~~~~~~^~~~
src/caffe/layers/image_data_layer.cpp:102:5: error: base operand of ‘->’ has non-pointer type ‘caffe::Batch’
this->prefetch_[i]->data_.Reshape(top_shape);
^~~~
src/caffe/layers/image_data_layer.cpp:113:39: error: request for member ‘size’ in ‘((caffe::ImageDataLayer
)this)->caffe::ImageDataLayer::.caffe::BasePrefetchingDataLayer::prefetch_’, which is of non-class type ‘caffe::Batch [3]’
for (int i = 0; i < this->prefetch_.size(); ++i) {
~~~~~~~~~~~~~~~~^~~~
src/caffe/layers/image_data_layer.cpp:114:5: error: base operand of ‘->’ has non-pointer type ‘caffe::Batch’
this->prefetch_[i]->label_.Reshape(label_shape);
^~~~
Makefile:575: recipe for target '.build_release/src/caffe/layers/image_data_layer.o' failed

I think it's because my caffe lacks sth.

编译cpu版本时,编译出错

src/caffe/layers/conv_dw_layer.cpp:125:3: error: use of undeclared identifier 'caffe_gpu_set'
caffe_gpu_set(weight_multiplier_.count(), Dtype(1), weight_multiplier_.mutable_gpu_data());
^
src/caffe/layers/conv_dw_layer.cpp:312:19: note: in instantiation of member function 'caffe::ConvolutionDepthwiseLayer::Reshape' requested here
INSTANTIATE_CLASS(ConvolutionDepthwiseLayer);
^
src/caffe/layers/conv_dw_layer.cpp:139:5: error: use of undeclared identifier 'caffe_gpu_set'
caffe_gpu_set(bias_multiplier_.count(), Dtype(1), bias_multiplier_.mutable_gpu_data());
^
src/caffe/layers/conv_dw_layer.cpp:125:3: error: use of undeclared identifier 'caffe_gpu_set'
caffe_gpu_set(weight_multiplier_.count(), Dtype(1), weight_multiplier_.mutable_gpu_data());
^
src/caffe/layers/conv_dw_layer.cpp:312:19: note: in instantiation of member function 'caffe::ConvolutionDepthwiseLayer::Reshape' requested here
INSTANTIATE_CLASS(ConvolutionDepthwiseLayer);
^
src/caffe/layers/conv_dw_layer.cpp:139:5: error: use of undeclared identifier 'caffe_gpu_set'
caffe_gpu_set(bias_multiplier_.count(), Dtype(1), bias_multiplier_.mutable_gpu_data());
^
4 errors generated.
make: *** [.build_release/src/caffe/layers/conv_dw_layer.o] Error 1
make: *** Waiting for unfinished jobs....

编译cpu版本时,新添加的层 conv_dw_layer.cpp中的 caffe_gpu_set报错, 该怎么修改呢???
多谢

DepthwiseConvolution

when run train.cmd after added DepthwiseConvolution layer, one error comes"math_functions.cu:79, check failed: error==cudasuccess<77 vs. 0> an illegal memory access was encountered”.
How to resolve it?

关于级联抠图

直接用原始标签截图,送给level2,效果会怎么样呢?应该和用level1输出结果截图,差别不大吧?

caffe编译出错!

C:\caffe\src\caffe\layers\conv_dw_layer.cpp(125): error C3861: “caffe_gpu_set”: 找不到标识符 [C:\caffe\scripts\build\src\caffe\caffe.vcxproj]
C:\caffe\src\caffe\layers\conv_dw_layer.cpp(139): error C3861: “caffe_gpu_set”: 找不到标识符 [C:\caffe\scripts\build\src\caffe\caffe.vcxproj]

一点点儿建议

建议训练的时候可以再多加一些data-augmentation,另外可以按照30%的几率把训练的图片变成灰度图。不然在灰度图上效果真的不理想

map issue in python3

Hi,

In function evaluate_test.py, I found a problem in map related codes when the user uses python3 environment. The usage of map function in python2 and python3 is different.
One of the solutions is to use list, e.g., list( map(float,o_.split()[1:2*n_p+1]) ).

Or any better solution?

Bests

about EuclideanLoss issue

hi thank you for sharing source code;
it's a perfact idea.
I have a problem: how to work about EuclideanLoss-Layer?
When I restart-train this model, The error is appeared:
I1107 11:11:26.818738 23156 net.cpp:406] fc2 <- fc1
I1107 11:11:26.818756 23156 net.cpp:380] fc2 -> fc2
I1107 11:11:26.818917 23156 net.cpp:122] Setting up fc2
I1107 11:11:26.818929 23156 net.cpp:129] Top shape: 32 8 (256)
I1107 11:11:26.818933 23156 net.cpp:137] Memory required for data: 51924096
I1107 11:11:26.818936 23156 layer_factory.hpp:77] Creating layer loss
I1107 11:11:26.818943 23156 net.cpp:84] Creating Layer loss
I1107 11:11:26.818946 23156 net.cpp:406] loss <- fc2
I1107 11:11:26.818953 23156 net.cpp:406] loss <- label
I1107 11:11:26.818962 23156 net.cpp:380] loss -> loss
F1107 11:11:26.818980 23156 euclidean_loss_layer.cpp:12] Check failed: bottom[0]->count(1) == bottom[1]->count(1) (8 vs. 1) Inputs must have the same dimension.
*** Check failure stack trace: ***
@ 0x7f5b7caaedaa (unknown)
@ 0x7f5b7caaece4 (unknown)
@ 0x7f5b7caae6e6 (unknown)
@ 0x7f5b7cab1687 (unknown)
@ 0x7f5b7d298afd caffe::EuclideanLossLayer<>::Reshape()
@ 0x7f5b7d10e8aa caffe::Net<>::Init()
@ 0x7f5b7d110af2 caffe::Net<>::Net()
@ 0x7f5b7d0eb490 caffe::Solver<>::InitTrainNet()
@ 0x7f5b7d0eb9e3 caffe::Solver<>::Init()
@ 0x7f5b7d0ebc9f caffe::Solver<>::Solver()
@ 0x7f5b7d15e741 caffe::Creator_AdamSolver<>()
@ 0x40df37 caffe::SolverRegistry<>::CreateSolver()
@ 0x4091df train()
@ 0x406adc main
@ 0x7f5b76096f45 (unknown)
@ 0x4073e3 (unknown)
@ (nil) (unknown)
Aborted (core dumped)

issues: tools.drawpoints and use ax1.bar in py3

also in evaluate_test.py and evaluate_train.py files:

In tools.py file, it is no drawpoints function, but has drawpoints_1 for level 1 stage and drawpoints_2 for level 2 stage. The user need change name by himself.

If we use py3 environment, we need replace
rect = ax1.bar(left=x_bar,height=data,width=width, color="blue")
with
rect = ax1.bar(x=x_bar,height=data,width=width, color="blue")
to get results.

bests,

能否提供训练好的caffemodel

想先用训练好的模型来进行一下测试,看下是否能复现出您博客和结果展示的结果。

如果方便共享一下您训练好的模型,谢谢!

Caffe编译错误

你好,我按照顺序正确替换编译了caffe,出现以下错误,请问怎么解决?
CXX src/caffe/layers/image_data_layer.cpp
src/caffe/layers/image_data_layer.cpp: In member function ‘virtual void caffe::ImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&)’:
src/caffe/layers/image_data_layer.cpp:74:34: error: ’solver_rank’ is not a member of \u2018caffe::Caffe’
if (this->phase_ == TRAIN && Caffe::solver_rank() > 0 &&
^
src/caffe/layers/image_data_layer.cpp: In instantiation of ’void caffe::ImageDataLayer::DataLayerSetUp(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’:
src/caffe/layers/image_data_layer.cpp:200:1: required from here
src/caffe/layers/image_data_layer.cpp:101:21: error: request for member ’size’ in ’((caffe::ImageDataLayer*)this)->caffe::ImageDataLayer::.caffe::BasePrefetchingDataLayer::prefetch_’, which is of non-class type \u2018caffe::Batch [3]’
for (int i = 0; i < this->prefetch_.size(); ++i) {
^
src/caffe/layers/image_data_layer.cpp:102:23: error: base operand of ’->’ has non-pointer type ’caffe::Batch’
this->prefetch_[i]->data_.Reshape(top_shape);
^
make: *** [.build_release/src/caffe/layers/image_data_layer.o] Error 1

mobilenet-v2移动端使用性能

mobilenet-v2的结构参数来看,一级mobilenet-v2参数不少于MTCNN的Onet,我在移动端移植MTCNN的检测速度只能达到0.5s左右,PC端差不多可以实现8ms。两层mobilenet-v2的参数比MTCNN的总的参数还要多,如何达到实时检测的要求呢(<0.1s)。

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.