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

qrcode-decode-ultra-wechat

v1.1.0

Published

Opt-in OpenCV WeChat QRCode engine for QRCode Decode Ultra — high accuracy on hard codes (~2.5MB WASM).

Readme

qrcode-decode-ultra-wechat

The opt-in OpenCV WeChat QRCode engine for QRCode Decode Ultra. A CNN detector + super-resolution model that decodes the small, blurry, damaged and low-light QR codes the native and jsQR fast path miss — at the cost of a ~6 MB payload (~2.5 MB gzipped), loaded lazily only when the cascade reaches this tier.

It lives in its own package on purpose: a default qrcode-decode-ultra install stays zero-WASM, and you add the heavy tier only when you need it.

npm install qrcode-decode-ultra-wechat qrcode-decode-ultra

Usage

import { createScanner } from "qrcode-decode-ultra";
import { enableWechat } from "qrcode-decode-ultra-wechat";

enableWechat(); // registers the "wechat" engine with core

const scanner = createScanner({ engines: "max-accuracy" });
const results = await scanner.scanImage(hardPhoto);

max-accuracy resolves to native → jsQR → WeChat. Without enableWechat() the wechat slot is simply absent from the cascade — scanner.ready() reports it as { available: false, reason: "not installed" } and the rest of the cascade still works.

To keep the payload out of your initial bundle, import it lazily:

const { enableWechat } = await import("qrcode-decode-ultra-wechat");
enableWechat();

How it runs

enableWechat() registers a worker for this tier, not just an engine. The scanner then runs two workers: core's own for the native + jsQR fast path, and this package's for WeChat, which it drives on a fast-path miss.

That matters because this tier is heavy. From the repo's own benchmark (pnpm benchmark, numbers in the root README):

| | cost | |---|---| | download | ~6 MB raw, ~2.5 MB gzipped | | model load, once | 0.6–1.2 s depending on machine | | decode, per escalated frame | ~250 ms (downscale_32) to ~325 ms (torture) — category medians |

On a live camera the fast path misses on every frame while the user lines up a hard code, so on the main thread that would be a near-continuous freeze rather than an occasional hitch. In its own worker it costs nothing visible.

The engine still runs in-process if there is nowhere else to put it — worker: false, or an environment without Worker/OffscreenCanvas. That path loads the payload lazily, so you only download it if you actually take it.

It is still the accuracy tier, not the speed tier: at ~250–325 ms per escalated frame you will not get 60fps out of it, and it is at its best on still images and "scan this hard photo".

License

MIT for this package's wrapper code. The OpenCV WeChat engine and its model weights are reached through the qr-scanner-wechat dependency (MIT wrapper, © 2023 Anthony Fu) and are themselves Apache-2.0 (Copyright (C) 2021 THL A29 Limited, a Tencent company). The upstream Apache-2.0 text is reproduced verbatim at assets/LICENSE and attributions are in NOTICE; the weights' license was verified against the upstream WeChatCV/opencv_3rdparty@wechat_qrcode LICENSE.