Requirements
MinGW-w64 also works, but MSVC is recommended.
Step 1: Clone the Repository
Step 2: Place the SDK Files
Unzip the Windows SDK package and place files underdemo/cpp/sdk/:
Step 3: Build
Open a Developer Command Prompt for VS (or a PowerShell session with the MSVC environment loaded), then run:- Copies
facebetter.dllnext to the executable inbuild/ - Copies
resource/resource.fbdtobuild/resource/resource.fbd - Copies
demo.png(if present) tobuild/resource/demo.png
Step 4: Prepare a Preview Image (optional)
Place any face photo nameddemo.png in demo/cpp/:
Step 5: Run
- Left panel – live beauty-processed preview
- Right panel – Beauty Control Panel with the following groups:
- Basic Beauty: Smoothing / Whitening / Rosiness / Sharpening
- Face Reshape: Face Thin / V Face / Narrow Face / Short Face / Cheekbone / Jawbone / Chin / Nose Slim / Eye Size / Eye Distance
- Makeup: Lipstick / Blush
- Sticker: dropdown (Off / rabbit)
Troubleshooting
Q: “facebetter.dll not found” at startupA: Make sure
demo/cpp/sdk/lib/facebetter.dll exists, then re-run cmake --build build so CMake copies the DLL next to the executable.
Q: Window shows “Put demo.png …”A: Place a face photo named
demo.png in demo/cpp/ and restart the demo.
Q: CMake cannot find NinjaA: Run
winget install Ninja-build.Ninja, or replace -G "Ninja" with -G "Visual Studio 17 2022" and change --config Release accordingly.
