[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EJZ3E4ZFAS3S6ZQJGFPYFJ":3,"skill-same:01M6EJZ3E4ZFAS3S6ZQJGFPYFJ":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6EJZ3E4ZFAS3S6ZQJGFPYFJ","fiftyone-dataset-import",null,"Universal dataset import for FiftyOne supporting all media types (images, videos, point clouds, 3D scenes), all label formats (COCO, YOLO, VOC, CVAT, KITTI, etc.), and multimodal grouped datasets. Use when users want to import any dataset regardless of format, automatically detect folder structure, handle autonomous driving data with multiple cameras and LiDAR, or create grouped datasets from multimodal data. Requires FiftyOne MCP server.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fadonaivera\u002Ffiftyone-dataset-import\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"fiftyone dataset import","import","dataset","lidar","yolo","types","scenes","structure","folder structure","images","MCP","use","autonomous","3D","Media","data","server","multimodal","create","mcp server","2026-11-10 10:12:30",false,"---\nname: fiftyone-dataset-import\ndescription: Universal dataset import for FiftyOne supporting all media types (images, videos, point clouds, 3D scenes), all label formats (COCO, YOLO, VOC, CVAT, KITTI, etc.), and multimodal grouped datasets. Use when users want to import any dataset regardless of format, automatically detect folder structure, handle autonomous driving data with multiple cameras and LiDAR, or create grouped datasets from multimodal data. Requires FiftyOne MCP server.\n---\n\n# Universal Dataset Import for FiftyOne\n\n## Overview\n\nImport any dataset into FiftyOne regardless of media type, label format, or folder structure. Automatically detects and handles:\n\n- **All media types**: images, videos, point clouds, 3D scenes\n- **All label formats**: COCO, YOLO, VOC, CVAT, KITTI, OpenLABEL, and more\n- **Multimodal groups**: Multiple cameras + LiDAR per scene (autonomous driving, robotics)\n- **Complex folder structures**: Nested directories, scene-based organization\n\n**Use this skill when:**\n- Importing datasets from any source or format\n- Working with autonomous driving data (multiple cameras, LiDAR, radar)\n- Loading multimodal data that needs grouping\n- The user doesn't know or specify the exact format\n- Importing point clouds, 3D scenes, or mixed media types\n\n## Prerequisites\n\n- FiftyOne MCP server installed and running\n- `@voxel51\u002Fio` plugin for importing data\n- `@voxel51\u002Futils` plugin for dataset management\n\n## Key Directives\n\n**ALWAYS follow these rules:**\n\n### 1. Scan folder FIRST\nBefore any import, deeply scan the directory to understand its structure:\n```bash\n# Use bash to explore\nfind \u002Fpath\u002Fto\u002Fdata -type f | head -50\nls -la \u002Fpath\u002Fto\u002Fdata\n```\n\n### 2. Auto-detect everything\nDetect media types, label formats, and grouping patterns automatically. Never ask the user to specify format if it can be inferred.\n\n### 3. Detect multimodal groups\nLook for patterns that indicate grouped data:\n- Scene folders containing multiple media files\n- Filename patterns with common prefixes (e.g., `scene_001_left.jpg`, `scene_001_right.jpg`)\n- Mixed media types that should be grouped (images + point clouds)\n\n### 4. Detect and install required packages\nMany specialized dataset formats require external Python packages. After detecting the format:\n\n1. **Identify required packages** based on the detected format\n2. **Check if packages are installed** using `pip show \u003Cpackage>`\n3. **Search for installation instructions** if needed (use web search or FiftyOne docs)\n4. **Ask user for permission** before installing any packages\n5. **Install required packages** (see installation methods below)\n6. **Verify installation** before proceeding\n\n**Common format-to-package mappings:**\n\n| Dataset Format | Package Name | Install Command |\n|---------------|--------------|-----------------|\n| PandaSet | `pandaset` | `pip install \"git+https:\u002F\u002Fgithub.com\u002Fscaleapi\u002Fpandaset-devkit.git#subdirectory=python\"` |\n| nuScenes | `nuscenes-devkit` | `pip install nuscenes-devkit` |\n| Waymo Open | `waymo-open-dataset-tf` | See Waymo docs (requires TensorFlow) |\n| Argoverse 2 | `av2` | `pip install av2` |\n| KITTI 3D | `pykitti` | `pip install pykitti` |\n| Lyft L5 | `l5kit` | `pip install l5kit` |\n| A2D2 | `a2d2` | See Audi A2D2 docs |\n\n**Additional packages for 3D processing:**\n\n| Purpose | Package Name | Install Command |\n|---------|--------------|-----------------|\n| Point cloud conversion to PCD | `open3d` | `pip install open3d` |\n| Point cloud processing | `pyntcloud` | `pip install pyntcloud` |\n| LAS\u002FLAZ point clouds | `laspy` | `pip install laspy` |\n\n**Installation methods (in order of preference):**\n\n1. **PyPI** - Standard pip install:\n   ```bash\n   pip install \u003Cpackage-name>\n   ```\n\n2. **GitHub URL** - When package is not on PyPI:\n   ```bash\n   # Standard GitHub install\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git\"\n\n   # With subdirectory (for monorepos)\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git#subdirectory=python\"\n\n   # Specific branch or tag\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git@v1.0.0\"\n   ```\n\n3. **Clone and install** - For complex builds:\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git\n   cd \u003Crepo>\n   pip install .\n   ```\n\n**Dynamic package discovery workflow:**\n\nIf the format is not in the table above:\n1. **Search PyPI** for `\u003Cformat-name>`, `\u003Cformat-name>-devkit`, or `\u003Cformat-name>-sdk`\n2. **Search GitHub** for `\u003Cformat-name> devkit` or `\u003Cformat-name> python`\n3. **Search web** for \"FiftyOne import \u003Cformat-name>\" or \"\u003Cformat-name> python tutorial\"\n4. **Check the dataset's official website** for developer tools\u002FSDK\n5. **Present findings to user** with installation options\n\n**After installation:**\n1. **Verify** the package is installed: `pip show \u003Cpackage-name>`\n2. **Test import** in Python: `python -c \"from \u003Cpackage> import ...\"`\n3. **Search for FiftyOne integration** examples or write custom import code\n\n### 5. Confirm before importing\nPresent findings to user and **explicitly ask for confirmation** before creating the dataset.\nAlways end your scan summary with a clear question like:\n- \"Proceed with import?\"\n- \"Should I create the dataset with these settings?\"\n\n**Wait for user response before proceeding.** Do not create the dataset until the user confirms.\n\n### 6. Check for existing datasets\nBefore creating a dataset, check if the proposed name already exists:\n```python\nlist_datasets()\n```\nIf the dataset name exists, ask the user:\n- **Overwrite**: Delete existing and create new\n- **Rename**: Use a different name (suggest alternatives like `dataset-name-v2`)\n- **Abort**: Cancel the import\n\n### 7. Validate after import\nCompare imported sample count with source file count. Report any discrepancies.\n\n### 8. Report errors minimally to user\nKeep error messages simple for the user. Use detailed error info internally to diagnose issues.\n\n## Complete Workflow\n\n### Step 1: Deep Folder Scan\n\nScan the target directory to understand its structure:\n\n```bash\n# Count files by extension\nfind \u002Fpath\u002Fto\u002Fdata -type f | sed 's\u002F.*\\.\u002F\u002F' | sort | uniq -c | sort -rn\n\n# List directory structure (2 levels deep)\nfind \u002Fpath\u002Fto\u002Fdata -maxdepth 2 -type d\n\n# Sample some files\nls -la \u002Fpath\u002Fto\u002Fdata\u002F* | head -20\n\n# IMPORTANT: Scan for ALL annotation\u002Flabel directories\nls -la \u002Fpath\u002Fto\u002Fdata\u002Fannotations\u002F 2>\u002Fdev\u002Fnull || ls -la \u002Fpath\u002Fto\u002Fdata\u002Flabels\u002F 2>\u002Fdev\u002Fnull\n```\n\nBuild an inventory of:\n- Media files by type (images, videos, point clouds, 3D)\n- Label files by format (JSON, XML, TXT, YAML, PKL)\n- Directory structure (flat vs nested vs scene-based)\n- **ALL annotation types present** (cuboids, segmentation, tracking, etc.)\n\n**For 3D\u002FAutonomous Driving datasets, specifically check:**\n```bash\n# List all annotation subdirectories\nfind \u002Fpath\u002Fto\u002Fdata -type d -name \"annotations\" -o -name \"labels\" | xargs -I {} ls -la {}\n\n# Sample an annotation file to understand its structure\npython3 -c \"import pickle, gzip; print(pickle.load(gzip.open('path\u002Fto\u002Fannotation.pkl.gz', 'rb'))[:2])\"\n```\n\n### Step 2: Identify Media Types\n\nClassify files by extension:\n\n| Extensions | Media Type | FiftyOne Type |\n|------------|------------|---------------|\n| `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.webp`, `.tiff` | Image | `image` |\n| `.mp4`, `.avi`, `.mov`, `.mkv`, `.webm` | Video | `video` |\n| `.pcd`, `.ply`, `.las`, `.laz` | Point Cloud | `point-cloud` |\n| `.fo3d`, `.obj`, `.gltf`, `.glb` | 3D Scene | `3d` |\n\n### Step 3: Detect Label Format\n\nIdentify label format from file patterns:\n\n| Pattern | Format | Dataset Type |\n|---------|--------|--------------|\n| `annotations.json` or `instances*.json` with COCO structure | COCO | `COCO` |\n| `*.xml` files with Pascal VOC structure | VOC | `VOC` |\n| `*.txt` per image + `classes.txt` | YOLOv4 | `YOLOv4` |\n| `data.yaml` + `labels\u002F*.txt` | YOLOv5 | `YOLOv5` |\n| `*.txt` per image (KITTI format) | KITTI | `KITTI` |\n| Single `annotations.xml` (CVAT format) | CVAT | `CVAT Image` |\n| `*.json` with OpenLABEL structure | OpenLABEL | `OpenLABEL Image` |\n| Folder-per-class structure | Classification | `Image Classification Directory Tree` |\n| `*.csv` with filepath column | CSV | `CSV` |\n| `*.json` with GeoJSON structure | GeoJSON | `GeoJSON` |\n| `.dcm` DICOM files | DICOM | `DICOM` |\n| `.tiff` with geo metadata | GeoTIFF | `GeoTIFF` |\n\n**Specialized Autonomous Driving Formats (require external packages):**\n\n| Directory Pattern | Format | Required Package |\n|------------------|--------|------------------|\n| `camera\u002F`, `lidar\u002F`, `annotations\u002Fcuboids\u002F` with `.pkl.gz` | PandaSet | `pandaset-devkit` |\n| `samples\u002F`, `sweeps\u002F`, `v1.0-*` folders | nuScenes | `nuscenes-devkit` |\n| `segment-*` with `.tfrecord` files | Waymo Open | `waymo-open-dataset-tf` |\n| `argoverse-tracking\u002F` structure | Argoverse | `argoverse-api` |\n| `training\u002F`, `testing\u002F` with `calib\u002F`, `velodyne\u002F` | KITTI 3D | `pykitti` |\n| `scenes\u002F`, `aerial_map\u002F` | Lyft L5 | `l5kit` |\n\n### Step 4: Detect Required Packages\n\nAfter identifying the format, check if external packages are needed:\n\n```bash\n# Check if package is installed (use the actual package name, not repo name)\npip show pandaset\n\n# If not found, the package needs to be installed\n```\n\n**If packages are required:**\n\n1. **Inform user** what packages are needed and why\n\n2. **Search for installation method** if not in the common mappings table:\n   - Search PyPI first: `pip search \u003Cpackage>` or check pypi.org\n   - Search GitHub for the devkit\u002FSDK repository\n   - Check the dataset's official documentation\n   - Search web: \"\u003Cdataset-name> python install\"\n\n3. **Ask for permission** to install:\n   ```\n   This dataset appears to be in PandaSet format, which requires the `pandaset` package.\n\n   The package is not on PyPI and must be installed from GitHub:\n   pip install \"git+https:\u002F\u002Fgithub.com\u002Fscaleapi\u002Fpandaset-devkit.git#subdirectory=python\"\n\n   Would you like me to:\n   - Install the package (recommended)\n   - Search for alternative import methods\n   - Abort and let you install manually\n   ```\n\n4. **Install using the appropriate method**:\n   ```bash\n   # PyPI (if available)\n   pip install \u003Cpackage-name>\n\n   # GitHub URL (if not on PyPI)\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git#subdirectory=python\"\n\n   # Clone and install (for complex builds)\n   git clone https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git && cd \u003Crepo> && pip install .\n   ```\n\n5. **Verify installation**:\n   ```bash\n   pip show \u003Cpackage-name>\n   ```\n\n6. **Test the import** in Python:\n   ```bash\n   python -c \"from \u003Cpackage> import \u003Cmain_class>; print('OK')\"\n   ```\n\n7. **Search for FiftyOne integration code**:\n   - Search: \"FiftyOne \u003Cformat-name> import example\"\n   - Search: \"\u003Cformat-name> to FiftyOne grouped dataset\"\n   - Check FiftyOne docs for similar dataset types\n   - If no examples exist, build custom import code using the devkit API\n\n### Step 5: Detect Grouping Pattern\n\nDetermine if data should be grouped:\n\n**Pattern A: Scene Folders (Most Common for Multimodal)**\n```\n\u002Fdata\u002F\n├── scene_001\u002F\n│   ├── left.jpg\n│   ├── right.jpg\n│   ├── lidar.pcd\n│   └── labels.json\n├── scene_002\u002F\n│   └── ...\n```\nDetection: Each subfolder = one group, files inside = slices\n\n**Pattern B: Filename Prefix**\n```\n\u002Fdata\u002F\n├── 001_left.jpg\n├── 001_right.jpg\n├── 001_lidar.pcd\n├── 002_left.jpg\n├── 002_right.jpg\n├── 002_lidar.pcd\n```\nDetection: Common prefix = group ID, suffix = slice name\n\n**Pattern C: No Grouping (Flat)**\n```\n\u002Fdata\u002F\n├── image_001.jpg\n├── image_002.jpg\n├── image_003.jpg\n```\nDetection: Single media type, no clear grouping pattern\n\n### Step 6: Present Findings to User\n\nBefore importing, present a clear summary that includes **ALL detected labels**:\n\n```\nScan Results for \u002Fpath\u002Fto\u002Fdata:\n\nMedia Found:\n  - 3,000 images (.jpg, .png)\n  - 1,000 point clouds (.pkl.gz → will convert to .pcd)\n  - 0 videos\n\nGrouping Detected:\n  - Pattern: Scene folders\n  - Groups: 1,000 scenes\n  - Slices: left (image), right (image), front (image), lidar (point-cloud)\n\nALL Labels Detected:\n  ├── cuboids\u002F           (3D bounding boxes, 1,000 files)\n  │   └── Format: pickle, Fields: label, position, dimensions, rotation, track_id\n  ├── semseg\u002F            (Semantic segmentation, 1,000 files)\n  │   └── Format: pickle, point-wise class labels\n  └── instances.json     (2D detections, COCO format)\n      └── Classes: 10 (car, pedestrian, cyclist, ...)\n\nRequired Packages:\n  - ✅ pandaset (installed)\n  - ⚠️ open3d (needed for PCD conversion) → pip install open3d\n\nProposed Configuration:\n  - Dataset name: my-dataset\n  - Type: Grouped (multimodal)\n  - Default slice: front_camera\n  - Labels to import:\n    - detections_3d (from cuboids\u002F)\n    - point_labels (from semseg\u002F)\n    - detections (from instances.json)\n\nProceed with import? (yes\u002Fno)\n```\n\n**IMPORTANT:**\n- List ALL annotation types found during the scan\n- Show the format\u002Fstructure of each label type\n- Indicate which labels will be imported and how\n- Wait for user confirmation before proceeding\n\n### Step 7: Check for Existing Dataset\n\nBefore creating, check if the dataset name already exists:\n\n```python\n# Check existing datasets\nlist_datasets()\n```\n\nIf the proposed dataset name exists in the list:\n1. Inform the user: \"A dataset named 'my-dataset' already exists with X samples.\"\n2. Ask for their preference:\n   - **Overwrite**: Delete existing dataset first\n   - **Rename**: Suggest alternatives (e.g., `my-dataset-v2`, `my-dataset-20240107`)\n   - **Abort**: Cancel the import\n\nIf user chooses to overwrite:\n```python\n# Delete existing dataset\nset_context(dataset_name=\"my-dataset\")\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fdelete_dataset\",\n    params={\"name\": \"my-dataset\"}\n)\n```\n\n### Step 8: Create Dataset\n\n```python\n# Create the dataset\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\n        \"name\": \"my-dataset\",\n        \"persistent\": true\n    }\n)\n\n# Set context\nset_context(dataset_name=\"my-dataset\")\n```\n\n### Step 9A: Import Simple Dataset (No Groups)\n\nFor flat datasets without grouping:\n\n```python\n# Import media only\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"}\n    }\n)\n\n# Import with labels\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"COCO\",\n        \"data_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n```\n\n### Step 9B: Import Grouped Dataset (Multimodal)\n\nFor multimodal data with groups, use Python directly. Guide the user:\n\n```python\nimport fiftyone as fo\n\n# Create dataset\ndataset = fo.Dataset(\"multimodal-dataset\", persistent=True)\n\n# Add group field\ndataset.add_group_field(\"group\", default=\"front\")\n\n# Create samples for each group\nimport os\nfrom pathlib import Path\n\ndata_dir = Path(\"\u002Fpath\u002Fto\u002Fdata\")\nsamples = []\n\nfor scene_dir in sorted(data_dir.iterdir()):\n    if not scene_dir.is_dir():\n        continue\n\n    # Create a group for this scene\n    group = fo.Group()\n\n    # Add each file as a slice\n    for file in scene_dir.iterdir():\n        if file.suffix in ['.jpg', '.png']:\n            # Determine slice name from filename\n            slice_name = file.stem  # e.g., \"left\", \"right\", \"front\"\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(slice_name)\n            ))\n        elif file.suffix == '.pcd':\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(\"lidar\")\n            ))\n        elif file.suffix == '.mp4':\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(\"video\")\n            ))\n\n# Add all samples\ndataset.add_samples(samples)\nprint(f\"Added {len(dataset)} samples in {len(dataset.distinct('group.id'))} groups\")\n```\n\n### Step 9C: Import Specialized Format Dataset (3D\u002FAutonomous Driving)\n\nFor datasets requiring external packages (PandaSet, nuScenes, etc.), use the devkit to load data and convert to FiftyOne format.\n\n**General approach:**\n1. Search FiftyOne documentation or web for the specific import method\n2. Use the devkit to load the raw data\n3. **Convert point clouds to PCD format** (FiftyOne requires `.pcd` files)\n4. **Create `fo.Scene` objects** for 3D visualization with point clouds\n5. Convert to FiftyOne samples with proper grouping\n6. **Import ALL detected labels** (cuboids, segmentation, etc.) found during scan\n\n#### Converting Point Clouds to PCD\n\nMany autonomous driving datasets store LiDAR data in proprietary formats (`.pkl.gz`, `.bin`, `.npy`). Convert to PCD for FiftyOne:\n\n```python\nimport numpy as np\nimport open3d as o3d\nfrom pathlib import Path\n\ndef convert_to_pcd(points, output_path):\n    \"\"\"\n    Convert point cloud array to PCD file.\n\n    Args:\n        points: numpy array of shape (N, 3) or (N, 4) with XYZ or XYZI\n        output_path: path to save .pcd file\n    \"\"\"\n    pcd = o3d.geometry.PointCloud()\n    pcd.points = o3d.utility.Vector3dVector(points[:, :3])\n\n    # If intensity is available, store as colors (grayscale)\n    if points.shape[1] >= 4:\n        intensity = points[:, 3]\n        intensity_normalized = (intensity - intensity.min()) \u002F (intensity.max() - intensity.min() + 1e-8)\n        colors = np.stack([intensity_normalized] * 3, axis=1)\n        pcd.colors = o3d.utility.Vector3dVector(colors)\n\n    o3d.io.write_point_cloud(str(output_path), pcd)\n    return output_path\n```\n\n**Note:** Install open3d if needed: `pip install open3d`\n\n#### Creating fo.Scene for 3D Visualization\n\nFor each LiDAR frame, create an `fo.Scene` that references the PCD file:\n\n```python\nimport fiftyone as fo\n\n# Create a 3D scene for the point cloud\nscene = fo.Scene()\n\n# Add point cloud to the scene\nscene.add_point_cloud(\n    name=\"lidar\",\n    pcd_path=\"\u002Fpath\u002Fto\u002Fframe.pcd\",\n    flag_for_projection=True  # Enable projection to camera views\n)\n\n# Create sample with the scene\nsample = fo.Sample(filepath=\"\u002Fpath\u002Fto\u002Fscene.fo3d\")  # Or use scene directly\nsample[\"scene\"] = scene\n```\n\n#### Importing ALL Labels Detected During Scan\n\nDuring the folder scan (Step 1), identify ALL label types present:\n\n```bash\n# Example: List all annotation directories\u002Ffiles\nls -la \u002Fpath\u002Fto\u002Fdataset\u002Fannotations\u002F\n# Output might show: cuboids\u002F, semseg\u002F, tracking\u002F, instances.json, etc.\n```\n\n**Map detected labels to FiftyOne label types:**\n\n| Annotation Type | FiftyOne Label Type | Field Name |\n|-----------------|---------------------|------------|\n| 3D Cuboids\u002FBounding Boxes | `fo.Detection` with 3D attributes | `detections_3d` |\n| Semantic Segmentation | `fo.Segmentation` | `segmentation` |\n| Instance Segmentation | `fo.Detections` with masks | `instances` |\n| Tracking IDs | Add `track_id` to detections | `tracks` |\n| Classification | `fo.Classification` | `classification` |\n| Keypoints\u002FPose | `fo.Keypoints` | `keypoints` |\n\n**Example: PandaSet Full Import with Labels**\n\n```python\nimport fiftyone as fo\nimport numpy as np\nimport open3d as o3d\nfrom pathlib import Path\nimport gzip\nimport pickle\n\ndata_path = Path(\"\u002Fpath\u002Fto\u002Fpandaset\")\npcd_output_dir = data_path \u002F \"pcd_converted\"\npcd_output_dir.mkdir(exist_ok=True)\n\n# Create dataset with groups\ndataset = fo.Dataset(\"pandaset\", persistent=True)\ndataset.add_group_field(\"group\", default=\"front_camera\")\n\n# Get camera names\ncamera_names = [d.name for d in (data_path \u002F \"camera\").iterdir() if d.is_dir()]\nframe_count = len(list((data_path \u002F \"camera\" \u002F \"front_camera\").glob(\"*.jpg\")))\n\n# Check what labels exist\nlabels_dir = data_path \u002F \"annotations\"\navailable_labels = [d.name for d in labels_dir.iterdir() if d.is_dir()]\nprint(f\"Found label types: {available_labels}\")  # e.g., ['cuboids', 'semseg']\n\nsamples = []\nfor frame_idx in range(frame_count):\n    frame_id = f\"{frame_idx:02d}\"\n    group = fo.Group()\n\n    # === Add camera images ===\n    for cam_name in camera_names:\n        img_path = data_path \u002F \"camera\" \u002F cam_name \u002F f\"{frame_id}.jpg\"\n        if img_path.exists():\n            sample = fo.Sample(filepath=str(img_path))\n            sample[\"group\"] = group.element(cam_name)\n            sample[\"frame_idx\"] = frame_idx\n            samples.append(sample)\n\n    # === Convert and add LiDAR point cloud ===\n    lidar_pkl = data_path \u002F \"lidar\" \u002F f\"{frame_id}.pkl.gz\"\n    if lidar_pkl.exists():\n        # Load pickle\n        with gzip.open(lidar_pkl, 'rb') as f:\n            lidar_data = pickle.load(f)\n\n        # Extract points (adjust based on actual data structure)\n        if isinstance(lidar_data, dict):\n            points = lidar_data.get('points', lidar_data.get('data'))\n        else:\n            points = np.array(lidar_data)\n\n        # Convert to PCD\n        pcd_path = pcd_output_dir \u002F f\"{frame_id}.pcd\"\n        pcd = o3d.geometry.PointCloud()\n        pcd.points = o3d.utility.Vector3dVector(points[:, :3])\n        o3d.io.write_point_cloud(str(pcd_path), pcd)\n\n        # Create 3D sample with scene\n        lidar_sample = fo.Sample(filepath=str(pcd_path))\n        lidar_sample[\"group\"] = group.element(\"lidar\")\n        lidar_sample[\"frame_idx\"] = frame_idx\n\n        # === Load 3D cuboid labels if available ===\n        # IMPORTANT: Store 3D attributes as flat scalar fields, NOT lists\n        # Using lists (e.g., location=[x,y,z]) causes \"Symbol.iterator\" errors in 3D viewer\n        if \"cuboids\" in available_labels:\n            cuboids_pkl = labels_dir \u002F \"cuboids\" \u002F f\"{frame_id}.pkl.gz\"\n            if cuboids_pkl.exists():\n                with gzip.open(cuboids_pkl, 'rb') as f:\n                    cuboids_df = pickle.load(f)  # PandaSet uses pandas DataFrame\n\n                detections = []\n                for _, row in cuboids_df.iterrows():\n                    detection = fo.Detection(\n                        label=row.get(\"label\", \"object\"),\n                        bounding_box=[0, 0, 0.01, 0.01],  # minimal 2D placeholder\n                    )\n                    # Store 3D attributes as FLAT SCALAR fields (not lists!)\n                    detection[\"pos_x\"] = float(row.get(\"position.x\", 0))\n                    detection[\"pos_y\"] = float(row.get(\"position.y\", 0))\n                    detection[\"pos_z\"] = float(row.get(\"position.z\", 0))\n                    detection[\"dim_x\"] = float(row.get(\"dimensions.x\", 1))\n                    detection[\"dim_y\"] = float(row.get(\"dimensions.y\", 1))\n                    detection[\"dim_z\"] = float(row.get(\"dimensions.z\", 1))\n                    detection[\"yaw\"] = float(row.get(\"yaw\", 0))\n                    detection[\"track_id\"] = str(row.get(\"uuid\", \"\"))\n                    detection[\"stationary\"] = bool(row.get(\"stationary\", False))\n                    detections.append(detection)\n\n                lidar_sample[\"ground_truth\"] = fo.Detections(detections=detections)\n\n        # === Load semantic segmentation if available ===\n        if \"semseg\" in available_labels:\n            semseg_pkl = labels_dir \u002F \"semseg\" \u002F f\"{frame_id}.pkl.gz\"\n            if semseg_pkl.exists():\n                with gzip.open(semseg_pkl, 'rb') as f:\n                    semseg_data = pickle.load(f)\n                # Store as custom field (point-wise labels)\n                lidar_sample[\"point_labels\"] = semseg_data.tolist() if hasattr(semseg_data, 'tolist') else semseg_data\n\n        samples.append(lidar_sample)\n\n# Add all samples\ndataset.add_samples(samples)\ndataset.save()\n\nprint(f\"Imported {len(dataset)} groups with {len(dataset.select_group_slices())} total samples\")\nprint(f\"Slices: {dataset.group_slices}\")\nprint(f\"Labels imported: {available_labels}\")\n```\n\n**Dynamic Import Discovery:**\nIf no example exists for the format:\n1. Search: \"FiftyOne \u003Cformat-name> import example\"\n2. Search: \"\u003Cformat-name> devkit python example\"\n3. Read the devkit documentation to understand data structure\n4. Explore the annotation files to understand label format:\n   ```python\n   import pickle, gzip\n   with gzip.open(\"annotations\u002Fcuboids\u002F00.pkl.gz\", \"rb\") as f:\n       data = pickle.load(f)\n   print(type(data), data[0] if isinstance(data, list) else data)\n   ```\n5. Build custom import code based on the devkit API and label structure\n\n### Step 10: Import Additional Labels (Optional)\n\nIf labels weren't imported with the specialized format, add them separately:\n\n```python\n# For COCO labels that reference filepaths\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"LABELS_ONLY\",\n        \"dataset_type\": \"COCO\",\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n```\n\n### Step 11: Validate Import\n\n```python\n# Load and verify\nload_dataset(name=\"my-dataset\")\n\n# Check counts match\ndataset_summary(name=\"my-dataset\")\n```\n\nCompare:\n- Imported samples vs source files\n- Groups created vs expected\n- Labels imported vs annotation count\n\n### Step 12: Launch App and View\n\n```python\nlaunch_app(dataset_name=\"my-dataset\")\n\n# For grouped datasets, view different slices\n# In the App, use the slice selector dropdown\n```\n\n## Supported Dataset Types\n\n### Media Types\n\n| Type | Extensions | Description |\n|------|------------|-------------|\n| `image` | `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.webp`, `.tiff` | Static images |\n| `video` | `.mp4`, `.avi`, `.mov`, `.mkv`, `.webm` | Video files with frames |\n| `point-cloud` | `.pcd`, `.ply`, `.las`, `.laz` | 3D point cloud data |\n| `3d` | `.fo3d`, `.obj`, `.gltf`, `.glb` | 3D scenes and meshes |\n\n### Label Formats\n\n| Format | Dataset Type Value | Label Types | File Pattern |\n|--------|-------------------|-------------|--------------|\n| COCO | `COCO` | detections, segmentations, keypoints | `*.json` |\n| VOC\u002FPascal | `VOC` | detections | `*.xml` per image |\n| KITTI | `KITTI` | detections | `*.txt` per image |\n| YOLOv4 | `YOLOv4` | detections | `*.txt` + `classes.txt` |\n| YOLOv5 | `YOLOv5` | detections | `data.yaml` + `labels\u002F*.txt` |\n| CVAT Image | `CVAT Image` | classifications, detections, polylines, keypoints | Single `*.xml` |\n| CVAT Video | `CVAT Video` | frame labels | XML directory |\n| OpenLABEL Image | `OpenLABEL Image` | all types | `*.json` directory |\n| OpenLABEL Video | `OpenLABEL Video` | all types | `*.json` directory |\n| TF Object Detection | `TF Object Detection` | detections | TFRecords |\n| TF Image Classification | `TF Image Classification` | classification | TFRecords |\n| Image Classification Tree | `Image Classification Directory Tree` | classification | Folder per class |\n| Video Classification Tree | `Video Classification Directory Tree` | classification | Folder per class |\n| Image Segmentation | `Image Segmentation` | segmentation | Mask images |\n| CSV | `CSV` | custom fields | `*.csv` |\n| DICOM | `DICOM` | medical metadata | `.dcm` files |\n| GeoJSON | `GeoJSON` | geolocation | `*.json` |\n| GeoTIFF | `GeoTIFF` | geolocation | `.tiff` with geo |\n| FiftyOne Dataset | `FiftyOne Dataset` | all types | Exported format |\n\n## Common Use Cases\n\n### Use Case 1: Simple Image Dataset with COCO Labels\n\n```python\n# Scan directory\n# Found: 5000 images, annotations.json (COCO format)\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"coco-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"coco-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"COCO\",\n        \"data_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"coco-dataset\")\n```\n\n### Use Case 2: YOLO Dataset\n\n```python\n# Scan directory\n# Found: data.yaml, images\u002F, labels\u002F (YOLOv5 format)\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"yolo-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"yolo-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"YOLOv5\",\n        \"dataset_dir\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fyolo\u002Fdataset\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"yolo-dataset\")\n```\n\n### Use Case 3: Point Cloud Dataset\n\n```python\n# Scan directory\n# Found: 1000 .pcd files, labels\u002F with KITTI format\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"lidar-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"lidar-dataset\")\n\n# Import point clouds\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"GLOB_PATTERN\",\n        \"glob_patt\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fdata\u002F*.pcd\"}\n    }\n)\n\nlaunch_app(dataset_name=\"lidar-dataset\")\n```\n\n### Use Case 4: Autonomous Driving (Multimodal Groups)\n\nThis is the most complex case - multiple cameras + LiDAR per scene:\n\n```python\nimport fiftyone as fo\nfrom pathlib import Path\n\n# Create dataset with group support\ndataset = fo.Dataset(\"driving-dataset\", persistent=True)\ndataset.add_group_field(\"group\", default=\"front_camera\")\n\ndata_dir = Path(\"\u002Fpath\u002Fto\u002Fdriving_data\")\nsamples = []\n\n# Process each scene folder\nfor scene_dir in sorted(data_dir.iterdir()):\n    if not scene_dir.is_dir():\n        continue\n\n    group = fo.Group()\n\n    # Map files to slices\n    slice_mapping = {\n        \"front\": \"front_camera\",\n        \"left\": \"left_camera\",\n        \"right\": \"right_camera\",\n        \"rear\": \"rear_camera\",\n        \"lidar\": \"lidar\",\n        \"radar\": \"radar\"\n    }\n\n    for file in scene_dir.iterdir():\n        # Determine slice from filename\n        for key, slice_name in slice_mapping.items():\n            if key in file.stem.lower():\n                samples.append(fo.Sample(\n                    filepath=str(file),\n                    group=group.element(slice_name)\n                ))\n                break\n\ndataset.add_samples(samples)\ndataset.save()\n\nprint(f\"Created {len(dataset.distinct('group.id'))} groups\")\nprint(f\"Slices: {dataset.group_slices}\")\nprint(f\"Media types: {dataset.group_media_types}\")\n\n# Launch app\nsession = fo.launch_app(dataset)\n```\n\n### Use Case 5: Classification Directory Tree\n\n```python\n# Scan directory\n# Found: cats\u002F, dogs\u002F, birds\u002F folders with images inside\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"classification-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"classification-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"Image Classification Directory Tree\",\n        \"dataset_dir\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fclassification\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"classification-dataset\")\n```\n\n### Use Case 6: Mixed Media (Images + Videos)\n\n```python\n# Scan directory\n# Found: images\u002F, videos\u002F folders\n\n# Create dataset\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"mixed-media\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"mixed-media\")\n\n# Import images\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"tags\": [\"image\"]\n    }\n)\n\n# Import videos\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fvideos\"},\n        \"tags\": [\"video\"]\n    }\n)\n\nlaunch_app(dataset_name=\"mixed-media\")\n```\n\n## Working with Groups\n\n### Understanding Group Structure\n\nIn a grouped dataset:\n- Each **group** represents one scene\u002Fmoment (e.g., one timestamp)\n- Each **slice** represents one modality (e.g., left camera, lidar)\n- All samples in a group share the same `group.id`\n- Each sample has a `group.name` indicating its slice\n\n```python\n# Access group information\nprint(dataset.group_slices)        # ['front_camera', 'left_camera', 'lidar']\nprint(dataset.group_media_types)   # {'front_camera': 'image', 'lidar': 'point-cloud'}\nprint(dataset.default_group_slice) # 'front_camera'\n\n# Iterate over groups\nfor group in dataset.iter_groups():\n    print(f\"Group has {len(group)} slices\")\n    for slice_name, sample in group.items():\n        print(f\"  {slice_name}: {sample.filepath}\")\n\n# Get specific slice view\nfront_images = dataset.select_group_slices(\"front_camera\")\nall_point_clouds = dataset.select_group_slices(media_type=\"point-cloud\")\n```\n\n### Viewing Groups in the App\n\nAfter launching the app:\n1. The slice selector dropdown appears in the top bar\n2. Select different slices to view each modality\n3. Samples are synchronized - selecting a sample shows all its group members\n4. Use the grid view to see multiple slices side by side\n\n## Troubleshooting\n\n**Error: \"Dataset already exists\"**\n- Use a different dataset name\n- Or delete existing: `execute_operator(\"@voxel51\u002Futils\u002Fdelete_dataset\", {\"name\": \"dataset-name\"})`\n\n**Error: \"No samples found\"**\n- Verify directory path is correct and accessible\n- Check file extensions are supported\n- For nested directories, ensure recursive scanning\n\n**Error: \"Labels path not found\"**\n- Verify labels file\u002Fdirectory exists\n- Check path is absolute, not relative\n- Ensure correct format is detected\n\n**Error: \"Invalid group configuration\"**\n- Each group must have at least one sample\n- Slice names must be consistent across groups\n- Only one `3d` slice allowed per group\n\n**Import is slow**\n- For large datasets, use delegated execution\n- Import in batches if needed\n- Consider using glob patterns to filter files\n\n**Point clouds not rendering**\n- Ensure `.pcd` files are valid\n- Check FiftyOne 3D visualization is enabled\n- Verify point cloud plugin is installed\n\n**Groups not detected**\n- Check folder structure matches expected patterns\n- Verify consistent naming across scenes\n- May need to specify grouping manually\n\n## Best Practices\n\n1. **Always scan first** - Understand the data before importing\n2. **Confirm with user** - Present findings before creating dataset\n3. **Use descriptive names** - Dataset names and label fields should be meaningful\n4. **Validate counts** - Ensure imported samples match source files\n5. **Handle errors gracefully** - Report issues clearly, continue with valid files\n6. **Use groups for multimodal** - Don't flatten data that should be grouped\n7. **Set appropriate default slice** - Choose the most commonly viewed modality\n8. **Tag imports** - Use tags to track import batches or sources\n\n## Performance Notes\n\n**Import time estimates:**\n- 1,000 images: ~10-30 seconds\n- 10,000 images: ~2-5 minutes\n- 100,000 images: ~20-60 minutes\n- Point clouds: ~2x slower than images\n- Videos: Depends on frame extraction settings\n\n**Memory requirements:**\n- ~1KB per sample metadata\n- Media files are referenced, not loaded into memory\n- Large datasets may require increased MongoDB limits\n\n## Resources\n\n- [FiftyOne Dataset Import Guide](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fdataset_creation\u002Findex.html)\n- [Grouped Datasets Guide](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fgroups.html)\n- [Point Cloud Support](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002F3d.html)\n- [Supported Dataset Formats](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fdataset_creation\u002Fdatasets.html)\n- [FiftyOne I\u002FO Plugin](https:\u002F\u002Fgithub.com\u002Fvoxel51\u002Ffiftyone-plugins\u002Ftree\u002Fmain\u002Fplugins\u002Fio)\n\n## License\n\nCopyright 2017-2025, Voxel51, Inc.\nApache 2.0 License\n","# Universal Dataset Import for FiftyOne\n\n## Overview\n\nImport any dataset into FiftyOne regardless of media type, label format, or folder structure. Automatically detects and handles:\n\n- **All media types**: images, videos, point clouds, 3D scenes\n- **All label formats**: COCO, YOLO, VOC, CVAT, KITTI, OpenLABEL, and more\n- **Multimodal groups**: Multiple cameras + LiDAR per scene (autonomous driving, robotics)\n- **Complex folder structures**: Nested directories, scene-based organization\n\n**Use this skill when:**\n- Importing datasets from any source or format\n- Working with autonomous driving data (multiple cameras, LiDAR, radar)\n- Loading multimodal data that needs grouping\n- The user doesn't know or specify the exact format\n- Importing point clouds, 3D scenes, or mixed media types\n\n## Prerequisites\n\n- FiftyOne MCP server installed and running\n- `@voxel51\u002Fio` plugin for importing data\n- `@voxel51\u002Futils` plugin for dataset management\n\n## Key Directives\n\n**ALWAYS follow these rules:**\n\n### 1. Scan folder FIRST\nBefore any import, deeply scan the directory to understand its structure:\n```bash\n# Use bash to explore\nfind \u002Fpath\u002Fto\u002Fdata -type f | head -50\nls -la \u002Fpath\u002Fto\u002Fdata\n```\n\n### 2. Auto-detect everything\nDetect media types, label formats, and grouping patterns automatically. Never ask the user to specify format if it can be inferred.\n\n### 3. Detect multimodal groups\nLook for patterns that indicate grouped data:\n- Scene folders containing multiple media files\n- Filename patterns with common prefixes (e.g., `scene_001_left.jpg`, `scene_001_right.jpg`)\n- Mixed media types that should be grouped (images + point clouds)\n\n### 4. Detect and install required packages\nMany specialized dataset formats require external Python packages. After detecting the format:\n\n1. **Identify required packages** based on the detected format\n2. **Check if packages are installed** using `pip show \u003Cpackage>`\n3. **Search for installation instructions** if needed (use web search or FiftyOne docs)\n4. **Ask user for permission** before installing any packages\n5. **Install required packages** (see installation methods below)\n6. **Verify installation** before proceeding\n\n**Common format-to-package mappings:**\n\n| Dataset Format | Package Name | Install Command |\n|---------------|--------------|-----------------|\n| PandaSet | `pandaset` | `pip install \"git+https:\u002F\u002Fgithub.com\u002Fscaleapi\u002Fpandaset-devkit.git#subdirectory=python\"` |\n| nuScenes | `nuscenes-devkit` | `pip install nuscenes-devkit` |\n| Waymo Open | `waymo-open-dataset-tf` | See Waymo docs (requires TensorFlow) |\n| Argoverse 2 | `av2` | `pip install av2` |\n| KITTI 3D | `pykitti` | `pip install pykitti` |\n| Lyft L5 | `l5kit` | `pip install l5kit` |\n| A2D2 | `a2d2` | See Audi A2D2 docs |\n\n**Additional packages for 3D processing:**\n\n| Purpose | Package Name | Install Command |\n|---------|--------------|-----------------|\n| Point cloud conversion to PCD | `open3d` | `pip install open3d` |\n| Point cloud processing | `pyntcloud` | `pip install pyntcloud` |\n| LAS\u002FLAZ point clouds | `laspy` | `pip install laspy` |\n\n**Installation methods (in order of preference):**\n\n1. **PyPI** - Standard pip install:\n   ```bash\n   pip install \u003Cpackage-name>\n   ```\n\n2. **GitHub URL** - When package is not on PyPI:\n   ```bash\n   # Standard GitHub install\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git\"\n\n   # With subdirectory (for monorepos)\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git#subdirectory=python\"\n\n   # Specific branch or tag\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git@v1.0.0\"\n   ```\n\n3. **Clone and install** - For complex builds:\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git\n   cd \u003Crepo>\n   pip install .\n   ```\n\n**Dynamic package discovery workflow:**\n\nIf the format is not in the table above:\n1. **Search PyPI** for `\u003Cformat-name>`, `\u003Cformat-name>-devkit`, or `\u003Cformat-name>-sdk`\n2. **Search GitHub** for `\u003Cformat-name> devkit` or `\u003Cformat-name> python`\n3. **Search web** for \"FiftyOne import \u003Cformat-name>\" or \"\u003Cformat-name> python tutorial\"\n4. **Check the dataset's official website** for developer tools\u002FSDK\n5. **Present findings to user** with installation options\n\n**After installation:**\n1. **Verify** the package is installed: `pip show \u003Cpackage-name>`\n2. **Test import** in Python: `python -c \"from \u003Cpackage> import ...\"`\n3. **Search for FiftyOne integration** examples or write custom import code\n\n### 5. Confirm before importing\nPresent findings to user and **explicitly ask for confirmation** before creating the dataset.\nAlways end your scan summary with a clear question like:\n- \"Proceed with import?\"\n- \"Should I create the dataset with these settings?\"\n\n**Wait for user response before proceeding.** Do not create the dataset until the user confirms.\n\n### 6. Check for existing datasets\nBefore creating a dataset, check if the proposed name already exists:\n```python\nlist_datasets()\n```\nIf the dataset name exists, ask the user:\n- **Overwrite**: Delete existing and create new\n- **Rename**: Use a different name (suggest alternatives like `dataset-name-v2`)\n- **Abort**: Cancel the import\n\n### 7. Validate after import\nCompare imported sample count with source file count. Report any discrepancies.\n\n### 8. Report errors minimally to user\nKeep error messages simple for the user. Use detailed error info internally to diagnose issues.\n\n## Complete Workflow\n\n### Step 1: Deep Folder Scan\n\nScan the target directory to understand its structure:\n\n```bash\n# Count files by extension\nfind \u002Fpath\u002Fto\u002Fdata -type f | sed 's\u002F.*\\.\u002F\u002F' | sort | uniq -c | sort -rn\n\n# List directory structure (2 levels deep)\nfind \u002Fpath\u002Fto\u002Fdata -maxdepth 2 -type d\n\n# Sample some files\nls -la \u002Fpath\u002Fto\u002Fdata\u002F* | head -20\n\n# IMPORTANT: Scan for ALL annotation\u002Flabel directories\nls -la \u002Fpath\u002Fto\u002Fdata\u002Fannotations\u002F 2>\u002Fdev\u002Fnull || ls -la \u002Fpath\u002Fto\u002Fdata\u002Flabels\u002F 2>\u002Fdev\u002Fnull\n```\n\nBuild an inventory of:\n- Media files by type (images, videos, point clouds, 3D)\n- Label files by format (JSON, XML, TXT, YAML, PKL)\n- Directory structure (flat vs nested vs scene-based)\n- **ALL annotation types present** (cuboids, segmentation, tracking, etc.)\n\n**For 3D\u002FAutonomous Driving datasets, specifically check:**\n```bash\n# List all annotation subdirectories\nfind \u002Fpath\u002Fto\u002Fdata -type d -name \"annotations\" -o -name \"labels\" | xargs -I {} ls -la {}\n\n# Sample an annotation file to understand its structure\npython3 -c \"import pickle, gzip; print(pickle.load(gzip.open('path\u002Fto\u002Fannotation.pkl.gz', 'rb'))[:2])\"\n```\n\n### Step 2: Identify Media Types\n\nClassify files by extension:\n\n| Extensions | Media Type | FiftyOne Type |\n|------------|------------|---------------|\n| `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.webp`, `.tiff` | Image | `image` |\n| `.mp4`, `.avi`, `.mov`, `.mkv`, `.webm` | Video | `video` |\n| `.pcd`, `.ply`, `.las`, `.laz` | Point Cloud | `point-cloud` |\n| `.fo3d`, `.obj`, `.gltf`, `.glb` | 3D Scene | `3d` |\n\n### Step 3: Detect Label Format\n\nIdentify label format from file patterns:\n\n| Pattern | Format | Dataset Type |\n|---------|--------|--------------|\n| `annotations.json` or `instances*.json` with COCO structure | COCO | `COCO` |\n| `*.xml` files with Pascal VOC structure | VOC | `VOC` |\n| `*.txt` per image + `classes.txt` | YOLOv4 | `YOLOv4` |\n| `data.yaml` + `labels\u002F*.txt` | YOLOv5 | `YOLOv5` |\n| `*.txt` per image (KITTI format) | KITTI | `KITTI` |\n| Single `annotations.xml` (CVAT format) | CVAT | `CVAT Image` |\n| `*.json` with OpenLABEL structure | OpenLABEL | `OpenLABEL Image` |\n| Folder-per-class structure | Classification | `Image Classification Directory Tree` |\n| `*.csv` with filepath column | CSV | `CSV` |\n| `*.json` with GeoJSON structure | GeoJSON | `GeoJSON` |\n| `.dcm` DICOM files | DICOM | `DICOM` |\n| `.tiff` with geo metadata | GeoTIFF | `GeoTIFF` |\n\n**Specialized Autonomous Driving Formats (require external packages):**\n\n| Directory Pattern | Format | Required Package |\n|------------------|--------|------------------|\n| `camera\u002F`, `lidar\u002F`, `annotations\u002Fcuboids\u002F` with `.pkl.gz` | PandaSet | `pandaset-devkit` |\n| `samples\u002F`, `sweeps\u002F`, `v1.0-*` folders | nuScenes | `nuscenes-devkit` |\n| `segment-*` with `.tfrecord` files | Waymo Open | `waymo-open-dataset-tf` |\n| `argoverse-tracking\u002F` structure | Argoverse | `argoverse-api` |\n| `training\u002F`, `testing\u002F` with `calib\u002F`, `velodyne\u002F` | KITTI 3D | `pykitti` |\n| `scenes\u002F`, `aerial_map\u002F` | Lyft L5 | `l5kit` |\n\n### Step 4: Detect Required Packages\n\nAfter identifying the format, check if external packages are needed:\n\n```bash\n# Check if package is installed (use the actual package name, not repo name)\npip show pandaset\n\n# If not found, the package needs to be installed\n```\n\n**If packages are required:**\n\n1. **Inform user** what packages are needed and why\n\n2. **Search for installation method** if not in the common mappings table:\n   - Search PyPI first: `pip search \u003Cpackage>` or check pypi.org\n   - Search GitHub for the devkit\u002FSDK repository\n   - Check the dataset's official documentation\n   - Search web: \"\u003Cdataset-name> python install\"\n\n3. **Ask for permission** to install:\n   ```\n   This dataset appears to be in PandaSet format, which requires the `pandaset` package.\n\n   The package is not on PyPI and must be installed from GitHub:\n   pip install \"git+https:\u002F\u002Fgithub.com\u002Fscaleapi\u002Fpandaset-devkit.git#subdirectory=python\"\n\n   Would you like me to:\n   - Install the package (recommended)\n   - Search for alternative import methods\n   - Abort and let you install manually\n   ```\n\n4. **Install using the appropriate method**:\n   ```bash\n   # PyPI (if available)\n   pip install \u003Cpackage-name>\n\n   # GitHub URL (if not on PyPI)\n   pip install \"git+https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git#subdirectory=python\"\n\n   # Clone and install (for complex builds)\n   git clone https:\u002F\u002Fgithub.com\u002F\u003Corg>\u002F\u003Crepo>.git && cd \u003Crepo> && pip install .\n   ```\n\n5. **Verify installation**:\n   ```bash\n   pip show \u003Cpackage-name>\n   ```\n\n6. **Test the import** in Python:\n   ```bash\n   python -c \"from \u003Cpackage> import \u003Cmain_class>; print('OK')\"\n   ```\n\n7. **Search for FiftyOne integration code**:\n   - Search: \"FiftyOne \u003Cformat-name> import example\"\n   - Search: \"\u003Cformat-name> to FiftyOne grouped dataset\"\n   - Check FiftyOne docs for similar dataset types\n   - If no examples exist, build custom import code using the devkit API\n\n### Step 5: Detect Grouping Pattern\n\nDetermine if data should be grouped:\n\n**Pattern A: Scene Folders (Most Common for Multimodal)**\n```\n\u002Fdata\u002F\n├── scene_001\u002F\n│   ├── left.jpg\n│   ├── right.jpg\n│   ├── lidar.pcd\n│   └── labels.json\n├── scene_002\u002F\n│   └── ...\n```\nDetection: Each subfolder = one group, files inside = slices\n\n**Pattern B: Filename Prefix**\n```\n\u002Fdata\u002F\n├── 001_left.jpg\n├── 001_right.jpg\n├── 001_lidar.pcd\n├── 002_left.jpg\n├── 002_right.jpg\n├── 002_lidar.pcd\n```\nDetection: Common prefix = group ID, suffix = slice name\n\n**Pattern C: No Grouping (Flat)**\n```\n\u002Fdata\u002F\n├── image_001.jpg\n├── image_002.jpg\n├── image_003.jpg\n```\nDetection: Single media type, no clear grouping pattern\n\n### Step 6: Present Findings to User\n\nBefore importing, present a clear summary that includes **ALL detected labels**:\n\n```\nScan Results for \u002Fpath\u002Fto\u002Fdata:\n\nMedia Found:\n  - 3,000 images (.jpg, .png)\n  - 1,000 point clouds (.pkl.gz → will convert to .pcd)\n  - 0 videos\n\nGrouping Detected:\n  - Pattern: Scene folders\n  - Groups: 1,000 scenes\n  - Slices: left (image), right (image), front (image), lidar (point-cloud)\n\nALL Labels Detected:\n  ├── cuboids\u002F           (3D bounding boxes, 1,000 files)\n  │   └── Format: pickle, Fields: label, position, dimensions, rotation, track_id\n  ├── semseg\u002F            (Semantic segmentation, 1,000 files)\n  │   └── Format: pickle, point-wise class labels\n  └── instances.json     (2D detections, COCO format)\n      └── Classes: 10 (car, pedestrian, cyclist, ...)\n\nRequired Packages:\n  - ✅ pandaset (installed)\n  - ⚠️ open3d (needed for PCD conversion) → pip install open3d\n\nProposed Configuration:\n  - Dataset name: my-dataset\n  - Type: Grouped (multimodal)\n  - Default slice: front_camera\n  - Labels to import:\n    - detections_3d (from cuboids\u002F)\n    - point_labels (from semseg\u002F)\n    - detections (from instances.json)\n\nProceed with import? (yes\u002Fno)\n```\n\n**IMPORTANT:**\n- List ALL annotation types found during the scan\n- Show the format\u002Fstructure of each label type\n- Indicate which labels will be imported and how\n- Wait for user confirmation before proceeding\n\n### Step 7: Check for Existing Dataset\n\nBefore creating, check if the dataset name already exists:\n\n```python\n# Check existing datasets\nlist_datasets()\n```\n\nIf the proposed dataset name exists in the list:\n1. Inform the user: \"A dataset named 'my-dataset' already exists with X samples.\"\n2. Ask for their preference:\n   - **Overwrite**: Delete existing dataset first\n   - **Rename**: Suggest alternatives (e.g., `my-dataset-v2`, `my-dataset-20240107`)\n   - **Abort**: Cancel the import\n\nIf user chooses to overwrite:\n```python\n# Delete existing dataset\nset_context(dataset_name=\"my-dataset\")\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fdelete_dataset\",\n    params={\"name\": \"my-dataset\"}\n)\n```\n\n### Step 8: Create Dataset\n\n```python\n# Create the dataset\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\n        \"name\": \"my-dataset\",\n        \"persistent\": true\n    }\n)\n\n# Set context\nset_context(dataset_name=\"my-dataset\")\n```\n\n### Step 9A: Import Simple Dataset (No Groups)\n\nFor flat datasets without grouping:\n\n```python\n# Import media only\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"}\n    }\n)\n\n# Import with labels\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"COCO\",\n        \"data_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n```\n\n### Step 9B: Import Grouped Dataset (Multimodal)\n\nFor multimodal data with groups, use Python directly. Guide the user:\n\n```python\nimport fiftyone as fo\n\n# Create dataset\ndataset = fo.Dataset(\"multimodal-dataset\", persistent=True)\n\n# Add group field\ndataset.add_group_field(\"group\", default=\"front\")\n\n# Create samples for each group\nimport os\nfrom pathlib import Path\n\ndata_dir = Path(\"\u002Fpath\u002Fto\u002Fdata\")\nsamples = []\n\nfor scene_dir in sorted(data_dir.iterdir()):\n    if not scene_dir.is_dir():\n        continue\n\n    # Create a group for this scene\n    group = fo.Group()\n\n    # Add each file as a slice\n    for file in scene_dir.iterdir():\n        if file.suffix in ['.jpg', '.png']:\n            # Determine slice name from filename\n            slice_name = file.stem  # e.g., \"left\", \"right\", \"front\"\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(slice_name)\n            ))\n        elif file.suffix == '.pcd':\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(\"lidar\")\n            ))\n        elif file.suffix == '.mp4':\n            samples.append(fo.Sample(\n                filepath=str(file),\n                group=group.element(\"video\")\n            ))\n\n# Add all samples\ndataset.add_samples(samples)\nprint(f\"Added {len(dataset)} samples in {len(dataset.distinct('group.id'))} groups\")\n```\n\n### Step 9C: Import Specialized Format Dataset (3D\u002FAutonomous Driving)\n\nFor datasets requiring external packages (PandaSet, nuScenes, etc.), use the devkit to load data and convert to FiftyOne format.\n\n**General approach:**\n1. Search FiftyOne documentation or web for the specific import method\n2. Use the devkit to load the raw data\n3. **Convert point clouds to PCD format** (FiftyOne requires `.pcd` files)\n4. **Create `fo.Scene` objects** for 3D visualization with point clouds\n5. Convert to FiftyOne samples with proper grouping\n6. **Import ALL detected labels** (cuboids, segmentation, etc.) found during scan\n\n#### Converting Point Clouds to PCD\n\nMany autonomous driving datasets store LiDAR data in proprietary formats (`.pkl.gz`, `.bin`, `.npy`). Convert to PCD for FiftyOne:\n\n```python\nimport numpy as np\nimport open3d as o3d\nfrom pathlib import Path\n\ndef convert_to_pcd(points, output_path):\n    \"\"\"\n    Convert point cloud array to PCD file.\n\n    Args:\n        points: numpy array of shape (N, 3) or (N, 4) with XYZ or XYZI\n        output_path: path to save .pcd file\n    \"\"\"\n    pcd = o3d.geometry.PointCloud()\n    pcd.points = o3d.utility.Vector3dVector(points[:, :3])\n\n    # If intensity is available, store as colors (grayscale)\n    if points.shape[1] >= 4:\n        intensity = points[:, 3]\n        intensity_normalized = (intensity - intensity.min()) \u002F (intensity.max() - intensity.min() + 1e-8)\n        colors = np.stack([intensity_normalized] * 3, axis=1)\n        pcd.colors = o3d.utility.Vector3dVector(colors)\n\n    o3d.io.write_point_cloud(str(output_path), pcd)\n    return output_path\n```\n\n**Note:** Install open3d if needed: `pip install open3d`\n\n#### Creating fo.Scene for 3D Visualization\n\nFor each LiDAR frame, create an `fo.Scene` that references the PCD file:\n\n```python\nimport fiftyone as fo\n\n# Create a 3D scene for the point cloud\nscene = fo.Scene()\n\n# Add point cloud to the scene\nscene.add_point_cloud(\n    name=\"lidar\",\n    pcd_path=\"\u002Fpath\u002Fto\u002Fframe.pcd\",\n    flag_for_projection=True  # Enable projection to camera views\n)\n\n# Create sample with the scene\nsample = fo.Sample(filepath=\"\u002Fpath\u002Fto\u002Fscene.fo3d\")  # Or use scene directly\nsample[\"scene\"] = scene\n```\n\n#### Importing ALL Labels Detected During Scan\n\nDuring the folder scan (Step 1), identify ALL label types present:\n\n```bash\n# Example: List all annotation directories\u002Ffiles\nls -la \u002Fpath\u002Fto\u002Fdataset\u002Fannotations\u002F\n# Output might show: cuboids\u002F, semseg\u002F, tracking\u002F, instances.json, etc.\n```\n\n**Map detected labels to FiftyOne label types:**\n\n| Annotation Type | FiftyOne Label Type | Field Name |\n|-----------------|---------------------|------------|\n| 3D Cuboids\u002FBounding Boxes | `fo.Detection` with 3D attributes | `detections_3d` |\n| Semantic Segmentation | `fo.Segmentation` | `segmentation` |\n| Instance Segmentation | `fo.Detections` with masks | `instances` |\n| Tracking IDs | Add `track_id` to detections | `tracks` |\n| Classification | `fo.Classification` | `classification` |\n| Keypoints\u002FPose | `fo.Keypoints` | `keypoints` |\n\n**Example: PandaSet Full Import with Labels**\n\n```python\nimport fiftyone as fo\nimport numpy as np\nimport open3d as o3d\nfrom pathlib import Path\nimport gzip\nimport pickle\n\ndata_path = Path(\"\u002Fpath\u002Fto\u002Fpandaset\")\npcd_output_dir = data_path \u002F \"pcd_converted\"\npcd_output_dir.mkdir(exist_ok=True)\n\n# Create dataset with groups\ndataset = fo.Dataset(\"pandaset\", persistent=True)\ndataset.add_group_field(\"group\", default=\"front_camera\")\n\n# Get camera names\ncamera_names = [d.name for d in (data_path \u002F \"camera\").iterdir() if d.is_dir()]\nframe_count = len(list((data_path \u002F \"camera\" \u002F \"front_camera\").glob(\"*.jpg\")))\n\n# Check what labels exist\nlabels_dir = data_path \u002F \"annotations\"\navailable_labels = [d.name for d in labels_dir.iterdir() if d.is_dir()]\nprint(f\"Found label types: {available_labels}\")  # e.g., ['cuboids', 'semseg']\n\nsamples = []\nfor frame_idx in range(frame_count):\n    frame_id = f\"{frame_idx:02d}\"\n    group = fo.Group()\n\n    # === Add camera images ===\n    for cam_name in camera_names:\n        img_path = data_path \u002F \"camera\" \u002F cam_name \u002F f\"{frame_id}.jpg\"\n        if img_path.exists():\n            sample = fo.Sample(filepath=str(img_path))\n            sample[\"group\"] = group.element(cam_name)\n            sample[\"frame_idx\"] = frame_idx\n            samples.append(sample)\n\n    # === Convert and add LiDAR point cloud ===\n    lidar_pkl = data_path \u002F \"lidar\" \u002F f\"{frame_id}.pkl.gz\"\n    if lidar_pkl.exists():\n        # Load pickle\n        with gzip.open(lidar_pkl, 'rb') as f:\n            lidar_data = pickle.load(f)\n\n        # Extract points (adjust based on actual data structure)\n        if isinstance(lidar_data, dict):\n            points = lidar_data.get('points', lidar_data.get('data'))\n        else:\n            points = np.array(lidar_data)\n\n        # Convert to PCD\n        pcd_path = pcd_output_dir \u002F f\"{frame_id}.pcd\"\n        pcd = o3d.geometry.PointCloud()\n        pcd.points = o3d.utility.Vector3dVector(points[:, :3])\n        o3d.io.write_point_cloud(str(pcd_path), pcd)\n\n        # Create 3D sample with scene\n        lidar_sample = fo.Sample(filepath=str(pcd_path))\n        lidar_sample[\"group\"] = group.element(\"lidar\")\n        lidar_sample[\"frame_idx\"] = frame_idx\n\n        # === Load 3D cuboid labels if available ===\n        # IMPORTANT: Store 3D attributes as flat scalar fields, NOT lists\n        # Using lists (e.g., location=[x,y,z]) causes \"Symbol.iterator\" errors in 3D viewer\n        if \"cuboids\" in available_labels:\n            cuboids_pkl = labels_dir \u002F \"cuboids\" \u002F f\"{frame_id}.pkl.gz\"\n            if cuboids_pkl.exists():\n                with gzip.open(cuboids_pkl, 'rb') as f:\n                    cuboids_df = pickle.load(f)  # PandaSet uses pandas DataFrame\n\n                detections = []\n                for _, row in cuboids_df.iterrows():\n                    detection = fo.Detection(\n                        label=row.get(\"label\", \"object\"),\n                        bounding_box=[0, 0, 0.01, 0.01],  # minimal 2D placeholder\n                    )\n                    # Store 3D attributes as FLAT SCALAR fields (not lists!)\n                    detection[\"pos_x\"] = float(row.get(\"position.x\", 0))\n                    detection[\"pos_y\"] = float(row.get(\"position.y\", 0))\n                    detection[\"pos_z\"] = float(row.get(\"position.z\", 0))\n                    detection[\"dim_x\"] = float(row.get(\"dimensions.x\", 1))\n                    detection[\"dim_y\"] = float(row.get(\"dimensions.y\", 1))\n                    detection[\"dim_z\"] = float(row.get(\"dimensions.z\", 1))\n                    detection[\"yaw\"] = float(row.get(\"yaw\", 0))\n                    detection[\"track_id\"] = str(row.get(\"uuid\", \"\"))\n                    detection[\"stationary\"] = bool(row.get(\"stationary\", False))\n                    detections.append(detection)\n\n                lidar_sample[\"ground_truth\"] = fo.Detections(detections=detections)\n\n        # === Load semantic segmentation if available ===\n        if \"semseg\" in available_labels:\n            semseg_pkl = labels_dir \u002F \"semseg\" \u002F f\"{frame_id}.pkl.gz\"\n            if semseg_pkl.exists():\n                with gzip.open(semseg_pkl, 'rb') as f:\n                    semseg_data = pickle.load(f)\n                # Store as custom field (point-wise labels)\n                lidar_sample[\"point_labels\"] = semseg_data.tolist() if hasattr(semseg_data, 'tolist') else semseg_data\n\n        samples.append(lidar_sample)\n\n# Add all samples\ndataset.add_samples(samples)\ndataset.save()\n\nprint(f\"Imported {len(dataset)} groups with {len(dataset.select_group_slices())} total samples\")\nprint(f\"Slices: {dataset.group_slices}\")\nprint(f\"Labels imported: {available_labels}\")\n```\n\n**Dynamic Import Discovery:**\nIf no example exists for the format:\n1. Search: \"FiftyOne \u003Cformat-name> import example\"\n2. Search: \"\u003Cformat-name> devkit python example\"\n3. Read the devkit documentation to understand data structure\n4. Explore the annotation files to understand label format:\n   ```python\n   import pickle, gzip\n   with gzip.open(\"annotations\u002Fcuboids\u002F00.pkl.gz\", \"rb\") as f:\n       data = pickle.load(f)\n   print(type(data), data[0] if isinstance(data, list) else data)\n   ```\n5. Build custom import code based on the devkit API and label structure\n\n### Step 10: Import Additional Labels (Optional)\n\nIf labels weren't imported with the specialized format, add them separately:\n\n```python\n# For COCO labels that reference filepaths\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"LABELS_ONLY\",\n        \"dataset_type\": \"COCO\",\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n```\n\n### Step 11: Validate Import\n\n```python\n# Load and verify\nload_dataset(name=\"my-dataset\")\n\n# Check counts match\ndataset_summary(name=\"my-dataset\")\n```\n\nCompare:\n- Imported samples vs source files\n- Groups created vs expected\n- Labels imported vs annotation count\n\n### Step 12: Launch App and View\n\n```python\nlaunch_app(dataset_name=\"my-dataset\")\n\n# For grouped datasets, view different slices\n# In the App, use the slice selector dropdown\n```\n\n## Supported Dataset Types\n\n### Media Types\n\n| Type | Extensions | Description |\n|------|------------|-------------|\n| `image` | `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.webp`, `.tiff` | Static images |\n| `video` | `.mp4`, `.avi`, `.mov`, `.mkv`, `.webm` | Video files with frames |\n| `point-cloud` | `.pcd`, `.ply`, `.las`, `.laz` | 3D point cloud data |\n| `3d` | `.fo3d`, `.obj`, `.gltf`, `.glb` | 3D scenes and meshes |\n\n### Label Formats\n\n| Format | Dataset Type Value | Label Types | File Pattern |\n|--------|-------------------|-------------|--------------|\n| COCO | `COCO` | detections, segmentations, keypoints | `*.json` |\n| VOC\u002FPascal | `VOC` | detections | `*.xml` per image |\n| KITTI | `KITTI` | detections | `*.txt` per image |\n| YOLOv4 | `YOLOv4` | detections | `*.txt` + `classes.txt` |\n| YOLOv5 | `YOLOv5` | detections | `data.yaml` + `labels\u002F*.txt` |\n| CVAT Image | `CVAT Image` | classifications, detections, polylines, keypoints | Single `*.xml` |\n| CVAT Video | `CVAT Video` | frame labels | XML directory |\n| OpenLABEL Image | `OpenLABEL Image` | all types | `*.json` directory |\n| OpenLABEL Video | `OpenLABEL Video` | all types | `*.json` directory |\n| TF Object Detection | `TF Object Detection` | detections | TFRecords |\n| TF Image Classification | `TF Image Classification` | classification | TFRecords |\n| Image Classification Tree | `Image Classification Directory Tree` | classification | Folder per class |\n| Video Classification Tree | `Video Classification Directory Tree` | classification | Folder per class |\n| Image Segmentation | `Image Segmentation` | segmentation | Mask images |\n| CSV | `CSV` | custom fields | `*.csv` |\n| DICOM | `DICOM` | medical metadata | `.dcm` files |\n| GeoJSON | `GeoJSON` | geolocation | `*.json` |\n| GeoTIFF | `GeoTIFF` | geolocation | `.tiff` with geo |\n| FiftyOne Dataset | `FiftyOne Dataset` | all types | Exported format |\n\n## Common Use Cases\n\n### Use Case 1: Simple Image Dataset with COCO Labels\n\n```python\n# Scan directory\n# Found: 5000 images, annotations.json (COCO format)\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"coco-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"coco-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"COCO\",\n        \"data_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"labels_path\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fannotations.json\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"coco-dataset\")\n```\n\n### Use Case 2: YOLO Dataset\n\n```python\n# Scan directory\n# Found: data.yaml, images\u002F, labels\u002F (YOLOv5 format)\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"yolo-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"yolo-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"YOLOv5\",\n        \"dataset_dir\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fyolo\u002Fdataset\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"yolo-dataset\")\n```\n\n### Use Case 3: Point Cloud Dataset\n\n```python\n# Scan directory\n# Found: 1000 .pcd files, labels\u002F with KITTI format\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"lidar-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"lidar-dataset\")\n\n# Import point clouds\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"GLOB_PATTERN\",\n        \"glob_patt\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fdata\u002F*.pcd\"}\n    }\n)\n\nlaunch_app(dataset_name=\"lidar-dataset\")\n```\n\n### Use Case 4: Autonomous Driving (Multimodal Groups)\n\nThis is the most complex case - multiple cameras + LiDAR per scene:\n\n```python\nimport fiftyone as fo\nfrom pathlib import Path\n\n# Create dataset with group support\ndataset = fo.Dataset(\"driving-dataset\", persistent=True)\ndataset.add_group_field(\"group\", default=\"front_camera\")\n\ndata_dir = Path(\"\u002Fpath\u002Fto\u002Fdriving_data\")\nsamples = []\n\n# Process each scene folder\nfor scene_dir in sorted(data_dir.iterdir()):\n    if not scene_dir.is_dir():\n        continue\n\n    group = fo.Group()\n\n    # Map files to slices\n    slice_mapping = {\n        \"front\": \"front_camera\",\n        \"left\": \"left_camera\",\n        \"right\": \"right_camera\",\n        \"rear\": \"rear_camera\",\n        \"lidar\": \"lidar\",\n        \"radar\": \"radar\"\n    }\n\n    for file in scene_dir.iterdir():\n        # Determine slice from filename\n        for key, slice_name in slice_mapping.items():\n            if key in file.stem.lower():\n                samples.append(fo.Sample(\n                    filepath=str(file),\n                    group=group.element(slice_name)\n                ))\n                break\n\ndataset.add_samples(samples)\ndataset.save()\n\nprint(f\"Created {len(dataset.distinct('group.id'))} groups\")\nprint(f\"Slices: {dataset.group_slices}\")\nprint(f\"Media types: {dataset.group_media_types}\")\n\n# Launch app\nsession = fo.launch_app(dataset)\n```\n\n### Use Case 5: Classification Directory Tree\n\n```python\n# Scan directory\n# Found: cats\u002F, dogs\u002F, birds\u002F folders with images inside\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"classification-dataset\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"classification-dataset\")\n\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_AND_LABELS\",\n        \"dataset_type\": \"Image Classification Directory Tree\",\n        \"dataset_dir\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fclassification\"},\n        \"label_field\": \"ground_truth\"\n    }\n)\n\nlaunch_app(dataset_name=\"classification-dataset\")\n```\n\n### Use Case 6: Mixed Media (Images + Videos)\n\n```python\n# Scan directory\n# Found: images\u002F, videos\u002F folders\n\n# Create dataset\nexecute_operator(\n    operator_uri=\"@voxel51\u002Futils\u002Fcreate_dataset\",\n    params={\"name\": \"mixed-media\", \"persistent\": true}\n)\n\nset_context(dataset_name=\"mixed-media\")\n\n# Import images\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fimages\"},\n        \"tags\": [\"image\"]\n    }\n)\n\n# Import videos\nexecute_operator(\n    operator_uri=\"@voxel51\u002Fio\u002Fimport_samples\",\n    params={\n        \"import_type\": \"MEDIA_ONLY\",\n        \"style\": \"DIRECTORY\",\n        \"directory\": {\"absolute_path\": \"\u002Fpath\u002Fto\u002Fvideos\"},\n        \"tags\": [\"video\"]\n    }\n)\n\nlaunch_app(dataset_name=\"mixed-media\")\n```\n\n## Working with Groups\n\n### Understanding Group Structure\n\nIn a grouped dataset:\n- Each **group** represents one scene\u002Fmoment (e.g., one timestamp)\n- Each **slice** represents one modality (e.g., left camera, lidar)\n- All samples in a group share the same `group.id`\n- Each sample has a `group.name` indicating its slice\n\n```python\n# Access group information\nprint(dataset.group_slices)        # ['front_camera', 'left_camera', 'lidar']\nprint(dataset.group_media_types)   # {'front_camera': 'image', 'lidar': 'point-cloud'}\nprint(dataset.default_group_slice) # 'front_camera'\n\n# Iterate over groups\nfor group in dataset.iter_groups():\n    print(f\"Group has {len(group)} slices\")\n    for slice_name, sample in group.items():\n        print(f\"  {slice_name}: {sample.filepath}\")\n\n# Get specific slice view\nfront_images = dataset.select_group_slices(\"front_camera\")\nall_point_clouds = dataset.select_group_slices(media_type=\"point-cloud\")\n```\n\n### Viewing Groups in the App\n\nAfter launching the app:\n1. The slice selector dropdown appears in the top bar\n2. Select different slices to view each modality\n3. Samples are synchronized - selecting a sample shows all its group members\n4. Use the grid view to see multiple slices side by side\n\n## Troubleshooting\n\n**Error: \"Dataset already exists\"**\n- Use a different dataset name\n- Or delete existing: `execute_operator(\"@voxel51\u002Futils\u002Fdelete_dataset\", {\"name\": \"dataset-name\"})`\n\n**Error: \"No samples found\"**\n- Verify directory path is correct and accessible\n- Check file extensions are supported\n- For nested directories, ensure recursive scanning\n\n**Error: \"Labels path not found\"**\n- Verify labels file\u002Fdirectory exists\n- Check path is absolute, not relative\n- Ensure correct format is detected\n\n**Error: \"Invalid group configuration\"**\n- Each group must have at least one sample\n- Slice names must be consistent across groups\n- Only one `3d` slice allowed per group\n\n**Import is slow**\n- For large datasets, use delegated execution\n- Import in batches if needed\n- Consider using glob patterns to filter files\n\n**Point clouds not rendering**\n- Ensure `.pcd` files are valid\n- Check FiftyOne 3D visualization is enabled\n- Verify point cloud plugin is installed\n\n**Groups not detected**\n- Check folder structure matches expected patterns\n- Verify consistent naming across scenes\n- May need to specify grouping manually\n\n## Best Practices\n\n1. **Always scan first** - Understand the data before importing\n2. **Confirm with user** - Present findings before creating dataset\n3. **Use descriptive names** - Dataset names and label fields should be meaningful\n4. **Validate counts** - Ensure imported samples match source files\n5. **Handle errors gracefully** - Report issues clearly, continue with valid files\n6. **Use groups for multimodal** - Don't flatten data that should be grouped\n7. **Set appropriate default slice** - Choose the most commonly viewed modality\n8. **Tag imports** - Use tags to track import batches or sources\n\n## Performance Notes\n\n**Import time estimates:**\n- 1,000 images: ~10-30 seconds\n- 10,000 images: ~2-5 minutes\n- 100,000 images: ~20-60 minutes\n- Point clouds: ~2x slower than images\n- Videos: Depends on frame extraction settings\n\n**Memory requirements:**\n- ~1KB per sample metadata\n- Media files are referenced, not loaded into memory\n- Large datasets may require increased MongoDB limits\n\n## Resources\n\n- [FiftyOne Dataset Import Guide](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fdataset_creation\u002Findex.html)\n- [Grouped Datasets Guide](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fgroups.html)\n- [Point Cloud Support](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002F3d.html)\n- [Supported Dataset Formats](https:\u002F\u002Fdocs.voxel51.com\u002Fuser_guide\u002Fdataset_creation\u002Fdatasets.html)\n- [FiftyOne I\u002FO Plugin](https:\u002F\u002Fgithub.com\u002Fvoxel51\u002Ffiftyone-plugins\u002Ftree\u002Fmain\u002Fplugins\u002Fio)\n\n## License\n\nCopyright 2017-2025, Voxel51, Inc.\nApache 2.0 License\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fadonaivera\u002Ffiftyone-dataset-import",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill fiftyone-dataset-import",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill fiftyone-dataset-import",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill fiftyone-dataset-import","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fadonaivera\u002Ffiftyone-dataset-import\u002FSKILL.md",true,[67,73],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"agents\u002Fopenai.yaml","REFERENCE","参考文档",144,"https:\u002F\u002Fgithub.com\u002FLomzem\u002Fdotfiles\u002Fblob\u002Fmain\u002Fdot_agents\u002Fskills\u002Fwayfinder\u002Fagents\u002Fopenai.yaml",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"skill-report.json",40566,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fadonaivera\u002Ffiftyone-dataset-import\u002Fskill-report.json",[78,87,95,104,110,116],{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[84,85,86],"model","model hierarchy","model hierarchy skill",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[29,93,94],"zoom","zoom mcp",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[101,102,103,93],"sdk","zoom apps sdk","apps",{"skillNo":105,"name":106,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[106],{"skillNo":111,"name":112,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[112],{"skillNo":117,"name":118,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[118]]