Skip to content

About

Semi-automated computer vision tool for interactive image segmentation and annotation using region growing, contour extraction, and feature matching.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

Semi-Automated Image Annotation Tool

Team Members: Kyle Theodore, Tuan Minh Dao, Huy Nguyen, Cassio Everling

A semi-automatic computer vision annotation system that enables fast, high-quality object boundary generation using classical vision techniques and interactive user input.

This project demonstrates an end-to-end interactive annotation pipeline combining segmentation, contour extraction, feature matching, and annotation propagation — built collaboratively using Agile development practices.


🚀 Overview

Manual pixel-level annotation is time-consuming, inconsistent, and costly for large datasets.
This tool reduces annotation effort by allowing users to:

  1. Click once inside an object
  2. Automatically generate a refined segmentation mask
  3. Extract a clean object contour
  4. Propagate annotations across similar frames using feature matching

The system prioritizes:

  • Accuracy
  • Interpretability
  • User control
  • No dependency on deep learning training pipelines

🧠 System Architecture

The pipeline consists of:

  1. Edge Detection & Preprocessing
  2. Region-Growing Segmentation
  3. Morphological Mask Refinement
  4. Contour Extraction
  5. Feature Matching & Annotation Propagation
  6. Interactive GUI Integration

Each module is independently implemented and integrated into a PyQt5-based interface.


🛠 Tech Stack

Core Technologies

  • Python 3
  • OpenCV (including SIFT via opencv-contrib)
  • NumPy
  • SciPy
  • scikit-image
  • Pandas

GUI

  • PyQt5

Feature Matching

  • SIFT (Scale-Invariant Feature Transform)
  • RANSAC (Affine transformation estimation)

Image Processing

  • Canny Edge Detection
  • Sobel Edge Detection
  • Iterative Canny
  • Morphological Closing / Opening
  • Region Growing Segmentation
  • Contour Extraction (cv2.findContours)

Dependencies listed in requirements.txt.


✨ Key Features

1️⃣ Edge Detection Module

  • Default: Canny + Gaussian smoothing (σ = 1.5)
  • Optional: Sobel, Iterative Canny
  • Morphological cleanup for edge gap reduction
  • Adjustable thresholds via GUI sliders

Quantitative Results (Edge Completeness):

  • Canny: 67%
  • Sobel: 45%
  • Iterative Canny: 55%

2️⃣ Interactive Region-Growing Segmentation

  • Seed-based segmentation (user click)
  • Supports grayscale and RGB similarity metrics
  • Adjustable threshold
  • Boundary protection & region size limits
  • Multi-click correction (logical OR mask merging)

Mean Segmentation Performance:

  • IoU: 0.9675
  • Accuracy: 0.9944
  • Precision: 0.9811
  • Recall: 0.9857
  • F1: 0.9833

3️⃣ Morphological Mask Cleanup

  • Closing (gap filling)
  • Opening (noise removal)
  • Produces smooth, continuous masks

4️⃣ Contour Extraction

  • Largest contour containing seed selected
  • Clean boundary overlay
  • Compact representation for propagation

5️⃣ Annotation Propagation (Non-ML Approach)

Instead of training-heavy models, propagation uses:

  • SIFT feature extraction
  • Mask-filtered keypoints
  • RANSAC affine transformation (100 iterations, 1.0 inlier threshold)
  • Semantic validation layer to select best transformation

This allows annotation transfer across frames without requiring dataset training.


🖥 GUI Capabilities

  • Load image or video frames
  • Toggle edge maps, masks, contour overlays
  • Click-based segmentation
  • Multi-seed correction
  • Threshold tuning sliders
  • Save segmentation mask
  • Load next frame for propagation
  • Save propagated annotations

📊 Performance Summary

Segmentation

Strong performance across varied objects with high IoU and F1.

Propagation

Works well for:

  • High-detail textured objects (books, controllers)

Limitations:

  • Low-texture surfaces (e.g., smooth knives)
  • Cluttered backgrounds
  • Large object displacement

These limitations are consistent with classical CV constraints.


🏗 Agile Development Approach

This project was developed collaboratively by four engineers using Agile practices:

  • Modular architecture design
  • Independent feature modules (preprocessing, segmentation, propagation)
  • Pull request workflow & branch management
  • Iterative feature refinement
  • Parameter experimentation & benchmarking
  • Integrated GUI testing

The repository reflects real-world team collaboration, including commit history, merges, and iterative improvements.


Installation

pip install -r requirements.txt

Running the Application

python main.py

Running the test

Test edge detection

python tests/test_preprocessing.py

Test object segmantation

python tests/test_segmantation.py input_image.png

Test propagation

python tests/test_propagation.py

About

Semi-automated computer vision tool for interactive image segmentation and annotation using region growing, contour extraction, and feature matching.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages