{
  "name": "napari-simpleannotate",
  "display_name": "SimpleAnnotate",
  "visibility": "public",
  "icon": null,
  "categories": [],
  "schema_version": "0.2.1",
  "on_activate": null,
  "on_deactivate": null,
  "contributions": {
    "commands": [
      {
        "id": "napari-simpleannotate.make_bboxwidget",
        "title": "Bbox annotation",
        "python_name": "napari_simpleannotate._bbox_widget:BboxQWidget",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-simpleannotate.make_labelimgwidget",
        "title": "Label image classification",
        "python_name": "napari_simpleannotate._labelimg_widget:LabelImgQWidget",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-simpleannotate.make_bboxvideowidget",
        "title": "Bbox video annotation",
        "python_name": "napari_simpleannotate._bbox_video_widget:BboxVideoQWidget",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      }
    ],
    "readers": null,
    "writers": null,
    "widgets": [
      {
        "command": "napari-simpleannotate.make_bboxwidget",
        "display_name": "Bbox annotation",
        "autogenerate": false
      },
      {
        "command": "napari-simpleannotate.make_labelimgwidget",
        "display_name": "Label image classification",
        "autogenerate": false
      },
      {
        "command": "napari-simpleannotate.make_bboxvideowidget",
        "display_name": "Bbox video annotation",
        "autogenerate": false
      }
    ],
    "sample_data": null,
    "themes": null,
    "menus": {},
    "submenus": null,
    "keybindings": null,
    "configuration": []
  },
  "package_metadata": {
    "metadata_version": "2.4",
    "name": "napari-simpleannotate",
    "version": "0.1.6",
    "dynamic": [
      "license-file"
    ],
    "platform": null,
    "supported_platform": null,
    "summary": "A napari plugin for simple image and video annotation",
    "description": "# napari-simpleannotate\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-simpleannotate.svg?color=green)](https://github.com/hiroalchem/napari-simpleannotate/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-simpleannotate.svg?color=green)](https://pypi.org/project/napari-simpleannotate)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-simpleannotate.svg?color=green)](https://python.org)\n[![tests](https://github.com/hiroalchem/napari-simpleannotate/workflows/tests/badge.svg)](https://github.com/hiroalchem/napari-simpleannotate/actions)\n[![codecov](https://codecov.io/gh/hiroalchem/napari-simpleannotate/branch/main/graph/badge.svg)](https://codecov.io/gh/hiroalchem/napari-simpleannotate)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-simpleannotate)](https://napari-hub.org/plugins/napari-simpleannotate)\n\nA napari plugin for simple image and video annotation that provides three main annotation workflows:\n\n1. **Bounding Box Annotation (YOLO format)**: For object detection training data on images\n2. **Video Bounding Box Annotation**: For object detection training data on video files\n3. **Image Classification Labeling**: For image classification training data\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n<!--\nDon't miss the full getting started guide to set up your new package:\nhttps://github.com/napari/cookiecutter-napari-plugin#getting-started\n\nand review the napari docs for plugin developers:\nhttps://napari.org/stable/plugins/index.html\n-->\n\n![overview](https://github.com/hiroalchem/napari-simpleannotate/raw/main/images/dog_and_cat.jpg)\n\n\n## Installation\n\nYou can install `napari-simpleannotate` via [pip]:\n\n    pip install napari-simpleannotate\n\n\n\nTo install latest development version :\n\n    pip install git+https://github.com/hiroalchem/napari-simpleannotate.git\n\n\n## How to use\n\n### Getting Started\n\nAfter installing napari-simpleannotate, launch napari and navigate to `Plugins > Add dock widget` to find three annotation widgets:\n\n- **Bbox annotation**: For bounding box annotation on images\n- **Bbox video annotation**: For bounding box annotation on video files  \n- **Label image classification**: For image classification labeling\n\n### Bounding Box Annotation (Images)\n\n**Prerequisites**: None required\n\n1. **Opening Files**:\n   - Single file: Click `Open File` to select an image file\n   - Directory: Click `Open Directory` to select a folder containing images\n   - If a `class.yaml` file exists in the directory, you'll be prompted to load existing classes\n\n2. **Class Management**:\n   - Enter class names in the text box and click `Add class`\n   - Classes are automatically assigned sequential IDs (0, 1, 2, ...)\n   - Select a class and click `Delete selected class` to remove it\n   - Classes are saved to `class.yaml` alongside annotations\n\n3. **Creating Annotations**:\n   - Select a class from the list (becomes your active class)\n   - Use napari's rectangle tool (shortcut: R) to draw bounding boxes\n   - New rectangles automatically inherit the selected class\n   - Change existing rectangles: select the shape, then click a different class\n\n4. **Saving Work**:\n   - Click `Save Annotations` to export in YOLO format\n   - Files saved: `image_name.txt` (YOLO coordinates) + `class.yaml` (class definitions)\n   - YOLO format: `class_id x_center y_center width height` (normalized 0-1)\n\n### Video Bounding Box Annotation\n\n**Prerequisites**: Install PyAV for video support: `pip install av`\n\n1. **Opening Videos**:\n   - Click `Open Video` to select MP4, AVI, MOV, MKV, WMV, FLV, or WebM files\n   - Frames load through a cached reader that keeps recently viewed frames ready for scrubbing\n\n2. **Navigation & Frame Tools**:\n   - Use napari's time slider; the widget shows `Frame: current/total` alongside live cache usage\n   - Jump between annotated frames with the `Prev (Q)` and `Next (W)` buttons or keyboard shortcuts\n   - Nearby frames are prefetched in the background to keep playback smooth during review\n\n3. **Annotating Frames**:\n   - Draw rectangles after selecting a class; each shape stores its frame index automatically\n   - Bounding boxes are only visible on the frame where they were created\n   - Class management matches the image workflow, and `class.yaml` is written in YOLO `names:` format\n\n4. **Automatic Tracking**:\n   - Use `Start` to launch trackers for the boxes in the current frame and `Stop` to halt processing\n   - Keep `Track all bounding boxes` enabled to follow every box, or disable it to track only selected shapes\n   - Choose between the default OpenCV `CSRT` tracker and the experimental `TrackerVit`\n\n   ![tracking demo](https://github.com/hiroalchem/napari-simpleannotate/raw/main/images/tracking_pigion_480w.gif)\n\n5. **Saving & Exports**:\n   - `Save Annotations` writes per-frame YOLO files (`imgNNN.txt`) in a video-specific folder next to the source\n   - Annotated frames are saved once as `imgNNN.png` so you can review what was labeled later\n   - Enable `Enable crop on save` to export fixed-size crops plus matching YOLO labels under `crops/`\n   - Existing exports are reused when present so repeated saves only write new annotations\n\n### Image Classification Labeling\n\n**Prerequisites**: None required\n\n1. **Opening Directory**:\n   - Click `Open Directory` to select image folder\n   - Recursively finds all images (PNG, TIF, JPG, JPEG, TIFF)\n   - Automatically loads existing `labels.csv` and `class.txt` if present\n\n2. **Display Options**:\n   - **Split Channels**: Check to display multi-channel images as separate layers\n   - Contrast settings preserved when switching between images\n   - Navigate images using the file list on the left\n\n3. **Labeling Workflow**:\n   - Add classes: Type in text box and press Enter (or click `Add class`)\n   - Remove classes: Type existing class name and press Enter\n   - Assign labels: Select image → Click class name to label it\n   - Real-time auto-save to `labels.csv` and `class.txt`\n\n4. **Resume Sessions**:\n   - Previous work automatically loaded when reopening directories\n   - Continue labeling from where you left off\n\n## Performance Notes\n\n- **Video annotation**: Optimized with frame caching and parallel prefetching for smooth playback\n- **Large datasets**: Classification widget handles thousands of images efficiently  \n- **Memory management**: LRU cache prevents memory overflow during long annotation sessions\n\n## Output Formats\n\n| Widget | Annotation File | Class File | Format |\n|--------|----------------|------------|---------|\n| Bbox (Images) | `image.txt` | `class.yaml` | YOLO standard |\n| Bbox (Video) | `imgNNN.txt` per frame (+ optional `crops/*.txt`) | `class.yaml` | YOLO normalized (per frame/crop) |\n| Classification | `labels.csv` | `class.txt` | CSV with image-label pairs |\n\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-simpleannotate\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n\n[file an issue]: https://github.com/hiroalchem/napari-simpleannotate/issues\n\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n",
    "description_content_type": "text/markdown",
    "keywords": null,
    "home_page": null,
    "download_url": null,
    "author": null,
    "author_email": "Hiroki Kawai <h.kawai888@gmail.com>",
    "maintainer": null,
    "maintainer_email": null,
    "license": "BSD-3-Clause",
    "classifier": [
      "Development Status :: 2 - Pre-Alpha",
      "Framework :: napari",
      "Intended Audience :: Developers",
      "Operating System :: OS Independent",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.8",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Topic :: Scientific/Engineering :: Image Processing"
    ],
    "requires_dist": [
      "numpy",
      "magicgui",
      "pyyaml",
      "qtpy",
      "scikit-image",
      "pandas",
      "napari_video",
      "zarr",
      "numcodecs",
      "opencv-contrib-python",
      "platformdirs",
      "tox; extra == \"testing\"",
      "pytest; extra == \"testing\"",
      "pytest-cov; extra == \"testing\"",
      "pytest-qt; extra == \"testing\"",
      "napari; extra == \"testing\"",
      "pyqt5; extra == \"testing\""
    ],
    "requires_python": ">=3.8",
    "requires_external": null,
    "project_url": [
      "homepage, https://github.com/hiroalchem/napari-simpleannotate",
      "repository, https://github.com/hiroalchem/napari-simpleannotate",
      "documentation, https://github.com/hiroalchem/napari-simpleannotate#README.md",
      "Bug Tracker, https://github.com/hiroalchem/napari-simpleannotate/issues",
      "User Support, https://github.com/hiroalchem/napari-simpleannotate/issues"
    ],
    "provides_extra": [
      "testing"
    ],
    "provides_dist": null,
    "obsoletes_dist": null
  },
  "npe1_shim": false
}