Skip to main content

An interactive PyQt5 image annotation tool for segmentation masks and bounding boxes.

Project description

Tadqeeq โ€“ Image Annotator Tool

An interactive image annotation tool built with PyQt5, designed for efficient labeling of segmentation masks and bounding boxes.

Developed by Mohamed Behery @ RTR Software Development - An "Orbits" Subsidiary ๐Ÿ“… April 30, 2025 ๐Ÿชช Licensed under the MIT License


๐Ÿš€ Widget Features

  • โœ… Minimalist Interactive Design
  • ๐Ÿ–Œ๏ธ Scroll through label classes / Adjust pen size with the mouse wheel
  • ๐ŸŽจ Supports segmentation masks (.png) and bounding boxes (.txt)
  • ๐Ÿง  Dynamic label color generation (HSV-based)
  • ๐Ÿ’ฌ Floating labels showing hovered and selected classes
  • ๐Ÿ’พ Auto-save and manual save (Ctrl+S)
  • ๐Ÿงฝ Flood-fill segmentation with a postprocessing stage of binary hole filling
  • ๐Ÿšซ Right-click erase mode and double-click to clear all

๐Ÿš€ CLI Features

  • โœ… Minimalist Design
  • ๐ŸŽจ Navigate through images using A and D.

๐Ÿ“ฆ Installation

Option 1: Install via pip

pip install tadqeeq

Option 2: Run from source

git clone https://github.com/orbits-it/tadqeeq.git
cd tadqeeq
pip install -r requirements.txt

๐Ÿ› ๏ธ Usage

Import in your code:

from tadqeeq.widgets import ImageAnnotator
from tadqeeq.implementations import ImageAnnotatorWindow

Run CLI tool from command line (if installed via pip):

tadqeeq [--void_background] [--verbose] [--autosave] [--use_bounding_boxes] --images <images_directory_path> --classes <class_names_filepath> [--bounding-boxes <bounding_boxes_directory_path>] [--semantic-segments <semantic_segments_directory_path>]

Notes:

  1. Use A and D to navigate through images.
  2. At least one of --bounding-boxes or --semantic-segments must be provided.
  3. The annotation files could either be:

a) PNG for semantic segmentation masks with class-labeled pixels on a white background.
b) txt for YOLO-style bounding boxes formatted as: label_index x_offset y_offset width height.

  1. <class_names_filepath> is a txt file containing a list of a class names used in annotating.
  2. Tool Behavior in Segmentation:
  • If void_background is False:
  • Increments all label values by 1, turning background (255) into 0 and shifting segment labels to start from 1.
  • If void_background is True:
  • Leaves label values unchanged (255 remains as void).
  • Detects boundaries between segments and sets those boundary pixels to 255 (void label).

๐Ÿงญ Controls

Action Mouse / Key
Toggle erase mode Right-click
Draw / Erase Left-click / Drag
Mark Bounding Box / Semantic Segment Double left-click (drawing mode)
Clear all Double right-click
Toggle slider mode Wheel-click
Slide through label classes / Brush widths Scroll wheel
Save manually Ctrl + S
Reveal annotated segment's label name Move cursor over annotation
Navigate between images A / D (keyboard)

๐Ÿ“ Project Structure

root/
โ”œโ”€โ”€ tadqeeq/
|   โ”œโ”€โ”€ __init__.py         # Entry point for importing
|   โ”œโ”€โ”€ widgets.py          # Contains ImageAnnotator class
|   โ”œโ”€โ”€ utils.py            # Helper methods (flood fill, bounding box logic)
|   |
|   โ”œโ”€โ”€ implementations.py  # Provides a complete, minimal working example of how to integrate the ImageAnnotator 
โ”‚   โ”‚                       # within an annotation pipeline. These implementation objects are intended to be 
โ”‚   โ”‚                       # used as-is and should not be modified directly in other applications.
|   |
|   โ””โ”€โ”€ cli.py              # Entry point for a full annotation solution utilizing the code in `implementations.py`
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ requirements.txt

๐Ÿง‘โ€๐Ÿ’ป Contributing

Repository

Pull requests are welcome!
If you add features (e.g. COCO export, brush tools, batch processing), please document them in the README.


๐Ÿ“„ License

This project is licensed under the MIT License.
See LICENSE for the full license text.


๐Ÿ’ก Acknowledgements

๐ŸŽ‰ Built for computer vision practitioners needing fast, mouse-based labeling with clean overlays and autosave logic.

๐ŸŒŸ Special thanks to PyQt5 for providing the powerful and flexible GUI toolkit that made the development of this interactive image annotator possible.


๐Ÿ”— Related Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tadqeeq-1.11.7.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tadqeeq-1.11.7-py3-none-any.whl (53.5 kB view details)

Uploaded Python 3

File details

Details for the file tadqeeq-1.11.7.tar.gz.

File metadata

  • Download URL: tadqeeq-1.11.7.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for tadqeeq-1.11.7.tar.gz
Algorithm Hash digest
SHA256 27a302f7931935b4cd97e9b83a84d1b42a5e9e4d07979eecde4812238b95a799
MD5 87a5b94c559affdad9c7311d4e4979c5
BLAKE2b-256 2284e50ce0b673dac579dd9d3c26033e57a21e151fbb2ae623574a5be114dfdc

See more details on using hashes here.

File details

Details for the file tadqeeq-1.11.7-py3-none-any.whl.

File metadata

  • Download URL: tadqeeq-1.11.7-py3-none-any.whl
  • Upload date:
  • Size: 53.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for tadqeeq-1.11.7-py3-none-any.whl
Algorithm Hash digest
SHA256 82d71c6f4787422dd8c46467dbf09f7b4ff7a496842679aa458eceacfa04872f
MD5 088a656296abb88da1add120f097ed6c
BLAKE2b-256 246c4075c79af9e3e46c648f220512a45c7f79d63a44f945dd0374526675f497

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page