Openface在Liunx下配置成功运行:
2015-10-23 16:47
495 查看
本文主要参考了openface的网址:https://github.com/cmusatyalab/openface
同时感谢openface的作者:bamos在配置的时候知道,特向原作者提出感谢!
1:安装依赖项:
同时感谢openface的作者:bamos在配置的时候知道,特向原作者提出感谢!
1:安装依赖项:
FROM ubuntu:14.04 |
MAINTAINER Brandon Amos <brandon.amos.cs@gmail.com> |
RUN apt-get update |
RUN apt-get install -y \ |
build-essential \ |
cmake \ |
curl \ |
gfortran \ |
git \ |
libatlas-dev \ |
libavcodec-dev \ |
libavformat-dev \ |
libboost-all-dev \ |
libgtk2.0-dev \ |
libjpeg-dev \ |
liblapack-dev \ |
libswscale-dev \ |
pkg-config \ |
python-dev \ |
python-pip \ |
wget \ |
zip |
RUN pip2 install numpy scipy pandas |
RUN pip2 install scikit-learn scikit-image |
RUN curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash -e |
RUN git clone https://github.com/torch/distro.git ~/torch --recursive |
RUN cd ~/torch && ./install.sh |
RUN ~/torch/install/bin/luarocks install nn |
RUN ~/torch/install/bin/luarocks install dpnn |
RUN ~/torch/install/bin/luarocks install image |
RUN ~/torch/install/bin/luarocks install optim |
RUN cd ~ && \ |
mkdir -p src && \ |
cd src && \ |
curl -L https://github.com/Itseez/opencv/archive/2.4.11.zip -o ocv.zip && \ |
unzip ocv.zip && \ |
cd opencv-2.4.11 && \ |
mkdir release && \ |
cd release && \ |
cmake -D CMAKE_BUILD_TYPE=RELEASE \ |
-D CMAKE_INSTALL_PREFIX=/usr/local \ |
.. && \ |
make -j8 && \ |
make install |
RUN cd ~ && \ |
mkdir -p src && \ |
cd src && \ |
curl -L \ |
https://github.com/davisking/dlib/releases/download/v18.16/dlib-18.16.tar.bz2 \ |
-o dlib.tar.bz2 && \ |
tar xf dlib.tar.bz2 && \ |
cd dlib-18.16/python_examples && \ |
mkdir build && \ |
cd build && \ |
cmake ../../tools/python && \ |
cmake --build . --config Release && \ |
cp dlib.so .. 安装步骤安装应该没有不会出错。 首先需要获得 models/openface/celeb-classifier.nn4.v1.pkl.。 Run: models/get-models.sh 此时openface平台已经配置成功可以运行demo了 2:运行demo2: 按照官网提示直接运行就行。 贴上我运行的结果 Comparing images/examples/lennon-1.jpg with images/examples/lennon-2.jpg. + Squared l2 distance between representations: 0.309903459228 Comparing images/examples/lennon-1.jpg with images/examples/clapton-1.jpg. + Squared l2 distance between representations: 1.24080096219 Comparing images/examples/lennon-1.jpg with images/examples/clapton-2.jpg. + Squared l2 distance between representations: 1.05589412216 Comparing images/examples/lennon-2.jpg with images/examples/clapton-1.jpg. + Squared l2 distance between representations: 1.38612403652 Comparing images/examples/lennon-2.jpg with images/examples/clapton-2.jpg. + Squared l2 distance between representations: 1.07297598188 Comparing images/examples/clapton-1.jpg with images/examples/clapton-2.jpg. + Squared l2 distance between representations: 0.258562088431 3:运行demo3: ./demos/classifier.py infer ./models/openface/csleb-classifier.nn4.v1.pkl <images> 只需把image的路径修改为自己图片的路径即可运行。 |
相关文章推荐
- linux之getopt函数
- linux字符驱动之中断按键 .
- Install Linux Kernel - AT91SAM9260EK
- 解决Tomcat Could not reserve enough space for object heap
- Linux平台Makefile文件的编写基础篇
- Linux那些事儿之我是Block层(5)浓缩就是精华?(二) .
- 关于模块架构(高内聚低耦合)
- Linux学习18_Linux 管道符的使用
- 关于archlinux下的ralink5370网卡
- org.apache.hadoop.hdfs.protocol.UnregisteredDatanodeException
- SecureCrt连接Linux操作tomcat
- 左右margin top问题百分比值
- Java 反向代理J2EP
- 第七例:短信监控之内容观察者
- 论宏定义 #define 摘要
- 从几幅架构图中偷得半点海量数据处理经验
- Tomcat环境搭建及建议
- 如何在Mac OS中安装Tomcat 7.0
- 利用TCMalloc优化nginx性能
- nginx 编译安装过程优化