ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

树莓派上如何编译? #78

Closed Jiakui closed 5 years ago

Jiakui commented 5 years ago

可以提供树莓派上的 makefile 吗?

laujinseoi commented 5 years ago

我在Ubuntu16.04编译的,自己写了一个cmakelist,如果你树莓派也是用这个系统,你可以参考参考。

CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT (facedetection)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
SET(BUILD_SHARED_LIBS ON)

FIND_PACKAGE(OpenCV REQUIRED)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src
                    ${OpenCV_INCLUDE_DIRS})
ADD_LIBRARY(facedetection src/facedetectcnn.cpp 
                          src/facedetectcnn-floatdata.cpp 
                          src/facedetectcnn-int8data.cpp 
                          src/facedetectcnn-model.cpp)
ADD_EXECUTABLE(face_detect example/libfacedetectcnn-example.cpp)
TARGET_LINK_LIBRARIES(face_detect ${OpenCV_LIBS} facedetection)
Jiakui commented 5 years ago

这个没有 enable neon 啊,树莓派是 arm 架构的。。。。

不太会用 cmake 呢,方便直接给 Makefile 吗 。。。。谢谢。。。。。

ShiqiYu commented 5 years ago

你可以修改facedetectcnn.h,打开enable neon则可。

On Thu, Mar 14, 2019 at 3:35 PM Jiakui Wang notifications@github.com wrote:

这个没有 enable neon 啊,树莓派是 arm 架构的。。。。

不太会用 cmake 呢,方便直接给 Makefile 吗 。。。。谢谢。。。。。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShiqiYu/libfacedetection/issues/78#issuecomment-472735995, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHUFTtggH5BZH27HkC5EQ5zSxn9wYks5vWfu7gaJpZM4bzb9w .

cgpeter96 commented 5 years ago

@laujinseoi 感谢老哥

XuejianLiu commented 5 years ago

@laujinseoi 感谢老哥,cmakelist在树莓派可以用

filannn commented 5 years ago

@laujinseoi 大神,想问一下为什么用了之后生成不出makefile文件啊,会是什么原因呢?小白求教。