tingsongyu / cascaded_mobilenet-v2 Goto Github PK
View Code? Open in Web Editor NEWcascaded convolutional neural network for facial point detection
cascaded convolutional neural network for facial point detection
您好,感谢您的代码,
我替换文件后编译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
看了一下训练网络,发现在dw卷积中并没有使用group这个参数。
比如 https://github.com/shicai/MobileNet-Caffe 这里的caffe实现,都是带有group的。
这里没用group是为什么呢?
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
直接用原始标签截图,送给level2,效果会怎么样呢?应该和用level1输出结果截图,差别不大吧?
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?
mobilenet-v2的结构参数来看,一级mobilenet-v2参数不少于MTCNN的Onet,我在移动端移植MTCNN的检测速度只能达到0.5s左右,PC端差不多可以实现8ms。两层mobilenet-v2的参数比MTCNN的总的参数还要多,如何达到实时检测的要求呢(<0.1s)。
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报错, 该怎么修改呢???
多谢
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.
能用tensorflow来做吗?
建议训练的时候可以再多加一些data-augmentation,另外可以按照30%的几率把训练的图片变成灰度图。不然在灰度图上效果真的不理想
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)
你好,我按照顺序正确替换编译了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
Thanks very much for your job, as the title, I will be very appreciate that you can provide a pretrained model.
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,
为什么输入尺度要resize到这么小,才48*48?这样有什么好处吗?
想先用训练好的模型来进行一下测试,看下是否能复现出您博客和结果展示的结果。
如果方便共享一下您训练好的模型,谢谢!
ubuntu16.04,cuda8.0跑1_level_1/Code/2_train/train.sh 出现的问题,曾经吧cuda7.5升级为cuda8.0
根据您提供的源文件编译,是不是要修改caffe/src/caffe/proto下的caffe.proto文件,make test的时候没有报错,但是没生成testbin文件,请问怎么修改
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.