概述
- 迁移至ubuntu:
主要参考:
https://blog.csdn.net/yhaolpz/article/details/71375762
python caffe报错:No module named google.protobuf.internal
卸载anaconda,用原始python,重新安装protobuf : pip install protobuf
fatal error: caffe/proto/caffe.pb.h: No such file or directory
$ protoc src/caffe/proto/caffe.proto --cpp_out=.
$ sudo mkdir include/caffe/proto
$ sudo mv src/caffe/proto/caffe.pb.h include/caffe/proto
错误一:
error C2039: 'AddMatVector' : is not a member of 'caffe::MemoryDataLayer<float>'
error C2783: 'void Caffe_Predefine(void)' : could not deduce template argument for 'Dtype'
【解决办法】:
srccaffelayersmemory_data_layer.cpp
includecaffelayersmemory_data_layer.hpp
以上两个文档去掉所有的判断USE_OPENCV的代码,然后重新编译。举例如下:
virtual void AddMatVector(const vector<cv::Mat>& mat_vector,
const vector<int>& labels);
//#ifdef USE_OPENCV
//#endif // USE_OPENCV
"Layer type " << type << " already registered.";
在layer_factory.hpp里做如下更改可以解决这个问题:
把static void AddCreator(const string& type, Creator creator){}里的:
CHECK_EQ(registry.count(type), 0)<< "Layer type " << type << " already registered.";
registry[type] = creator;
改为:
if (registry.count(type) != 0)
{
std::cout<< "Layer type " << type << " already registered. ";
}
else
{
registry[type] = creator;
}
这样就能确保只注册一次了。
二、迁移至centos65
Opencv要用2.4.9
Yum出错problem making ssl connection
解决方法
vim /etc/yum.repos.d/epel.repo
- [epel]
- name=Extra Packages for Enterprise Linux 6 - $basearch
- baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
- #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearc
- h
- failovermethod=priority
- enabled=1
- #enabled=0
- gpgcheck=1
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
将enabled=1先改为enabled=0
然后命令行执行
yum install ca-certificates,安装成功后,将enabled重新改为1,再行
yum install -y XXXX可以正常安装了
yum源换成阿里云:https://blog.csdn.net/qq_34972627/article/details/80997273
很多包找不到的问题:安装epel:https://www.cnblogs.com/imweihao/p/7357484.html
基本流程参考官网和https://blog.csdn.net/chieryu/article/details/50218763
Glog和gflags安装有点坑,最终都选择了最新版本,有问题通过http://www.liuxiao.org/2018/04/glog-gflags-%E7%9A%84%E5%AE%89%E8%A3%85/ 解决:
1 2 3 4 5 6 | git clone https://github.com/gflags/gflags.git cd gflags mkdir build && cd build cmake .. -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC .. make -j4 sudo make install |
最后还是找不到libglog.so.0,重启就好了
Centos6.5中安装qt5.6.2 :https://blog.csdn.net/qq_22642239/article/details/77969518
最后
以上就是听话果汁为你收集整理的人脸识别迁移至linux平台的全部内容,希望文章能够帮你解决人脸识别迁移至linux平台所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复