Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

rotejin/Keshin2D

Media & Design

Browser-based 2D avatar that animates a character picture with face tracking, lip-sync and OBS output.

127
7
Python
MIT
1 day old

What it is

Keshin2D is a browser-based 2D avatar system for streamers and character creators. A split character drawing is deformed as a WebGL2 mesh every frame, driving face direction, gaze, blinking, expressions, mouth shape, and hair/accessory sway without dedicated modeling software. It ships two sample models, kurage02 and chiwa, and the second was produced end-to-end from a single character picture using the repo's own tools.

Animation comes from three sources: mouse-following, Web camera face tracking, and a scripted "leave it to me" idle loop. It includes 22 expressions, microphone lip-sync that distinguishes vowels, adjustable hair and accessory physics, and transparent-background output for OBS.

Quick start

Prerequisites: Python 3.8 or later (standard library only) and a WebGL2-capable browser, tested with Chrome and Edge. Download the ZIP via Code → Download ZIP or clone the repository, then start the local server from the project folder:

OS Command
Windows double-click start.bat
macOS / Linux ./start.sh (or sh start.sh if permissions were lost in the ZIP)
Any python tools/serve.py

A browser window opens showing kurage02. The black terminal window is the local server; keep it open and stop it with Ctrl+C or by closing it. Do not open index.html directly, because browsers block file-based loading. The server uses port 8770 and searches up to 20 ports ahead if it is taken; --port N forces a port.

To switch models, use the top field of the panel, or launch with start.bat --model chiwa. To start with a transparent background directly, open this URL while the server runs:

http://127.0.0.1:8770/index.html?model=kurage02&ui=0&bg=transparent

Paste this URL into an OBS browser source for streaming.

Making your own character

Building a model from one picture is a separate pipeline under partsgen/. It needs Python 3.10+ with numpy, opencv-python and pillow, Node.js 22+, the image-capable Codex CLI (requires an OpenAI contract), Real-ESRGAN with a Vulkan-capable GPU, and a coding agent such as Claude Code. Follow the preparation steps in partsgen/README.md and the Real-ESRGAN setup in UPSCALER.md, then open a coding agent in the folder, paste the prompt from MASTER_PROMPT.md, and replace only the picture path and character name. The agent pauses at three checkpoints—base picture resemblance, hair design, and movement feel—for you to judge. The finished model lands in models/<name>/.

Real-ESRGAN is not bundled but can be fetched from its distributor with one preparation command. The full stage-by-stage procedure, validation criteria, and pitfalls are in WORKFLOW.md and KNOWHOW.md.

Constraints and known issues

  • Runtime is verified on Windows; macOS and Linux pass only headless Chrome CI checks via start.sh, not hands-on desktop testing. Firefox and Safari are untested.
  • The character-generation tooling is built and verified on Windows only, and the author states that one-prompt reproducibility at a consistent quality has not been confirmed; every existing character required fixing the tools and instructions along the way.
  • The OBS browser source has not been verified in practice. If it misbehaves, a fallback is to open bg=green in a normal browser and chroma-key a window capture.
  • Web-camera tracking and microphone lip-sync are tested with synthetic video and audio; real face and voice accuracy is not sufficiently verified.
  • The viewer needs WebGL2. On Linux, missing Japanese fonts show panel text as □; installing Noto Sans CJK fixes it.
  • Camera and microphone data are processed only inside the browser and are neither recorded nor transmitted; MediaPipe face tracking is bundled for offline use. Source and bundled models are MIT-licensed (MediaPipe itself is Apache 2.0).

HotRepo's take

The repo appeared on HotRepo's new-project list on 2026-11-27, recording 20 stars gained over a roughly 1.5-hour window, with stars rising from 108 to 120 in the sampled curve. That is an early, short observation window, not yet a trend. The notable technical fact is the scope: a purely standard-library Python server plus WebGL2 renderer, with an agent-driven pipeline that turns one drawing into a rigged model. The README's honesty about OBS and real-world tracking being unverified is the main thing to weigh before adopting it.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. livliv-dev/playerRender 2.5D characters on the web with lip sync and webcam face tracking.TypeScript191
  2. DominikScholz/open-bot-avatarRenderer and JSON spec for SVG avatar characters with moods and pointer gaze, for agent UIs.TypeScript102
  3. jacke-pp/open-yokiRun your own AI live-stream host with cloned voice, animated avatar, chat replies and autonomous posts on one server.JavaScript202
  4. dijia9723/live2d-studioDesktop AI companion studio combining Live2D avatars, streaming chat, voice, stage effects and Douyin live interaction.Go105
  5. jamesondh/chimera-vocal-synthA browser vocal synthesizer that generates speech, singing and beatbox sounds from a simulated airway rather than samples.Rust136