Skip to content

use Dlib to capture facelandmark to update the moji of liv2d in Unity

License

Notifications You must be signed in to change notification settings

Rossichan/Facemoji

Repository files navigation

Facemoji

A Unity project (just for Android now), which has two modules.

  • One is FaceTracking, which using OpenCV and Dlib to detects facial expressions, converts them into Live2D model, and generates gif images.
  • The other is AI (chatbot), which uses Turing Robot, Iflytek IAT and Iflytek TTS to make a voice chat.

中文 README.md

Assets Library

Official

Unofficial

Releases

Setup

  • Download shape_predictor_68_face_landmarks.dat(Facial Landmark Detector) and Facemoji_Plugins_Assets_1.5.0.unitypackage(Streamlined OpenCV, Dlib, Live2D and Iflytek Assets Library) from Drive.Google or Pan.Baidu
  • git clone https://github.com/huihut/Facemoji.git
  • Create new Unity project (called FacemojiDemo)
  • Copy Facemoji/Assets and Facemoji/ProjectSettings to your unity project (FacemojiDemo/)
  • Copy shape_predictor_68_face_landmarks.dat to your FacemojiDemo/Assets/StreamingAssets/
  • Import Facemoji_Plugins_Assets_1.5.0.unitypackage, The directory structure is:
  • Select Android platform
  • Build & Run

Usage

FaceTracking

Using OpenCV and Dlib to detects facial expressions, converts them into Live2D model.

She can move with your face and you can try shaking your head.

Record gif

The middle of the above is the record button, you can record 3 seconds gif.

Recorder State : Recording(Ready to record) -> PreProcessing(Is recording) -> Paused(Compressing gif) -> Recording(Ready to record)

Save the gif in Application.dataPath

(Android in /storage/emulated/0/Android/data/com.huihut.facemoji/files/)

Voice and text chat (chatbot? She said she is AI, not Robot! hhhh...)

Using Turing Robot, Iflytek IAT and Iflytek TTS.

You can chat with her by voice or text.

She's a great AI (robot), and she can:

  • Chat
  • Encyclopedia
  • Calculate
  • Tell a story
  • Tell a joke
  • Idiom Solitaire
  • Horoscope
  • Weather forecast
  • ...

But because she is a Chinese robot(Turing robot only supports Chinese), she can only chat in Chinese.

She will chat in English later.

Preview

Gif

  • Come On ! (加油!)

  • No~ No~(不要~ 不要~)

  • Wink ! (放电!)

About

use Dlib to capture facelandmark to update the moji of liv2d in Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published