Materializr
Open-source parametric 3D CAD for makers — constraint sketches, solid modeling, threads, SVG & text engraving, STL/STEP export. Android, iPad, Linux, Mac, Windows. Vibe coded.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
A simple, privacy-friendly passport photo maker that runs entirely in the browser.
If it's useful to you, a ⭐ on the repo helps other people find it.查看完整 README ↗A simple, privacy-friendly passport photo maker that runs entirely in the browser.
If it's useful to you, a ⭐ on the repo helps other people find it.
What it does:
Try it: https://passport-maker-ten.vercel.app/
Every country also has its own page, e.g. /passport-photo/india or /passport-photo/united-states, which opens the tool preset to that country and sets out its published requirements.
Everything is client-side. The matting model is served from this site rather than a third-party CDN, so no request describing your photo is made to anyone.
The matting model and its runtime are fetched the first time you remove a background — about 16MB, then cached by the browser. Nothing is downloaded for the crop-only path.
utils/presets.ts)The cut-out comes from MODNet (utils/modnet.ts), a portrait matting model that predicts
alpha directly. It runs locally through ONNX Runtime Web at 512px on the short edge.
This replaced a selfie-segmentation mask plus a lot of colour reasoning, which failed in two opposite ways that no amount of tuning could fix, because colour alone cannot tell them apart:
A model that understands people has no such trouble. utils/matting.ts is now only a
finishing pass over the predicted alpha — it resamples onto the output grid, sharpens the
edge along real image edges with a guided filter, and unmixes the old background colour out
of semi-transparent pixels so pale hair keeps no rim of the room it was shot in. None of
those steps can add or remove a region.
Notes:
This tool is browser-only:
If you want “offline / self-hosted models” later, see the notes in the “MediaPipe models” section below.
npm install
npm run dev
npm run build
build runs vite build and then scripts/prerender.mjs, which writes one static page per
country under dist/passport-photo/<slug>/ plus dist/sitemap.xml. Each page carries its
own title, description, canonical URL, JSON-LD and a visible requirements table, generated
from src/utils/presets.ts — a query parameter on a single client-rendered page cannot be
indexed as 53 separate pages, and the per-country specs are the most searched-for thing
here. Set SITE_URL to override the absolute URLs:
SITE_URL=https://your-domain.example npm run build
public/og.png is the 1200×630 card that WhatsApp, Slack, Twitter, Reddit and iMessage show
when someone shares a link; without it a shared link renders as a bare grey URL. To
regenerate it, open scripts/og-card.html in a browser, press Download og.png, and move
the file to public/og.png. The card is drawn in canvas rather than kept as a binary, so it
can be re-cut when the wording changes.
MIT — see LICENSE. Use it, fork it, ship it, charge for it; just keep the copyright notice.
That covers the code in this repository. The things it depends on carry their own terms, and two are worth knowing about before you build a product on this:
public/models/modnet.onnx) — the matting network. The MODNet source is
Apache-2.0, but the officially published pretrained weights are released under
CC BY-NC-SA 4.0, which is non-commercial. If you intend to use this commercially,
confirm the provenance of the weights you are shipping and retrain or substitute if
needed.The country specifications in src/utils/presets.ts are transcriptions of published
government requirements. They are provided as a convenience and are not legal advice —
rules change, and the authority's own guidance is always the authority.