Логотип Classifying Piece Sides For Border First

Classifying Piece Sides For Border First

Организация
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.

Обзор

Издательruntime-si
РепозиторийRoboSkillHub
Название навыкаclassifying-piece-sides-for-border-first
Звёзды
242
Форки
27
Файлы в комплекте
2
ЛицензияApache-2.0
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 2

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — runtime-si. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Classifying Piece Sides For Border First в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/runtime-si/RoboSkillHub/tree/main/skills/classifying-piece-sides-for-border-first
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

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
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Classifying Piece Sides For Border First в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Classifying Piece Sides For Border First, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Classifying Piece Sides For Border First не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

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.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ 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...

Зачем использовать Classifying Piece Sides For Border First в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Classifying Piece Sides For Border First — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Classifying Piece Sides For Border First в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/runtime-si/RoboSkillHub/tree/main/skills/classifying-piece-sides-for-border-first. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Classifying Piece Sides For Border First?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Classifying Piece Sides For Border First?

С любым количеством. В TypingMind вы можете использовать Classifying Piece Sides For Border First с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Classifying Piece Sides For Border First?

Да. Навык опубликован на GitHub по лицензии Apache-2.0. Издатель — runtime-si. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇