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

@svenflow/micro-handpose

v0.2.5

Published

WebGPU-powered hand tracking. Faster than MediaPipe, zero dependencies.

Readme

@svenflow/micro-handpose

Tiny, fast hand landmark detection for the browser. WebGPU-powered, zero dependencies.

  • 37KB JS (8KB gzipped) + 7.7MB weights (served via CDN)
  • ~2x faster than MediaPipe on the same hardware
  • 21 landmarks per hand, 100% identical output to the PyTorch reference
  • TypeScript types included

Install

npm install @svenflow/micro-handpose

Usage

import { createHandpose } from '@svenflow/micro-handpose'

const handpose = await createHandpose()
const result = await handpose.detect(canvas)

if (result) {
  console.log(result.score)      // 0.99
  console.log(result.handedness) // 'left' | 'right'
  console.log(result.landmarks)  // 21 { x, y, z } points
}

// Clean up GPU resources when done
handpose.dispose()

API

createHandpose(options?): Promise<Handpose>

Creates and initializes the detector. Downloads weights and compiles the WebGPU pipeline. Call once, then reuse.

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | weightsUrl | string | jsdelivr CDN | Base URL for weights.json and weights.bin. Set this to self-host weights. | | scoreThreshold | number | 0.5 | Minimum confidence to return a detection (0-1). |

handpose.detect(source): Promise<HandposeResult | null>

Runs inference on an image source. Returns null if no hand is detected.

Accepted input types: HTMLCanvasElement, OffscreenCanvas, ImageBitmap, HTMLImageElement, HTMLVideoElement, ImageData

HandposeResult

{
  score: number           // Confidence (0-1)
  handedness: 'left' | 'right'
  landmarks: Landmark[]   // 21 points
}

Each Landmark has x, y (normalized image coordinates, 0-1) and z (relative depth).

The 21 landmarks follow MediaPipe ordering: wrist, thumb_cmc, thumb_mcp, thumb_ip, thumb_tip, index_mcp ... pinky_tip.

handpose.dispose(): void

Releases GPU resources.

Self-hosting weights

By default, weights are fetched from jsdelivr CDN. To self-host:

const handpose = await createHandpose({
  weightsUrl: '/models/handpose'
})

The detector expects weights.json and weights.bin at that path.

Browser requirements

Requires WebGPU. Supported in Chrome 113+, Edge 113+, and Firefox Nightly.

Performance

Benchmarked on Apple M4:

| | Median | p99 | Backend | |---|---|---|---| | micro-handpose | 2.2ms | 3.1ms | WebGPU | | MediaPipe | 4.0ms | 6.5ms | WebGPU | | MediaPipe | 4.5ms | 8.2ms | WASM |

License

MIT