npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pianocv

v0.5.3

Published

Finds a piano or keyboard in a camera image and outlines every key, live: the KeyNet runtime and its Rust keyboard core

Downloads

1,316

Readme

pianoCV

Point a webcam at a piano and pianoCV finds every key, live, right in your browser.

Try it here. Nothing gets uploaded: the camera never leaves your machine.

Plug in a MIDI keyboard and the keys you play light up where they really are in the picture. The idea is to draw visuals onto a real piano, like a video filter.

How it works

KeyNet, one small keypoint model, looks at the camera and marks the keybed corners, the gaps between white keys and the edges of the black keys. A small Rust core, compiled to WebAssembly, fits a real keyboard layout to those points and tracks it, so every key is found, even the blurry ones far away, and each one gets a note.

The model runs in the browser with ONNX Runtime Web, on your GPU through WebGPU when it can. It was trained with PyTorch on thousands of fake pianos rendered in three.js plus hand-checked real frames, and it lives on Hugging Face. Your hands are found with MediaPipe so the glow stays behind them, and the notes come in through Web MIDI.

Use it natively

The same Rust core that runs in the browser as WebAssembly can also run natively on your machine. Feed it a camera frame in RGBA and it returns every key with its note and outline. Try it on a video with:

make model
make core-demo ARGS="path/to/video.mp4 path/to/output"

This needs ffmpeg, the model from make model, and a Rust toolchain.

The model

The trained weights are on Hugging Face at mattf/pianoCV, with a model card that explains what it takes and returns: keynet.onnx.

It is a plain ONNX file, so you can use it from any language with ONNX Runtime.

Run it yourself

Install Bun, uv and a Rust toolchain with wasm-pack, then:

git clone https://github.com/matheusfillipe/pianoCV.git
cd pianoCV
make install
make model
make dev

make install sets up the browser app and the Python tools, make model downloads the model from Hugging Face, and make dev starts the app. Open http://localhost:5273/, allow the camera, and point it at a keyboard. make help shows everything else, including how to render training pianos and train the model yourself.

Licence

Apache 2.0.