Openface在Liunx下配置成功运行:
来源:互联网 发布:淘宝退货怎么和卖家说 编辑:程序博客网 时间:2024/05/16 17:29
本文主要参考了openface的网址:https://github.com/cmusatyalab/openface
同时感谢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的路径修改为自己图片的路径即可运行。
- Openface在Liunx下配置成功运行:
- openface在liunx下配置
- liunx下配置基本的java web 运行环境
- liunx下配置环境变量
- Liunx下配置JDK
- liunx 下自动运行爬虫
- Openface初次安装配置
- 【小白】配置openface
- 配置 liunx 下 send mail
- Liunx下环境的配置
- liunx下防火墙的配置
- Liunx下网络的配置
- liunx下goldendict安装配置
- liunx下安装配置JDK
- Liunx下的vim配置
- 在WIN7下如何成功配置AppServ
- 在Liunx下安装Apache
- 在liunx下搭建jpress
- 解决"Matlab里光标不能显示"问题
- GSM-MODEM调试备忘(二)
- 程序员你需要的技能都在这里
- K近邻分类算法实现 in Python
- 全面理解面向对象的 JavaScript
- Openface在Liunx下配置成功运行:
- 搭建ZooKeeper集群
- SQLServer实训
- MyBatis参数传入集合之foreach动态sql
- ios开发从.plist文件中获取数据
- Java集合类型详解
- Linux SSH远程文件/目录传输命令scp
- python调用新浪API爬虫
- windows 10个人使用