Prototype a sketch-to-shape drawing tool.
Prototype a drawing tool that suggests a clean geometric shape after a pen stroke.
Build with GlyphDraw a circle, square, triangle, or line. A tiny local classifier finds the closest shape.
Glyph maps an ordered pen stroke to a circle, square, triangle, or line. It compares a normalized drawing with four learned class averages. The input is a sequence of points, not an image or photograph.
Research v0.1.0 · A statistical classifier, not a generative foundation model.
Center the drawing and scale its longest dimension into a 16 × 16 grid.
Interpolate the stroke and mark nearby cells, producing 256 features.
Compare squared distances to the four learned centroids and return ranked scores.
Actual model inference, inside your browser.
No input is uploaded.
DRAW ONE SHAPE
Draw an upright shape in one stroke, or choose an example.
Scores are relative model outputs, not calibrated confidence.
Starting points for prototypes.
Validate the model for your use case.
Prototype a drawing tool that suggests a clean geometric shape after a pen stroke.
Build with GlyphBuild an interactive geometry lesson using the four supported shapes.
Build with GlyphExplore the effects of rotation, noise, and incomplete strokes on a simple classifier.
Build with GlyphProcedural circles, squares, triangles, and lines. Each example adds small coordinate noise, slight rotation (about ±7°), and horizontal stretching. No human drawings, images, or photo datasets are included.
120 generated strokes per class train the centroids. Another 30 per class use different random seeds. Both sets contain the same four geometric recipes.
No third-party model weights, external datasets, or user inputs were used to train this version. Training records are kept private. We publish weights, model cards, aggregate results, and the limitations of each release.
Nearest class centroid · 16 × 16 stroke occupancy
Each release includes its model card, measured artifact size, and SHA-256 checksum. Training data and working checkpoints stay private.
Use the local workspace packages today. These packages have not been published to npm or Maven Central.
Run from the repository root, then import the model from a workspace example.
bun install
bun run sdk:buildWith JDK 17+ and Gradle 8.10+, publish the modules to your local Maven repository.
gradle test
gradle publishToMavenLocalrepositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("dev.embermote:glyph:0.1.0")
}Kotlin/JVM tests pass. Android device validation, Swift, and native Core ML/LiteRT adapters are not available.
import { createModel } from '@embermote/glyph';
import { shapeFeatures } from '@embermote/core';
const model = createModel();
// One continuous square stroke.
const input = shapeFeatures([
[0, 0], [100, 0], [100, 100], [0, 100], [0, 0],
]);
const result = model.predict(input);
console.log(result.label);
// Scores are not calibrated confidence.0330b3fd31a02270d85143dee2b08831080bc874ec9bcc9116f4ca2e0e452838No. Glyph accepts stroke coordinates and recognizes only four shape classes. It does not accept image pixels, detect objects, or perform general computer vision.
Inference runs locally. The website and artifact download make ordinary network requests, but the demos do not upload your input. Bundled SDK inference does not need an inference server.
Glyph stores a compact statistical representation for a narrow task. Its 12.4 KB artifact is not equivalent to a neural model of a different size, and the file size is not its total runtime memory.
This is a research baseline. Independent evaluation, task-specific acceptance criteria, real-device measurements, and release packaging remain necessary before production use.
Inspect the pieces behind this model.