From PDF to Interactive Pattern: Pattern-Converter Interim Report
Listen to this post11 min
Created by AI from the text of this post and read by a synthetic voice; not a word-for-word version, and it may contain errors.
Loading…
Created by AI from the text of this post and read by a synthetic voice; not a word-for-word version, and it may contain errors.Position and speed stay in this browser and are sent nowhere.
The recording could not be played. Open the audio file
Short version of the development report of 21 September 2026, reporting period 10 to 21 September. All numbers come from the project's measurement logs. The report contains no content from the original patterns and no names; source documents are referred to only by neutral codes.
Goal and Guiding Principle
The Pattern-Converter translates knitting and crochet patterns that exist as PDFs into interactive e-patterns: instructions with size selection, automatically counted repeats, a progress display, and a tie-back of every working step to the place in the original it came from. It is not meant to silently repair the original. Every deviation, every uncertainty and every unresolved remainder stays visible.
The load-bearing architectural decision: a locally operated language model reads the text extracted from the PDF and proposes a breakdown into steps, repeats, size branches and material information. A small, fully deterministic verification core strictly checks this proposal. Every claim needs a source reference, every repeat must be finite, every named size must be worked out in full. If the proposal fails the check, there is no product, only a fixed, explanatory error code. A structural check that passes proves no fidelity of meaning, and a plausible rendering proves no real material form; this distinction runs through everything that follows.
The Collection
The basis is 63 archives with 182 PDF documents and 86 images. 63 of the PDFs are single-page supplementary sheets with no pattern content; the remaining 119 documents, with a combined 2,370 pages, are the patterns, 16 of them pure scans with no recognisable text. All come from the same author. That remains the most important limitation: every measured success rate applies to this one style, this layout and this language, not to knitting patterns in general.
From the start, the collection was split into a development set of 93 pattern documents and a withheld holdout set of 26 documents that were never read, never cited and never used for tests during the entire development.
What a Run Produces
The first step reads the PDF file, computes its checksum and extracts all text words with their coordinates, as well as all non-textual areas: images, frames, lines, curves. The original is never changed. Each of these building blocks is an addressable source unit, and in the end every unit carries exactly one of three answers: used (it stands behind a working step), context (it recognisably does not belong to the instructions, for example a page logo), or unresolved. A package in which no unit remained unresolved is called complete; as soon as one is open, it is called a partial conversion. Both are visible in the result.
The result is a single, versioned JSON file that is checked twice: once when it is created, and a second time, independently, when opened in the browser. A small reader that runs without internet access shows size selection, step by step with a repeat counter, progress stored locally on the device, and for each step the original page with the text location highlighted. Everything runs locally. Original texts and model responses never leave the private data folder; every output on the command line consists exclusively of fixed diagnostic codes and counts.
For scanned pages with no text layer, the text recognition already present in the operating system is used, without additional installation and without a cloud connection, only for pages with at most two natively readable words. Recognised lines are never corrected automatically.
What the Measurements Showed
The first measurement across the development set on 18 September was sobering: only 10 of 23 patterns checked became a candidate, none with six or more pages. Troubleshooting showed that the main reason lay not in the language model but in a geometric rounding error: in 36 of 98 documents, a box derived from the PDF protruded by up to 0.1 point beyond the page edge and triggered the rule "no box outside the page". With this and eight further small, individually documented fixes, the reach rose to 22 of 23 on the same day. This pattern repeated itself: almost every cause initially suspected to be a model error turned out in the end to be a geometric detail, a phrasing in the prompt, or a limit of the infrastructure.
After all runs were complete, 87 of 93 pattern documents in the development set became a candidate: 70 of 73 with a native text layer and 17 of 20 scans. The three remaining exceptions are named: two extreme documents for block-wise interpretation and one image tutorial whose pattern exists exclusively in images.
A second measurement on 20 and 21 September, on the code state further developed since then and deliberately carried out in a single pass without touching up, gave 81 of 93: 65 of 73 patterns and 16 of 20 scans. The lower number is not a regression but a stricter methodology; the first measurement reached its result only after rounds of fixes during the run. Both figures stand side by side, because a single success rate would obscure their different meaning.
The check on the 26 never-seen documents gave 23 of 26 candidates. The threshold of 20 was fixed before the run, together with the reading of the weaker cases. What is confirmed by this is the reach onto unseen designs by the same author, nothing more.
The automated test suite grew over the reporting period from 223 to 297 passing tests, because practically every fix was backed by tests written specifically for it.
Images: Classify First, Never Translate
A collection measurement on 13 September produced the figure that shaped the further development: of 25,316 non-textual regions in the collection, not a single one was resolved. Every page carried at least one unresolved region. A complete package was therefore unreachable for any single real pattern.
The decision went against transcribing image content and for three stages. A purely geometric stage with no model recognises hairlines and recurring image boxes such as a header logo as context; across the 93 development documents that was 5,025 lines and 2,283 boxes. A second stage assigns image regions, via a local image model, to one of seven coarse categories, of which only two may be cleared at all, and even these only under five simultaneously met conditions. Everything else remains unresolved. The third stage is sign-off against an artificially generated reference pattern with known ground truth for every region, before anything is applied to real images.
This sign-off turned out mixed. The hard criterion, never to wrongly clear an instruction-bearing image region, was fully met: 0 of 63 reference regions wrongly cleared, all 63 correctly localised. The softer goal, recognising at least 70 percent of the decorative regions as context, was missed at 54 percent, because the model classified small ornaments as a symbol out of caution. That is the safe direction: when in doubt, a region remains unresolved.
Since 20 September, a working step can also cite an image or table region as its source, when the pattern explicitly calls for it ("work according to diagram A"). So that the model does not cite images just to get rid of annoying unresolved messages, a geometric location binding applies: a citation only counts if the same section also cites real text from the same page. On the reference, the model correctly cited 10 of 10 instruction-bearing regions and wrongly cited no decorative region; in the second measurement across the collection, 63 image units were cited in 20 candidates, without a single wrong clearance.
Cost
The conversion runs entirely over an in-house company model; the limiting resource is computing time. A run takes, depending on document length, 2 to 46 minutes, on average around 10 minutes; the longest successful conversion needed 2,737 seconds for the largest document in the development set. A complete measurement across around 100 documents takes several hours up to more than half a day.
What Holds Today
An author can convert her own PDF pattern locally into an interactive package with a single command and check it in the browser. What explicitly does not work, or is not proven:
- Fidelity of meaning is not proven. Every package carries the attribute "not checked by an expert", and the reader shows it. The semantic-checking tools deliver model judgements, not an expert sign-off; a review by humans with textile expertise has not taken place.
- Real packages are always partial conversions. Symbol charts made up of many small marks remain fundamentally unresolved; the reader can show the original image but cannot translate it.
- One author, one design. A transfer to other authors is not possible with this collection and is not claimed.
- Roughly every tenth document is explicitly rejected, with a fixed error code, never silently.
- Legal questions about image reproduction are unresolved. As soon as a step shows an original image as its source, the reader passes on a section of the original; the rights belong to the author.
Open before a productive deployment: a review of cited image regions and classifier judgements by the operator, clarification of the legal situation, an expert review of the identified semantic deviations, and a first real pattern fully checked in the browser. A refuted hypothesis or an openly stated limit is a valid result in this project; this report names both.