Decompose: Implement real auto-digitize engine — Phase 2: Region Classification #7

Closed
opened 2026-06-22 15:28:14 +00:00 by Mark · 1 comment
Owner

⚠️ Re-scoped — blocked on #11

This work was originally framed as "implement from scratch." After auditing the
existing ~/Projects/easystitch/ project (a complete Python embroidery CAM with
5-stage pipeline, satin/fill/running generation, ΔE color matching, and PES/DST/
EXP/JEF output), the right shape is call the EasyStitch service rather than
re-implement the algorithms.

Blocked on #11 ("Stand up EasyStitch as an HTTP service for ThreadCraft").
Until that service exists, this work has no backend to call.

Donor code in EasyStitch (do not port — call it):

  • ~/Projects/easystitch/src/embroidery_converter/classifier.py
  • ~/Projects/easystitch/src/svg_annotation/element_classifier.py

Donor note

EasyStitch's classifier operates on SVG semantic metadata
(element class, stroke/fill attributes), not on raster pixel data.
ThreadCraft's fabric is vector primitives on a Fabric.js canvas, so
the same shape of rule applies: a TypeScript port of the rule set
is the right approach. Do not call the EasyStitch service for this —
classification runs over canvas state and must be synchronous so
the Editor's right-panel can preview changes live.

Port the heuristics directly. The EasyStitch file is the spec; the
tests there (tests/test_main.py, the test files in data/ with
expected auto_classification.dst outputs) are the acceptance cases.

## ⚠️ Re-scoped — blocked on #11 > This work was originally framed as "implement from scratch." After auditing the > existing `~/Projects/easystitch/` project (a complete Python embroidery CAM with > 5-stage pipeline, satin/fill/running generation, ΔE color matching, and PES/DST/ > EXP/JEF output), the right shape is **call the EasyStitch service** rather than > re-implement the algorithms. > > **Blocked on #11** ("Stand up EasyStitch as an HTTP service for ThreadCraft"). > Until that service exists, this work has no backend to call. > > Donor code in EasyStitch (do not port — call it): - `~/Projects/easystitch/src/embroidery_converter/classifier.py` - `~/Projects/easystitch/src/svg_annotation/element_classifier.py` ## Donor note EasyStitch's classifier operates on **SVG semantic metadata** (element class, stroke/fill attributes), not on raster pixel data. ThreadCraft's fabric is vector primitives on a Fabric.js canvas, so the same shape of rule applies: a TypeScript port of the rule set is the right approach. Do not call the EasyStitch service for this — classification runs over canvas state and must be synchronous so the Editor's right-panel can preview changes live. Port the heuristics directly. The EasyStitch file is the spec; the tests there (`tests/test_main.py`, the test files in `data/` with expected `auto_classification.dst` outputs) are the acceptance cases.
Author
Owner

Blocked on #11 (Stand up EasyStitch as an HTTP service for ThreadCraft).

This work has been re-scoped — see the updated body. The reframe replaces
"implement from scratch" with "call the EasyStitch service and render the
result." #11 must complete first; once the service exposes /v1/digitize and
/v1/export, this work becomes a thin client + canvas rendering job.

cc: #11

**Blocked on #11** (Stand up EasyStitch as an HTTP service for ThreadCraft). This work has been re-scoped — see the updated body. The reframe replaces "implement from scratch" with "call the EasyStitch service and render the result." #11 must complete first; once the service exposes `/v1/digitize` and `/v1/export`, this work becomes a thin client + canvas rendering job. cc: #11
Mark 2026-06-27 08:28:07 +00:00
Sign in to join this conversation.
No description provided.