--- license: apache-2.0 language: - en pretty_name: Laparoscopic Surgical Video for Robot Learning — Annotated Sample task_categories: - robotics - image-segmentation - video-classification - visual-question-answering - depth-estimation - video-text-to-text size_categories: - 10K", vqa[0]["answer"]) ``` Other subsets: `reasoning`, `next_action`, `action_tokens`, `scene_graphs`, `clip_captions`. Records reference images by path (`frames/clip_XX/.jpg`); fetch them with: ```python from huggingface_hub import snapshot_download snapshot_download(REPO, repo_type="dataset", allow_patterns=["annotated/layer6_robot_learning/frames/*"]) ``` ## What the dataset contains Each layer builds on the previous one, from what is in view to what the instruments do and why. | Layer | Path | Contents | Coverage | |---|---|---|---| | 1 Quality | `annotated/layer1_quality/` | per-frame sharpness, brightness, glare, motion; 683 of 694 s usable | whole video | | 2 Timeline | `annotated/layer2_timeline/` | 12 scene segments, 6 events | whole video | | 3 Captions | `annotated/layer3_clip_captions/` | 70 ten-second clips with English captions (video–text) | whole video | | Keyframes | `annotated/gold_subset/` | 81 frames, 200 instances, COCO format | 81 frames | | Dense tracks | `annotated/dense_tracks/` | instance masks on every frame (PNG, pixel = track id) | 17,370 frames | | 4 Kinematics | `annotated/layer4_tool_kinematics/` | tip, shaft entry, angle, speed, camera motion, camera-compensated motion, relative depth | 17,370 frames | | 5 Actions | `annotated/layer5_actions/` | action segments, task graphs, decision points, tissue masks, timelines, showcase videos | whole video | | 6 Robot learning | `annotated/layer6_robot_learning/` | VLA steps, VQA, reasoning, next-action, action tokens, scene graphs, frames | whole video | ### Example annotation A single action segment from clip 43 (peeling adherent material): ```json {"track_id": 102, "start_frame": 10813, "end_frame": 10870, "verb": "peel", "target": "pale adherent material [202] off the pink surface [201]", "jaw_state": "closed", "energy_visible": false, "instruction": "Keep pulling to the left so the material comes off the surface."} ``` And the action token for one 0.2 s step of an instrument: `` — tip motion with camera motion removed, depth change, rotation, jaw command, energy. ## How it was built 1. **Instrument segmentation** — AI-drafted keyframe polygons refined with **Meta SAM 3.1**, then propagated through every 10 s clip (text prompt `"metal tool"` plus keyframe clicks). 2. **Kinematics** — tool tip and shaft from each mask; laparoscope motion from background optical flow (RANSAC similarity); relative depth from **Depth Anything V2 Small**. 3. **Actions and reasoning** — every clip labelled from contact sheets (0.2–0.4 s sampling) with a fixed verb vocabulary, symbolic pre/effects and decision points; validated automatically for vocabulary, frame ranges and overlaps. 4. **Target tissue** — SAM 3.1 tracks from clicks placed just ahead of the acting instrument's tip; per-frame quality rules flag masks that drift onto instruments or spread over the field. 5. **Exports** — scene graphs, tokens and VLA / VQA / reasoning / next-action records generated from the layers above. Internal consistency: steps labelled `position`, `hold` and `grasp` move at a median 54–95 px/s; `transport`, `probe`, `counter_traction` and `peel` at 190–325 px/s — hand-written labels and independently measured motion agree. All layers were reviewed and approved by the contributing physician on 17 November 2026 ([`CLINICAL_REVIEW.json`](annotated/CLINICAL_REVIEW.json)); the pipeline's own `needs_review`, reliability and status fields remain available as filters. Full methods: [`annotated/DATACARD.md`](annotated/DATACARD.md). ## How it relates to other surgical datasets Public surgical datasets usually provide one or two label types over many cases. This sample shows every layer at once on a single case, in training-ready formats. | Dataset | Content | Labels | |---|---|---| | Cholec80 | 80 laparoscopic cholecystectomy videos | surgical phase, tool presence | | CholecT50 | 50 laparoscopic cholecystectomy videos | instrument–verb–target action triplets | | CholecSeg8k | 8,080 frames from Cholec80 | semantic segmentation | | EndoVis robotic instrument segmentation (2017/2018) | da Vinci robotic surgery frames | instrument masks | | JIGSAWS | benchtop da Vinci tasks (suturing, knot tying, needle passing) | robot kinematics, gestures, skill scores | | **This dataset** | 1 laparoscopic recording, every frame | instance masks, 2.5D tool motion, camera motion, depth, action segments, task graphs, reasoning, scene graphs, VLA / VQA exports | ## FAQ **What is this dataset for?** Training and evaluating models that understand surgical video at the level a robot needs: where instruments are, how they move, what action they perform on which tissue, and what should happen next. It suits vision-language-action (VLA) pre-training, surgical VQA, action recognition, video–language models and surgical world models. **Can it be used to train a model that controls a surgical robot?** It provides the perception, action-semantics and planning layers of that stack. Policies that output robot commands additionally need synchronised robot kinematics; [`ROBOT_LEARNING_DATA_SPEC.md`](annotated/ROBOT_LEARNING_DATA_SPEC.md) describes the full data stack and how video archives and robot demonstrations fit together. **How were the labels created?** With Meta SAM 3.1 for segmentation and tissue tracking, Depth Anything V2 for depth, optical flow for camera motion, and an AI annotator for actions, task graphs and reasoning. Every step is reproducible from `annotated/scripts/`. All layers were then reviewed and approved by the contributing physician (17 November 2026). **What kind of surgery is shown?** Laparoscopic (minimally invasive) abdominal surgery with hand-held instruments: insulated graspers, a fenestrated grasper, a rod-shaped instrument and gauze; scenes include gauze tamponade, grasping, coagulation, blunt dissection and peeling of adherent material. **Has a clinician reviewed the labels?** Yes. All annotation layers were reviewed and approved by the contributing physician on 17 November 2026, with no corrections requested; the record is in [`CLINICAL_REVIEW.json`](annotated/CLINICAL_REVIEW.json). **Can I use it commercially?** Yes. The video and labels are released under Apache-2.0; the contributor confirmed permission for public distribution and commercial AI training. **Is more data available?** Yes. This sample comes from a collection of approximately **50,000 hours of surgical video**; the same pipeline extends across it with physician-reviewed annotation and custom label vocabularies. Contact [aaron@aaronxu.com](mailto:aaron@aaronxu.com). ## Toward surgical robot foundation models [`annotated/ROBOT_LEARNING_DATA_SPEC.md`](annotated/ROBOT_LEARNING_DATA_SPEC.md) sets out the data a model that plans, acts and monitors in surgery needs — from large-scale video pre-training through dense perception and action semantics to synchronised robot demonstrations, corrections and outcomes. ## Scale with us The wider collection (~50,000 hours) supports pilot deliveries with physician-reviewed labels, procedure-specific ontologies and formats matched to your models. Availability, scope and licensing are agreed separately. **Contact:** [aaron@aaronxu.com](mailto:aaron@aaronxu.com) — dataset inquiries, annotated pilots and collaboration. ## Citation ```bibtex @misc{laparoscopic_robot_learning_sample_2026, title = {Laparoscopic Surgical Video for Robot Learning -- Annotated Sample}, author = {hkust-aaron}, year = {2026}, howpublished = {\url{https://huggingface.co/datasets/hkust-aaron/laparoscopic-robotic-vision-sample}}, note = {Instance masks, tool kinematics, action labels, task graphs and VLA/VQA exports for a laparoscopic surgery video} } ``` ## Licence and tools - Video and labels: **Apache-2.0**. - Original recording: `videos/laparoscopic_sample_001.mp4` (also at the repository root under its original file name); training cut: `annotated/video/laparoscopic_sample_001_intracorporeal.mp4` (surgical field only, frame-exact). - Models used: Meta SAM 3.1 (`sam3.1_multiplex.pt`, SAM License) and Depth Anything V2 Small (Apache-2.0). No model weights are included.