MCPcopy Create free account
hub / github.com/bwasti/emojicam

github.com/bwasti/emojicam @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
11 symbols 28 edges 5 files 0 documented · 0% updated 3y ago★ 73

Browse by type

Functions 9 Types & classes 2
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

emojicam

An emoji filter for your webcam using shumai + bun! (writeup)

render

For fidelity testing I used some colorful album art. Recognize any of them?

What is this?

A logical extension to real-time ASCII webcams (e.g. p2pvc) trained and served entirely in TypeScript.

Since there are ~2k emoji used for this project, the structure and color of each one would be prohibitively annoying to encode in a lookup table. Instead, it uses a tiny neural network to infer which emoji best represents any given 36x36 patch of pixels. Training involves mutating reference images of emoji (with libvips) and having the neural network learn to predict the original emoji index. It's kind of a hack, but it seems to work fairly well.

At serving time, the neural network is called with a batch of 1,728 patches (36x48) around 5-10 times per second.

Run

(Be sure to install bun)

$ git clone https://github.com/bwasti/emojicam.git
$ cd emojicam
$ bun add @shumai/shumai
$ bun serve.ts

Then open localhost:3000

Train from scratch

train

$ bun add @shumai/image
$ bun train.ts

Some stills

Screenshot 2022-12-28 at 7 49 36 PM Screenshot 2022-12-28 at 7 48 24 PM Screenshot 2022-12-28 at 7 47 11 PM Screenshot 2022-12-28 at 7 46 40 PM

Core symbols most depended-on inside this repo

Shape

Function 7
Class 2
Method 2

Languages

TypeScript100%

Modules by API surface

train.ts6 symbols
model.ts4 symbols
serve.ts1 symbols

For agents

$ claude mcp add emojicam \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page