شعار Detecting Disturbed Pieces By Snapshot Diff

Detecting Disturbed Pieces By Snapshot Diff

مؤسسة
runtime-si
detecting-disturbed-pieces-by-snapshot-diff

Checks whether anything already placed was knocked since the last verified step - registers a new RGB(-D) snapshot onto the reference taken after that step (ORB + RANSAC homography refined by masked ECC on the static background; the camera may have moved a little), divides out lighting drift, maps colour/SSIM and depth change, and re-finds every known item (jigsaw pieces, placed bricks, standing dominoes - given as masks, pixel polygons, world boxes or grid cells) by a local rigid registration, reporting which moved, by how many mm and degrees, and how much their depth changed; changes no item explains become occluders (a hand or the arm, masked from its pose) or unexpected objects. Routes unchanged, disturbed, unexpected_object, occluded or unregistrable. Use when a place, press or push has just happened near items already placed and the next step will build on them; camera-only, no motion.

نظرة عامة

الناشرruntime-si
المستودعRoboSkillHub
اسم المهارةdetecting-disturbed-pieces-by-snapshot-diff
النجوم
242
التفريعات
27
الملفات المرفقة
3
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 3

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها runtime-si على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Detecting Disturbed Pieces By Snapshot Diff في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/runtime-si/RoboSkillHub/tree/main/skills/detecting-disturbed-pieces-by-snapshot-diff
  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/detecting-disturbed-pieces-by-snapshot-diff .claude/skills/detecting-disturbed-pieces-by-snapshot-diff
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Detecting Disturbed Pieces By Snapshot Diff في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Detecting Disturbed Pieces By Snapshot Diff تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Detecting Disturbed Pieces By Snapshot Diff بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

detecting-disturbed-pieces-by-snapshot-diff

A place or a press touches only one item, but its fingers, the arm or a dragged cable can nudge the ones already down: a jigsaw section slides, a brick next to the pressed one lifts, a domino in the line tips. A before/after comparison of the same camera catches this right after the step that caused it, while the fix is still a small push. Both frames share the camera and (nearly) the lighting, so a pixel diff is far more sensitive than re-registering the whole assembly against its plan.

How

  1. Frames. reference (the snapshot after the last verified step) and current (default: a fresh robot.get_observation) are Observations (camera camera_name), CameraFrames or bare RGB arrays. Frames wider than 960 px are worked on shrunk; outputs are in input pixels.
  2. Register the current frame onto the reference on the static background (frame minus the items, the ignore masks and the arm): ORB + RANSAC homography, the homography the two camera poses imply for the support plane (a wrist camera), or identity - whichever correlates best - refined by masked homography ECC (OpenCV findTransformECCWithMask) coarse to fine on locally normalised grey (lighting gradients drop out). A second ECC pass uses only the background within 60 px of the work region and none of the pixels that changed. The result is accepted when the median correlation over 6 x 8 tiles is at least 0.8 (a hand over a third of the view does not sink it, another scene does) and the camera moved at most 8 % of the diagonal.
  3. Change map. Depth (when both frames have it): the warped difference less a drift plane fitted robustly on the background (started from the median), changed where over max(6 mm, 1.2 % of range). Appearance: the current colour is divided by a per-channel gain - a robust quadratic in the pixel position (lamp gain, tint, gradient) times a smooth local residual clipped to +-20 % (soft shadows), fitted where depth did not change - then scikit-image's SSIM map (Gaussian 11-tap window, sigma 1.5) and the colour difference mark a pixel changed when 1 - SSIM > 0.35 and colour moved by 14, or colour moved by 40 alone.
  4. Occluders. A changed blob touching the frame edge or the arm's mask (and, with depth, at least 25 mm nearer than the reference) is an occluder: its pixels are hidden, not judged.
  5. Items. Each item's mask (dilated 3 px for its outline, other items cut out) is searched for within 25 mm in the registered current frame: masked NCC over translations (and +-8 / 16 degree turns when the plain template scores under 0.9), the three best peaks refined by Euclidean ECC, the best refined match winning after a small penalty for distance and for landing on another item's footprint (two identical dominoes 20 mm apart). The warp's translation and turn are mapped onto the plane through the item's own height (from depth, its world box, or plane_z with the camera pose): shift_mm, translation_world, rotation_deg (counter-clockwise seen from the camera, i.e. about world +z for a camera looking down), plus the median depth_change_mm over the item. Hidden pixels read as unchanged so they cannot pull the search.
  6. Verdict per item. occluded if under 60 % visible. moved if it translated at least max(min_shift_mm 1 mm, 0.6 px at its scale), or turned at least 2 degrees and 0.8 px at its rim, or its depth changed 5 mm - but a translation or turn counts only if the template has texture in every direction (mean squared gradient along the weakest at least 2) and the move stands out of the noise (Gauss-Newton information p'J'Jp / 2 sigma^2 >= 100, sigma the frames' grey noise). lost if its best match correlates under 0.55 and over 25 % of it changed (or its depth changed): toppled, flipped, removed or pushed past the search radius.
  7. Blobs. Changed pixels inside region that neither an item's old nor its new footprint explains, at least 80 mm^2 (or 30 px without a scale), are unexpected: area, centroid, world position, kind (appeared - nearer, vacated - farther, appearance - no depth), and the grid cell for a pixel grid.

Inputs

  • reference: the snapshot after the last verified step (Observation, CameraFrame or RGB array). Depth, intrinsics and pose are optional but give millimetres and world vectors.
  • items: [{"id", "mask" | "polygon_px" | "box" | "cell", "expected"?}] in the reference frame. mask (the reference's size, e.g. from sam3 or the planner's placed footprint), polygon_px, box (a world OrientedBoundingBox: needs the reference camera's intrinsics and pose), or cell [col, row] of grid.
  • grid: {"cols", "rows", "corners_px"} (the board's four corners in the reference image, top-left first, clockwise) or {"origin": Se3Pose of the corner of cell (0, 0), x along columns, y along rows, z up; "cols", "rows", "cell_size": m or [w, h], "item_height": m}.
  • region: where an unexpected object counts - a mask, {"polygon_px"} or a world box. Default: the grid, else the items' hull widened by 24 px, else the whole frame. Pass the work area: a person moving in the background is outside it.
  • ignore_mask (current frame) / reference_ignore_mask: left out entirely (the slot just filled, the tool, a cable you expect to move). expected_ids (or "expected": true on an item): measured but not counted
    • the item the step itself placed.
  • mask_arms (true) masks each arm in an Observation from its ee_pose: balls of 5 cm radius from 3 cm past the tool centre back 15 cm along the approach axis (local z), and on to arm_base_positions[i] (world) when given.
  • plane_z (world height of the support) for RGB-only frames with a pose; mm_per_px for frames with neither depth nor pose (shifts are in px only otherwise).
  • Thresholds: search_radius_mm (25), min_shift_mm (1.0), min_shift_px (1, no scale), min_rotation_deg (2), min_depth_change_m (0.005), min_blob_mm2 (80), min_blob_px (30), max_camera_shift_fraction (0.08), min_rho (0.8).

Outputs

route; items (per item: status unchanged / moved / lost / occluded, expected, shift_mm, translation_px, translation_world, rotation_deg, depth_change_mm, changed_fraction, visible_fraction, match, significance, texture, centroid_px); disturbed and occluded (ids); unexpected and occluders (blobs); n_disturbed, n_unexpected, max_shift_mm; camera_shift_px and registration (method, rho, ORB inliers, homography reference px to current px); changed_fraction of the region; detail. Hand disturbed to a re-localisation or nudge-back step (the translation and turn are the correction to undo).

Measured

All CPU, no GPU and no simulator (camera-only skill). 0.2-0.5 s per call at 640 x 480 with 8-30 items on one core-set of a 20-core machine.

Synthetic boards (tests/bundles/_snapshot_diff_eval.py --trials 20 --first-seed 1000; thresholds were tuned on seeds 1-6, these are fresh seeds). Ray-cast RGB-D renders, 3 x 3 supersampled, of jigsaw pieces (25 mm, a partial assembly of 15), 2x4 / 2x2 bricks on a baseplate (8) or standing dominoes in a line (8, 20 mm apart), seen by the overhead camera (station K, 1 m, 31 degrees tilt: 0.46 px per mm) or a wrist camera (25 cm straight down: 1.6 px per mm). Every current frame gets its own lighting drift (gain 0.85-1.15, tint +-4 %, gradient +-15 %, a soft shadow half the time) and an unknown camera bump (0-0.3 degrees, 0-2 mm); the wrist camera reports a pose off by up to 1 mm / 0.15 degrees. 20 boards per family and camera; one random item disturbed per pair; items given as reference masks.

family / camerano-change false alarmsshift 1 / 2 / 3 / 5 / 7 / 10 mm detectedmedian shift errorturn 2 / 5 / 10 / 15 deg detected
jigsaw / overhead0/202 / 20 / 20 / 20 / 20 / 20 of 200.10-0.28 mm0 / 1 / 16 / 20
jigsaw / wrist0/2010 / 20 / 20 / 20 / 20 / 200.05-0.08 mm5 / 20 / 20 / 20
lego / overhead0/202 / 20 / 20 / 20 / 20 / 200.21-0.46 mm0 / 0 / 15 / 19
lego / wrist0/2012 / 20 / 20 / 20 / 20 / 200.05-0.11 mm1 / 20 / 20 / 20
domino / overhead0/201 / 20 / 20 / 20 / 20 / 200.14-0.37 mm0 / 0 / 0 / 20 (angle off by 9 deg)
domino / wrist0/207 / 20 / 20 / 20 / 20 / 200.07-0.35 mm0 / 20 / 20 / 20
  • Unmoved items read a median 0.09-0.14 px (0.2-0.34 mm) overhead and 0.05-0.23 px at the wrist; 99th percentile 0.32-0.57 px / 0.19-0.83 px.
  • Other items wrongly flagged in the 200 change pairs per family and camera: jigsaw overhead 36+4, jigsaw wrist 26, domino wrist 12, domino overhead 9, lego 0-1 - almost all the moved item's direct neighbours (a slid jigsaw piece overlaps its neighbour's footprint; a domino pushed against the next).
  • Removed items: 120/120 disturbed (target lost or moved); toppled dominoes: 40/40.
  • An object (15 x 15 x 10 mm) set down at least 12 mm clear of the items: unexpected_object 119/120 (one domino-overhead case hidden behind the tall dominoes).
  • A hand (forearm box 8-15 cm above the board, from outside the view): never unexpected_object; overhead 59 of 60 occluded or unchanged, 1 disturbed; wrist 20 of 60 unregistrable (the hand fills most of a 25 cm view), the rest occluded / unchanged.
  • The robot's arm hovering 9 cm over the board, masked from its ee_pose and base: 60/60 occluded, no item flagged.

Station frames (overhead Orbbec, RGB only, 5 sessions x 11 frames of g_sota_frames_*, the scene static; not committed). Items: a 13 x 7 world grid of 50 mm cells on the table (grid.origin, plane_z), region the work area.

  • With no items (items empty, region only), 20 consecutive pairs: all unchanged, no changed pixel left in the region.
  • 55 no-change pairs (10 consecutive + first-to-last per session): 54 unchanged, 1 disturbed (a cell of white tablecloth read 2.7 mm / 8 degrees). Background correlation 0.994-0.999; camera shift 0.02-0.3 px. Before the texture and significance gates 14 of 55 were false alarms.
  • Semi-synthetic: six 25 mm textured pieces composited on the table plane of 25 real frame pairs (real sensor noise, real background), one moved per pair: no-change 0/25 false alarms; shifts 1 / 2 / 3 / 5 / 7 / 10 mm detected 0 / 24 / 25 / 25 / 25 / 25 of 25 (median error 0.07-0.15 mm); turns 5 / 10 / 15 degrees 0 / 17 / 22 of 25; no other piece flagged.
  • Real change pairs: a sheet laid on the table and objects moved between two sessions (RGB) -> disturbed, the sheet's cells and 15 occluder blobs; the threading setup at 11:44 against 14:21 with depth (cable re-routed, posts moved, very different window light) -> disturbed (24 cells along the cable and the light streaks) plus 2 vacated blobs; the 11:44 frame against itself -> unchanged.

Limits

  • The overhead camera is coarse. At 1 m the Orbbec gives 0.46 px per mm: a 1 mm bump is under half a pixel and is not reported (by design: 0.6 px is the noise floor), a 25 mm piece is 11 px and must turn about 8 degrees to count. Use the wrist camera (2 px per mm at 25 cm) to check fine seating.
  • Standing dominoes seen obliquely from 1 m are 4 px wide: a push is caught, but a turn is not, and a domino pushed against its neighbour can be matched to the neighbour's place (shift read 20 mm instead of 10) and the neighbour flagged too.
  • Shadows and big uniform changes. A soft shadow (up to +-20 % local gain) is absorbed; a deeper one, or the arm's shadow, becomes changed pixels - take both snapshots from the same arm park pose. Without depth a flat hand or sheet over a flat table is only seen by its colour.
  • Textureless items (white cloth, plain wood across the grain, a white domino face without its outline) cannot have their move measured; only the change map, depth and match judge them.
  • Parallax. The registration is a plane homography: a camera that moved centimetres (not millimetres) sees tall items shift against the table. Keep the camera fixed or re-take the reference.
  • A wrist view mostly covered by a hand is unregistrable, not occluded.
  • No simulator check (camera-only skill); validated on synthetic renders and recorded station frames (see Measured). A live check on the robot is pending.

The constants, and why

Each constant in scripts/diff_snapshots.py carries its source and measurement. The decisive ones: MIN_RHO 0.8 (station pairs of one scene 0.993-0.999, synthetic 0.90-0.995, hand-covered wrist views 0.05-0.78); HIGHPASS_SIGMA 8 / HIGHPASS_EPS 10 (lighting drift moved the registration 5 px without it); GAIN_LOCAL 0.2; T_DSSIM 0.35 / T_COLOUR_MIN 14 / T_COLOUR 40; DEPTH_CHANGE_M 6 mm + 1.2 %; MIN_SHIFT_MM 1.0 and MIN_SHIFT_NOISE_PX 0.6 (unmoved items read a median 0.1 px, 99th percentile 0.35-0.47 px overhead); MIN_ROTATION_ARC_PX 0.8 (11 px pieces read +-5 degrees unchanged); MIN_TEXTURE 2 and MIN_SIGNIFICANCE 100 (station table cells read up to 28 mm on a white tablecloth and 2.4 mm across wood grain without them); DISTANCE_PENALTY 0.08 and OVERLAP_PENALTY 0.15 (identical neighbours); OCCLUDER_NEARER_M 25 mm.

Method

The candidate (jigsaw survey, "3 disturbances") was a masked SSIM diff after ECC alignment, mapped to grid cells. That is kept - the SSIM map is scikit-image's structural_similarity(gaussian_weights=True, full=True) adapted to OpenCV filters (BSD-3-Clause, header and LICENSE.scikit-image), and alignment is OpenCV's ECC (called, not copied) - and generalised: depth change, lighting normalisation, occluders and the arm mask, and a per-item local registration that says how far each item moved instead of only which cells changed.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Detecting Disturbed Pieces By Snapshot Diff؟

Checks whether anything already placed was knocked since the last verified step - registers a new RGB(-D) snapshot onto the reference taken after that step (ORB + RANSAC homography refined by masked ECC on the static background; the camera may have moved a little), divides out lighting drift, maps colour/SSIM and depth change, and re-finds every known item (jigsaw pieces, placed bricks, standing dominoes - given as masks, pixel polygons, world boxes or grid cells) by a local rigid registration, reporting which moved, by how many mm and degrees, and how much their depth changed; changes no i...

لماذا تستخدم Detecting Disturbed Pieces By Snapshot Diff على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Detecting Disturbed Pieces By Snapshot Diff عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Detecting Disturbed Pieces By Snapshot Diff في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/runtime-si/RoboSkillHub/tree/main/skills/detecting-disturbed-pieces-by-snapshot-diff. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Detecting Disturbed Pieces By Snapshot Diff؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Detecting Disturbed Pieces By Snapshot Diff؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Detecting Disturbed Pieces By Snapshot Diff معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Detecting Disturbed Pieces By Snapshot Diff مجانية؟

نعم. نشرها runtime-si على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇