Logo di Classifying Piece Sides For Border First

Classifying Piece Sides For Border First

Organizzazione
runtime-si
classifying-piece-sides-for-border-first

Types a jigsaw piece's four sides flat / tab / blank from a top-down mask and calls it a corner, edge or interior piece - the side lines are found as the direction (1 degree steps) whose projections pile the outline's points into the sharpest peak near each extreme (straight shoulders and flat sides), then each side's middle stretch is a tab where it reaches past its line by 12 % of the side, a blank where it falls behind it, flat otherwise. Returns the outward direction of each flat side (where the board's edge must lie), sides near the threshold as uncertain, and, for many pieces, the ids sorted into corners, edges and interiors for a border-first build. Use when sorting loose pieces for a frame-first strategy, or to orient a border piece before placing it, from wrist-camera masks of pieces lying flat; CPU only, about 8 ms a piece.

Panoramica

Pubblicato daruntime-si
RepositoryRoboSkillHub
Nome della skillclassifying-piece-sides-for-border-first
Stelle
242
Fork
27
File inclusi
2
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da runtime-si su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Classifying Piece Sides For Border First in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/runtime-si/RoboSkillHub/tree/main/skills/classifying-piece-sides-for-border-first
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/runtime-si/RoboSkillHub.git /tmp/RoboSkillHub
mkdir -p .claude/skills
cp -r /tmp/RoboSkillHub/skills/classifying-piece-sides-for-border-first .claude/skills/classifying-piece-sides-for-border-first
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Classifying Piece Sides For Border First in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Classifying Piece Sides For Border First non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Classifying Piece Sides For Border First non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

classifying-piece-sides-for-border-first

A border-first build needs the corner and edge pieces out of the pile first, and needs to know which way each one's straight side faces. A piece's shape tells both: a flat side is a straight line from corner to corner; a tab bulges past that line, a blank cuts behind it.

How

  1. The mask's largest component (closed by 3 px) is outlined and resampled to 480 points by arc length.
  2. Side lines. For each direction over a quarter turn (1 degree steps) the outline is projected on the direction and its normal. A straight shoulder or flat side piles its points into one or two histogram bins (1.5 % of the extent); knobs spread theirs. In the outer half toward each end the densest pair of adjacent bins is that side's line. The direction with the highest sum of the four peaks wins. (A first version took the minimum-area rectangle of the mask opened by a knob-sized disk: a piece with two deep blanks split in two, and knob roots pushed the rectangle out - 194 / 300 side sequences right on the classic cut, against 299 / 300 now.)
  3. Typing. Each outline point goes to the side whose line is nearest in the rectangle's normalised frame. In the middle 70 % of a side, the largest signed distance past (+) or behind (-) the line, over the side's length, decides: over 0.12 tab, under -0.12 blank, else flat. Within 0.35 x 0.12 of the threshold the side is uncertain.
  4. Two flat sides: corner; one: edge; none: interior; more: unknown (uncertain). flat_normals_deg are the outward normals of the flat sides (image degrees, counter-clockwise from +x with y up).

Inputs

  • piece_mask: one top-down mask (uint8 or bool), the whole piece, nothing else; or pieces: [{"id", "mask"}, ...].
  • max_uncertain (0): uncertain sides tolerated before a piece is uncertain.

Outputs

piece_class, side_types (counter-clockwise from the body's +u side), side_normals_deg, flat_normals_deg, side_deviations, uncertain_sides, body_angle_deg; for a list, pieces (per piece the same), corners, edges, interiors, uncertain (ids), detail.

Measured

tests/bundles/_classify_sides_eval.py.

Generated pieces (every piece of three 10 x 10 cuts, mask at 64 px a cell, turned at random, outline jittered up to 1 px):

cutclass rightsides rightwhole sequence right
classic300 / 3001199 / 1200299 / 300
random-cut270 / 300 (13 no body found)1040 / 1148191 / 287

The random-cut generator's deep, angled blanks are harder than real cuts; its misses are mostly edge pieces read as interior (16).

Real piece photos. PuzzleMap (https://huggingface.co/datasets/pablo-moreira/puzzle-map, CC-BY-4.0, not redistributed): 654 single-piece photos with per-side labels, sampled to 154 corner, 250 edge and 250 interior pieces. No learned segmenter was used: the mask is GrabCut inside the annotated box. Many photos have fingers over the outline or a strong shadow beside the piece. Side sequences are compared up to a quarter turn.

  • Class: 449 / 654 right (69 %). Pieces with no uncertain side: 387 / 482 right (80 %). 40 masks gave no square body.

  • Sides: 2135 / 2456 right; whole sequence 369 / 614.

  • By photo set: the 120-piece Avengers set, 212 / 262 (81 %); 195 / 225 (87 %) with no uncertain side. The "camera" set (hand-held, cluttered), 36 / 100.

  • Confusion:

    true \ predictedcorneredgeinteriorunknown / error
    corner (154)103251016
    edge (250)401692318
    interior (250)84417721

    In a sample of 12 failures, most masks had a shadow or a finger merged into them, filling a blank (it then reads flat).

  • Time: median 8 ms a piece.

Orientation for a slot

Given expected_sides (the slot's south, east, north and west as the piece must show them), yaw_deg is the turn at which the piece's sides read that way, sides_agree how many do, and orientations_tied how many turns agree as well. Under 4 / 4, or tied, the route is mismatch. In the first end-to-end chain in the twin (docs/jigsaw-e2e), taking the best of 3 / 4 put a piece 180 degrees off: one blank had been read as a tab.

Limits

  • The mask decides. On masks of generated pieces it is near perfect; on GrabCut masks of photos it is 69-81 %. A wrist camera over pieces lying flat on a plain mat, with a learned segmenter (sam3), should sit near the better end; that is not measured here.
  • Shadows and fingers merged into a blank make it look flat: an interior piece reads as an edge. Light from above, and take the mask from depth where the piece stands 2 mm proud of the mat.
  • Square-ish bodies only (aspect up to 1.6); a piece cut from an irregular grid or a whimsy cut is out of scope.
  • An edge piece misread as interior is only found late (it never joins the frame); one misread as a corner is placed wrongly and found by backtracking-a-wrong-placement.

The constants, and why

CONTOUR_POINTS 480, ANGLE_STEP_DEG 1, BIN_FRACTION 0.015, MAX_ASPECT 1.6, MIDDLE 0.7, KNOB_FRACTION 0.12 (knobs reach 0.20-0.30 of a side, a flat side's wobble under 0.05), UNCERTAIN 0.35, MIN_AREA_PX 400.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Classifying Piece Sides For Border First?

Types a jigsaw piece's four sides flat / tab / blank from a top-down mask and calls it a corner, edge or interior piece - the side lines are found as the direction (1 degree steps) whose projections pile the outline's points into the sharpest peak near each extreme (straight shoulders and flat sides), then each side's middle stretch is a tab where it reaches past its line by 12 % of the side, a blank where it falls behind it, flat otherwise. Returns the outward direction of each flat side (where the board's edge must lie), sides near the threshold as uncertain, and, for many pieces, the ids...

Perché usare Classifying Piece Sides For Border First su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Classifying Piece Sides For Border First è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Classifying Piece Sides For Border First in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/runtime-si/RoboSkillHub/tree/main/skills/classifying-piece-sides-for-border-first. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Classifying Piece Sides For Border First?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Classifying Piece Sides For Border First?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Classifying Piece Sides For Border First: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Classifying Piece Sides For Border First è gratuita?

Sì. È pubblicata su GitHub da runtime-si con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇