Giter Site home page Giter Site logo

pinkuburu / vtuber-momosehiyori Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kennardwang/vtuber-momosehiyori

0.0 0.0 0.0 117.05 MB

πŸ˜€ Live2D VTuber, made by Unity and Cubism. This project is based on TCP socket, Python OpenCV and deep learning algorithms used in face recognition and alignment.

Home Page: https://www.bilibili.com/video/BV15A411e7hh/

License: MIT License

Python 89.23% C# 10.77%

vtuber-momosehiyori's Introduction

VTuber-MomoseHiyori

Recently, Kennard did some work on Deep Learning and Computer Vision. At the same time, he realized that he could make a Live2D VTuber model by Cubism and Unity which could simulate his facial expression. After watching some tutorials, Kennard successfully made his first Live2D model Momose Hiyori!


VTuber Demo



Face Behavior Test : Head shaking, Nodding, Head rotation, Eye blinking, Eye half-opening, Eyeball rotation, Mouth opening.


Development Environment

Description Specification
System Windows 10
Camera Integrated Webcam
Algorithm Language Python 3.7 (Anaconda)
IDE PyCharm 2019.2.5
Related Libraries opencv, dlib, pytorch
Model Tool Live2D Cubism Editor 4.0
Unity Engine Unity 2019.4.1f1 LTS
Script Language C#

Folder Specification

  • Recognition : Packed algorithm for face recognition.
  • UnityAssets : Unity materials for those who want to make Live2D VTuber by themselves. Here is the tutorial.

Usage

Step 0 : Preparation

  1. Prepare Python IDE (recommend Pycharm) and install Python 3.7 (recommend Anaconda).
  2. Download ckpts model, unzip and place it as Recognition\face_alignment\ckpts.
  3. Download VTuber_MomoseHiyori application folder.
  4. Clone the repository by git clone https://github.com/KennardWang/VTuber-MomoseHiyori.git.
  5. Enter the root by cd Recognition.

Step 1 : Test Camera

There are 2 types of running environments, please choose the correct one based on individual conditions. At the beginning, please install related dependencies by pip install -r requirements.txt.

  • CPU env

    1. Install dlib v19.22.0 by conda install -c conda-forge dlib.
    2. Finally, run python main.py --debug --cpu to test.
    3. If it runs normally, you can see your face, and press q to end up.
  • GPU env

    1. Download and install CUDA v10.2 & CUDNN v8.3.1.
    2. Install pytorch by pip3 install torch==1.10.2+cu102 torchvision==0.11.3+cu102 torchaudio===0.10.2+cu102 -f https://download.pytorch.org/whl/cu102/torch_stable.html.
    3. Finally, run python main.py --debug to test.
    4. If it runs normally, you can see your face, and press q to end up.

CPU env (left) has the higher FPS but the lower accuracy. (It cannot recognize well if some parts of the face are covered.)

GPU env (right) has the higher accuracy, the better fluency and consecutiveness but the lower FPS by virtue of the busier data IO.


Step 2 : Connect Unity

  1. Click VTuber_MomoseHiyori.exe to run.
  2. In CPU env, run python main.py --debug --cpu --connect.
  3. In GPU env, run python main.py --debug --connect.

Tips

The following tips may help to improve the effect:

  • Use spotlight : Try to make your face look brighter, the spotlight probably shows better effect than the natural light.
  • Adjust the face position : The debug mode of the camera may help you to know the position of your face. Try to make the green frame larger and central but not over the boundary.
  • Do not wear glasses : Wearing glasses may influence the accuracy of eye recognition.
  • Show your forehead : If your hair is so long that covers your eyes, it will have side effects on the accuracy of eye recognition.

Optimization

  • Use the Live2D model.
  • Add two eye events : Eye Half-opening and Eyeball Rotation.
  • Optimize some parameters to improve accuracy.
  • The multi-functional of window display is more convenient and feasible for live streaming.

References


License


Author

  • Kennard Wang ( 2020.6.27 )

vtuber-momosehiyori's People

Contributors

kennardwang avatar

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.