Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shifting Mtcnn_ncnn to other code and use other C++ file over it. #33

Open
ankittecholution opened this issue Sep 30, 2019 · 5 comments

Comments

@ankittecholution
Copy link

ankittecholution commented Sep 30, 2019

I was trying to Shift the code to one of my project which has a c++ file but was not able to do that as a project can't have more then one cmake fie so I was not able to do so if anyone has a solution to it please help me out. Any help will be great.

@moli232777144
Copy link
Owner

which c++ file?

@ankittecholution
Copy link
Author

I was trying to implement object tracking over it. for tracking faces.

@moli232777144
Copy link
Owner

add c++ file path to cmakeList.txt

@ankittecholution
Copy link
Author

ankittecholution commented Sep 30, 2019

This is the cmake file for object tracking
`
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)

project(TSAS)

add_subdirectory(tensorflow_demo)`

This is cmake file inside tensoreflow_demo
`project(TENSORFLOW_DEMO)

get_filename_component(SRC_DIR ${CMAKE_SOURCE_DIR}/.. ABSOLUTE)

if (ANDROID_ABI MATCHES "^armeabi-v7a$")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=softfp -mfpu=neon")
elseif(ANDROID_ABI MATCHES "^arm64-v8a")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ftree-vectorize")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTANDALONE_DEMO_LIB
-std=c++11 -fno-exceptions -fno-rtti -O2 -Wno-narrowing
-fPIE")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}
-Wl,--allow-multiple-definition
-Wl,--whole-archive -fPIE -v")

file(GLOB_RECURSE tensorflow_demo_sources ${SRC_DIR}/jni/tensorflow_demo/.)
add_library(tensorflow_demo SHARED
${tensorflow_demo_sources})
target_include_directories(tensorflow_demo PRIVATE
${CMAKE_SOURCE_DIR})

target_link_libraries(tensorflow_demo
android
log
jnigraphics
m
atomic
z)
`

@ankittecholution
Copy link
Author

When I include this into mtcnn cmake there is an error and if I put mtcnn cmake file there is an error that we mtcnn source file not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants