## Supporting environments
-This library was developed and tested only on Ubuntu 18.04 using GCC 7.5.0.
-
-Currently it only supports Unix-like environments, as I am using
-`<sys/socket.h>` etc to communicate with OpenSeeFace. If there is demand
-for it, I can try to make it work on Windows as well (contributions
-welcome).
+This library was tested on Ubuntu 18.04 using GCC 7.5.0, and on
+Windows 10 using Visual Studio 2019.
The library should only require C++11. The Cubism
SDK requires C++14. I have made use of one C++17 library (`<filesystem>`)
## Build instructions
-1. Download OpenSeeFace from <https://github.com/emilianavt/OpenSeeFace>,
+1. Clone OpenSeeFace from <https://github.com/emilianavt/OpenSeeFace>,
refer to its documentation and install its dependencies.
- Note: I have forked OSF and added a small feature (flipping the webcam
- feed horizontally like a mirror). If you want, you can clone my fork
- instead: <https://github.com/adrianiainlam/OpenSeeFace>.
-
2. Install dependencies.
+ On Linux:
+
You will require a recent C/C++ compiler, `make`, `patch`, and CMake >= 3.16. To compile the example
program you will also require the OpenGL library (and its dev headers)
among other libraries required for the example program. The libraries I
libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libglu1-mesa-dev
+ On Windows:
+
+ You will need a recent C/C++ compiler (I've tested Visual Studio 2019),
+ `patch`, CMake >= 3.16, and a `sh` shell (Git Bash works fine). I did not
+ need to install any other library, but I have not tested on a clean machine.
+
3. Clone this repository
git clone https://github.com/adrianiainlam/facial-landmarks-for-cubism.git
To build the example program:
-5. Download "Cubism 4 SDK for Native R2" from the Live2D website:
+5. Download "Cubism 4 SDK for Native R6" from the Live2D website:
<https://www.live2d.com/en/download/cubism-sdk/download-native/>.
- Extract the archive -- put the "CubismSdkForNative-4-r.2" folder under
+ Extract the archive -- put the "CubismSdkForNative-4-r.6" folder under
the "example" folder of this repo.
Note: The Cubism SDK is the property of Live2D and is not part of this
project. You must agree to Live2D's license agreements to use it.
6. Go into the
- "example/CubismSdkForNative-4-r.2/Samples/OpenGL/thirdParty/scripts"
+ "example/CubismSdkForNative-4-r.6/Samples/OpenGL/thirdParty/scripts"
directory and run
./setup_glew_glfw
./build.sh
+ On Linux, the build should be complete after running this script.
+ On Windows, you will also need to go into "./demo_build/scripts"
+ and run one of the scripts corresponding to your MSVC version.
+ The script will ask for your configurations. I've tried "1 2 1"
+ which works fine for me.
+
8. Now try running the example program.
First, (in a separate terminal) go to where you have downloaded
./python3 ./facetracker.py -v 4 --model 3 -M
- The `-M` option is currently available only on my OSF fork.
-
I tried models 3 and 4, and I think both work reasonably well.
Please feel free to explore other options provided by OSF.
Back to the original terminal, from the "example" directory:
+ (for Windows, replace "make_gcc" with your MSVC version)
cd ./demo_build/build/make_gcc/bin/Demo/
./Demo
issues or pull requests on GitHub, or send questions or patches to me
(see my email address above) if you prefer email. Thanks :)
+Special thanks to GitHub user @Arkueid for adding Windows support!