{"id":50873634,"url":"https://github.com/hinanohart/sketchpolicy","last_synced_at":"2026-06-15T07:30:59.675Z","repository":{"id":361197381,"uuid":"1253502986","full_name":"hinanohart/sketchpolicy","owner":"hinanohart","description":"Simulator-free, CPU-only kinematic demonstration multiplier for LeRobotDataset v3.0 (pre-alpha)","archived":false,"fork":false,"pushed_at":"2026-06-10T12:08:43.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T12:22:54.475Z","etag":null,"topics":["apache-2","cpu-only","data-augmentation","imitation-learning","lerobot","qmc","robotics","se3"],"latest_commit_sha":null,"homepage":"https://github.com/hinanohart/sketchpolicy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hinanohart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-29T14:29:04.000Z","updated_at":"2026-06-10T12:08:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hinanohart/sketchpolicy","commit_stats":null,"previous_names":["hinanohart/sketchpolicy"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hinanohart/sketchpolicy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hinanohart%2Fsketchpolicy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hinanohart%2Fsketchpolicy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hinanohart%2Fsketchpolicy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hinanohart%2Fsketchpolicy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hinanohart","download_url":"https://codeload.github.com/hinanohart/sketchpolicy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hinanohart%2Fsketchpolicy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34353189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-2","cpu-only","data-augmentation","imitation-learning","lerobot","qmc","robotics","se3"],"created_at":"2026-06-15T07:30:58.687Z","updated_at":"2026-06-15T07:30:59.663Z","avatar_url":"https://github.com/hinanohart.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sketchpolicy\n\n**Simulator-free, CPU-only kinematic demonstration *multiplier* for `LeRobotDataset` v3.0.**\n\n\u003e ⚠️ **Pre-alpha bootstrap scaffold (v0.1.0a3).** This is a research scaffold,\n\u003e not a production tool. Every write command requires the explicit flag\n\u003e `--i-understand-this-is-a-bootstrap-scaffold`. Read the\n\u003e [Scope \u0026 honest limitations](#scope--honest-limitations) section before using.\n\n`sketchpolicy` takes a *valid* `LeRobotDataset` v3.0 episode whose actions are\nend-effector poses, and produces additional schema-valid episodes by applying\n**deterministic kinematic transforms**:\n\n- **Transforms**: viewpoint / object-pose / planar position / time-warp, sampled with a low-discrepancy Sobol sequence.\n- **Feasibility filter**: variants that leave the reachable shell, dip below the table, exit the workspace box, or enter the base keep-out cylinder are discarded and resampled.\n- **No simulator, no neural network, no GPU.**\n\nIt also ships an *experimental* \"sketch\" adapter that turns a monocular video\nof a **human hand** into an end-effector trajectory using MediaPipe Hands\n(Apache-2.0, CPU, 21 landmarks). \"Film your hand → sketch a trajectory.\"\n\n## Install\n\n```bash\npip install sketchpolicy                # core: numpy / scipy / pyarrow (torch-free)\npip install \"sketchpolicy[replay]\"      # + headless pybullet sanity replay\npip install \"sketchpolicy[ingest]\"      # + experimental hand-video adapter (mediapipe)\npip install \"sketchpolicy[lerobot]\"     # + live-reader cross-check (heavy: pulls torch+CUDA)\n```\n\n## Quickstart\n\n```bash\n# Multiply an EE-action dataset: 1 source episode -\u003e N feasible kinematic variants\nsketchpolicy augment ./my_dataset --out ./my_dataset_x10 --n 10 --seed 0 \\\n    --i-understand-this-is-a-bootstrap-scaffold\n\n# Read-only: render a kinematic replay of one episode (needs [replay])\nsketchpolicy replay ./my_dataset --episode 0\n\n# Environment / dependency report\nsketchpolicy doctor\n\n# Experimental: hand video -\u003e EE trajectory episode (needs [ingest])\nsketchpolicy sketch ./hand_clip.mp4 --out ./sketched \\\n    --i-understand-this-is-a-bootstrap-scaffold\n```\n\n## How it works\n\n1. **Load** — reads a `LeRobotDataset` v3.0 episode into an `EEPlan` (end-effector\n   pose + gripper time series).\n2. **Sample** — a seeded [Sobol quasi-Monte Carlo](https://en.wikipedia.org/wiki/Sobol_sequence)\n   sequence draws transform parameters (rotation offset, translation, time-warp\n   factor) within a configurable `ParamRanges` box.\n3. **Transform** — each draw is applied as a deterministic kinematic transform to\n   every waypoint in the plan.\n4. **Filter** — a feasibility check rejects candidates that violate workspace\n   constraints: reachable-shell radius, table clearance, workspace bounding box,\n   and base keep-out cylinder. Infeasible draws are discarded and the sampler\n   continues until `n` feasible variants are collected.\n5. **Emit** — accepted variants are written as schema-valid `LeRobotDataset` v3.0\n   episodes. An optional pybullet replay and an optional lerobot-dataset reader\n   cross-check can validate the output.\n\nThe full augmentation loop lives in `src/sketchpolicy/augment/pipeline.py`. The\nsame seed always produces bit-identical output (`AugmentResult` is frozen and\ndeterministic end-to-end).\n\n## Architecture\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/architecture.png\" alt=\"sketchpolicy architecture\" width=\"840\"\u003e\n\u003c/div\u003e\n\n## Benchmark results\n\nThe numbers below come from `bench_results/v0.1.0a3.json`, produced by\n`python scripts/measure.py` on the build machine (Linux WSL2, Python 3.12,\nnumpy 2.4 / scipy 1.17 / pyarrow 24). They are **operational** metrics —\nround-trip validity, determinism, the feasibility filter, CPU throughput and a\nreplay smoke test. They are **not** accuracy or policy-success metrics (there is\nno robot ground truth in this benchmark). Re-run `measure.py` to regenerate.\n\n| metric | value |\n| --- | --- |\n| augment round-trip schema-valid | ✓ (recovered actions within 1e-6) |\n| same-seed bit-exact determinism | ✓ |\n| reject-resample discards infeasible | ✓ (3 of 8 draws rejected on the boundary fixture) |\n| MediaPipe Hands CPU throughput | 47.7 fps (480×640, median of 3, synthetic-frame throughput, not detection accuracy) |\n| pybullet replay smoke | ✓ (max IK residual 0.01 m on a reachable clip) |\n\n## Scope \u0026 honest limitations\n\n**What sketchpolicy CLAIMS (and tests):**\n\n- Given a valid EE-action `LeRobotDataset` v3.0 input, it emits **schema-valid**\n  v3.0 output that round-trips through its own torch-free reader against the\n  declared v3.0 schema. With the optional `[lerobot]` extra installed, an\n  advisory test also loads the output with the real `lerobot-dataset` reader.\n- Transforms are **deterministic**: the same `--seed` produces bit-exact output.\n- The feasibility filter **rejects** variants that leave the reachable shell,\n  dip below the table, exit the workspace box, or enter the base keep-out\n  cylinder, and resamples to hit the requested count.\n- It runs on **CPU** with no torch in the core install.\n\n**What sketchpolicy does NOT claim (hard limits):**\n\n- ❌ The feasibility filter is a **kinematic-envelope** check, not a full\n  collision check: it does **not** test robot-mesh self-intersection (there is\n  no robot mesh in the no-IK representation).\n- ❌ It does **not** improve any policy's success rate. It is a data-shaping\n  tool; downstream training quality is out of scope and untested here.\n- ❌ It does **not** recover absolute metric scale or full 6-DoF accuracy from a\n  monocular hand video. The sketch adapter is experimental and relative.\n- ❌ It does **not** do sim-to-real, and it does **not** transform camera video;\n  v0.1 augments the **proprioceptive / action stream only** (EE pose + gripper).\n  Output episodes are action/state-only.\n- ❌ Parallel-jaw gripper only in v0.1 (no dexterous / bimanual).\n\nIt depends on **MediaPipe Hands only** for hand pose. It does **not** use MANO,\nHaMeR, or WiLoR (non-commercial / GPU-ViT — see `NOTICE`).\n\n## License\n\nMIT. See `LICENSE` and `NOTICE`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhinanohart%2Fsketchpolicy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhinanohart%2Fsketchpolicy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhinanohart%2Fsketchpolicy/lists"}