GithubHelp home page GithubHelp logo

tunaemre / face-swap-android Goto Github PK

View Code? Open in Web Editor NEW
138.0 10.0 55.0 377.58 MB

Realtime Face Swap Android NDK app full source code. Developed with OpenCV (http://opencv.org) and Dlib C++ (http://dlib.net).

License: Apache License 2.0

Java 6.49% Makefile 0.04% C++ 92.76% CMake 0.28% C 0.22% Cuda 0.21% MATLAB 0.01%
face swap android android-ndk opencv dlib face-swap-android faceswap

face-swap-android's People

Contributors

tunaemre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

face-swap-android's Issues

The renderer speed is too slow

Hi, your project is pretty impressive, but the renderer speed is too slow due to the heavy computation on CPU, have you try to put some computations to GPU using GLSL?

Compile Issue

Hi,
I have download the repository and import the project into android studio. i have facing different issue related to ndk and openCV . I have copy past all the issue bellow not.

Kindly help me out from this issue.

Thanks

Note Error:-
Gradle build:
**Error:A problem occurred configuring project ':faceSwap'.

executing external native build for ndkBuild C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk**

.........................................Gradle Sync......................

_Build command failed.

Error while executing 'C:\Users\hp\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-17 NDK_OUT=C:/Users/Public/working/Face-Swap-Android-master/faceSwap/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: OpenCV: You should ignore warning about 'non-system libraries in linker flags' and 'opencv_java' library.
Android NDK: 'OPENCV_INSTALL_MODULES:=on' can be used to build APK with included OpenCV binaries
Android NDK: OpenCV: You should ignore warning about 'non-system libraries in linker flags' and 'opencv_java' library.
Android NDK: 'OPENCV_INSTALL_MODULES:=on' can be used to build APK with included OpenCV binaries
Android NDK: WARNING:C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk:detectionbasedtracker: non-system libraries in linker flags: -lopencv_java3
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk:faceswapper: non-system libraries in linker flags: -lopencv_java3
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
md "C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib\armeabi" >NUL 2>NUL || rem
C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi] "Gdbserver ": "[arm-linux-androideabi] C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib/armeabi/gdbserver"
copy /b/y "C:\Users\hp\AppData\Local\Android\sdk\ndk-bundle\build\..\prebuilt\android-arm\gdbserver\gdbserver" "C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib\armeabi\gdbserver" > NUL
C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi] "Gdbsetup ": "C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib/armeabi/gdb.setup"
C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe "set solib-search-path C:/Users/Public/working/Face-Swap-Android-master/faceSwap/build/intermediates/ndkBuild/debug/obj/local/armeabi" > C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib/armeabi/gdb.setup
C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe "directory C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../sysroot "C:/Users/Public/working/opencv-3.3.1-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/opencv" "C:/Users/Public/working/opencv-3.3.1-android-sdk/OpenCV-android-sdk/sdk/native/jni/include" C:/Users/Public/working/Face-Swap-Android-master/faceSwap/src/main/jni C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include C:/Users/hp/AppData/Local/Android/sdk/ndk-bundle/build//../sources/cxx-stl/gnu-libstdc++/4.9/include/backward" >> C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\debug\lib/armeabi/gdb.setup
process_begin: CreateProcess(NULL, "", ...) failed.
make: *** No rule to make target C:/Face-S~1/faceSwap/src/main/jni/DetectionBasedTracker.cpp', needed by C:/Users/Public/working/Face-Swap-Android-master/faceSwap/build/intermediates/ndkBuild/debug/obj/local/armeabi/objs-debug/detectionbasedtracker/C_/Face-S1/faceSwap/src/main/jni/DetectionBasedTracker.o'. Stop.
Build command failed.
Error while executing 'C:\Users\hp\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=0 APP_PLATFORM=android-17 NDK_OUT=C:/Users/Public/working/Face-Swap-Android-master/faceSwap/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\Public\working\Face-Swap-Android-master\faceSwap\build\intermediates\ndkBuild\release\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: OpenCV: You should ignore warning about 'non-system libraries in linker flags' and 'opencv_java' library.
Android NDK: 'OPENCV_INSTALL_MODULES:=on' can be used to build APK with included OpenCV binaries
Android NDK: OpenCV: You should ignore warning about 'non-system libraries in linker flags' and 'opencv_java' library.
Android NDK: 'OPENCV_INSTALL_MODULES:=on' can be used to build APK with included OpenCV binaries
Android NDK: WARNING:C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk:detectionbasedtracker: non-system libraries in linker flags: -lopencv_java3
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:C:\Users\Public\working\Face-Swap-Android-master\faceSwap\src\main\jni\Android.mk:faceswapper: non-system libraries in linker flags: -lopencv_java3
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
process_begin: CreateProcess(NULL, "", ...) failed.
make: *** No rule to make target C:/Face-S~1/faceSwap/src/main/jni/DetectionBasedTracker.cpp', needed by C:/Users/Public/working/Face-Swap-Android-master/faceSwap/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/detectionbasedtracker/C_/Face-S
1/faceSwap/src/main/jni/DetectionBasedTracker.o'. Stop._

compile error

Hi,
I'm using your code for face swap on android,but I got many errors when I tring to build the code using android studio.Can you help me with this problem ?Any suggestions will be appreciated.The error information is as follows:
D:\Proj\Android_Proj\Face-Swap-Android1\faceSwap\build\intermediates\res\merged\debug\values-v19\values-v19.xml
Error:(4, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(5, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(11, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(12, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(4, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(5, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(11, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(12, 21) No resource found that matches the given name: attr 'windowNoTitle'.
D:\Proj\Android_Proj\Face-Swap-Android1\faceSwap\build\intermediates\res\merged\debug\values-v21\values-v21.xml
Error:(12, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(13, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(21, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(22, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:(6, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(4, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(5, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(12, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(13, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(21, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(22, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:(6, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(4, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(5, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
D:\Proj\Android_Proj\Face-Swap-Android1\faceSwap\build\intermediates\res\merged\debug\values\values.xml
Error:(40, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(41, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(45, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(46, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(22) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:(25, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(23, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(24, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(27) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(28, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:(31) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(32, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:(35) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(36, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:(40, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(41, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(45, 21) No resource found that matches the given name: attr 'windowActionBar'.
Error:(46, 21) No resource found that matches the given name: attr 'windowNoTitle'.
Error:(22) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:(25, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(23, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(24, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(27) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(28, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:(31) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(32, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:(35) Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Button.Colored'.
Error:(36, 21) No resource found that matches the given name: attr 'colorButtonNormal'.
Error:Execution failed for task ':faceSwap:processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Compile issue

Hi, I'm having problems compiling.

Getting error:
*** target pattern contains no `%'. Stop.
It's coming from the build-binary.mk in the Android sdk. The line is:
$(foreach src,$(filter %.S %.s,$(LOCAL_SRC_FILES)), $(call compile-s-source,$(src),$(call get-object-name,$(src))))

Sorry, I'm new to Android Studio. Let me know if there's any other info that will help.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.