又一个OpenFace...

TadasBaltrusaitis/OpenFace

CMake output

The C compiler identification is AppleClang 8.0.0.8000042
The CXX compiler identification is AppleClang 8.0.0.8000042
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Looking for dgemm_
Looking for dgemm_ - not found
Looking for dgemm_
Looking for dgemm_ - found
Looking for pthread.h
Looking for pthread.h - found
Looking for pthread_create
Looking for pthread_create - found
Found Threads: TRUE  
A library with BLAS API found.
Found OpenCV: /opt/local (found version "3.2.0") 
OpenCV information:
  OpenCV_INCLUDE_DIRS: /opt/local/include;/opt/local/include/opencv
  OpenCV_LIBRARIES: opencv_calib3d;opencv_core;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dnn;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
  OpenCV_LIBRARY_DIRS: 
Boost version: 1.59.0
Found the following Boost libraries:
  filesystem
  system
Boost information:
  Boost_INCLUDE_DIRS: /opt/local/include
  Boost_LIBRARIES: /opt/local/lib/libboost_filesystem-mt.dylib;/opt/local/lib/libboost_system-mt.dylib
  Boost_LIBRARY_DIRS: /opt/local/lib
Found TBB: /usr/local (found version "2018.0")  
Found JPEG: /usr/local/lib/libjpeg.dylib  
Searching for BLAS and LAPACK
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of void*
Check size of void* - done
Found LAPACK library
Found ATLAS BLAS library
Looking for cblas_ddot
Looking for cblas_ddot - found
Check for STD namespace
Check for STD namespace - found
Looking for C++ include iostream
Looking for C++ include iostream - found
Configuring done

worked like a charm :)

  • Apparently found MacPorts version of OpenCV, Boost and OpenBlas etc. No idea how, but quite clever…
### OpenFace 面部识别库文档与使用 OpenFace 是一种基于深度神经网络的人脸识别工具包,旨在提供高效、精确的面部特征提取和人脸识别功能[^1]。以下是关于其核心特性和使用的详细介绍: #### 核心特性 OpenFace 使用深度学习模型来实现人脸检测、对齐以及嵌入向量生成的功能。它通过训练卷积神经网络 (CNN),能够将输入的人脸映射到低维空间中的表示形式,从而便于后续分类或其他任务的操作。 #### 安装指南 为了安装并运行 OpenFace 库,通常需要满足一些依赖条件,例如 Python 版本支持以及其他必要的机器学习框架的支持。具体步骤如下所示(以命令行为例): ```bash git clone https://github.com/TadasBaltrusaitis/OpenFace.git cd OpenFace ./download_models.sh pip install -r requirements.txt ``` 上述脚本会自动下载预训练好的模型文件,并完成环境配置工作。 #### 基础 API 调用示例 下面是一个简单的代码片段展示如何利用 OpenFace 进行人脸验证操作: ```python from openface import align_dlib, facenet # 初始化 AlignDlib 对象用于定位关键点 alignment = align_dlib.AlignDlib('path/to/landmarks.dat') def get_rep(image_path): bgrImg = cv2.imread(image_path) rgbImg = cv2.cvtColor(bgrImg, cv2.COLOR_BGR2RGB) bb = alignment.getLargestFaceBoundingBox(rgbImg) # 获取边界框 aligned_face = alignment.align(96, rgbImg, bb, landmarkIndices=AlignDlib.OUTER_EYES_AND_NOSE) rep = net.forward(aligned_face) # 计算特征向量 return rep ``` 此函数读取图片路径作为参数,返回该图像对应的人脸嵌入向量表示。 #### 后处理技术补充说明 值得注意的是,在实际应用过程中可能还需要借助其他计算机视觉算法来进行数据增强或者效果优化等工作。例如可以采用 Poisson 图像编辑方法进行无缝克隆等高级处理[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值