SIGtor - A state-of-the-art offline copy-paste augmentation tool for generating synthetic training datasets for object detection and segmentation. No GANs, no deep learning models required - just pure image processing for realistic data augmentation.
Keywords: object detection data augmentation copy-paste augmentation synthetic dataset generation YOLO COCO Pascal VOC computer vision deep learning dataset balancing image segmentation bounding box generation offline augmentation no-GAN augmentation
SIGtor is a powerful, production-ready tool for generating synthetic training datasets for object detection and segmentation tasks. It uses an advanced copy-paste augmentation approach to create new images by intelligently combining objects from existing datasets with various backgrounds, while automatically generating accurate bounding boxes and segmentation masks. Perfect for researchers, ML engineers, and data scientists working with YOLO, Faster R-CNN, Mask R-CNN, and other object detection frameworks.
Run without installation (from project root):
python3 -m sigtor.scripts.generate # Generate images
python3 -m sigtor.scripts.expand # Expand annotations
python3 -m sigtor.scripts.visualize # Visualize results
python3 -m sigtor.scripts.analyze # Analyze dataset quality
python3 -m sigtor.scripts.merge # Merge annotationsRun with installation (after pip install -e .):
sigtor # Generate images
sigtor-expand # Expand annotations
sigtor-visualize # Visualize results
sigtor-analyze # Analyze dataset quality
sigtor-merge # Merge annotations- Advanced Copy-Paste Augmentation: Intelligently combines objects from source images onto new backgrounds with seamless blending
- Automatic Annotation: Generates YOLO-format annotations with bounding boxes and segmentation masks
- Flexible Configuration: YAML-based configuration system for easy customization
- Adaptive Blending Methods: Context-aware selection of blending techniques (seamless cloning, Poisson blending, alpha blending, soft pasting)
- Context-Aware Augmentations: Dynamic augmentation selection based on object-background compatibility analysis
- Advanced Edge Refinement: Multi-scale edge detection and distance transform-based boundary smoothing
- Color Harmonization: Histogram matching and lighting consistency adjustment for realistic compositions
- Multi-Stage Post-Processing: Comprehensive pipeline for artifact reduction and visual quality enhancement
- Object Augmentation: Applies geometric and morphological transformations to increase dataset diversity
- Background Support: Works with custom background images or generates plain backgrounds
- Quality Validation: Optional image quality checks and validation
- Dataset Analysis: Comprehensive analysis tool for class distribution, size distribution, imbalance detection, and quality metrics
- Format Conversion Tools: Includes utilities to convert between Pascal VOC, COCO, and YOLO formats
- Python 3.7 or higher
- See
requirements.txtfor full list of dependencies
You can run SIGtor directly from the project directory without installing:
# Clone the repository
git clone https://github.com/solomontesema/sigtor.git
cd sigtor
# Install dependencies only
pip install -r requirements.txt
# Run scripts directly using Python module syntax (from project root)
python3 -m sigtor.scripts.generate
python3 -m sigtor.scripts.expand
python3 -m sigtor.scripts.visualizeImportant: Always run these commands from the project root directory (where setup.py is located) so Python can properly import the sigtor package.
For convenient CLI commands, install the package:
# Clone the repository
git clone https://github.com/solomontesema/sigtor.git
cd sigtor
# Install dependencies and package
pip install -r requirements.txt
pip install -e .
# Then you can use CLI commands
sigtor
sigtor-expand
sigtor-visualizeNote: If CLI commands are not found after installation, add ~/.local/bin to your PATH or use the Python module syntax from Option 1.
Your dataset should be annotated in YOLO format:
./Datasets/Source/Images/image1.jpg x1,y1,x2,y2,class_id x1,y1,x2,y2,class_id ...
Copy the example configuration file and edit it:
cp config.yaml.example config.yamlEdit config.yaml with your paths:
SIGtor:
source_ann_file: "./Datasets/Source/source_annotations.txt"
destn_dir: "./Datasets/SIGtored/"
mask_image_dirs: "./Datasets/Source/Masks"
bckgrnd_imgs_dir: "./Datasets/BackgroundImages"
classnames_file: "./Datasets/voc_classes.txt"
total_new_imgs: 100This step identifies overlapping objects and creates separate annotation lines.
Without installation:
python3 -m sigtor.scripts.expandWith installation:
sigtor-expandOr with custom config:
# Without installation
python3 -m sigtor.scripts.expand --config config.yaml --source_ann_file ./Datasets/Source/annotations.txt
# With installation
sigtor-expand --config config.yaml --source_ann_file ./Datasets/Source/annotations.txtWithout installation:
python3 -m sigtor.scripts.generateWith installation:
sigtorOr with command-line arguments:
# Without installation
python3 -m sigtor.scripts.generate --source_ann_file ./Datasets/Source/annotations.txt --total_new_imgs 500
# With installation
sigtor --source_ann_file ./Datasets/Source/annotations.txt --total_new_imgs 500Test and visualize the generated images:
Without installation:
python3 -m sigtor.scripts.visualize --source_ann_file ./Datasets/SIGtored/sigtored_annotations.txtWith installation:
sigtor-visualize --source_ann_file ./Datasets/SIGtored/sigtored_annotations.txtUse the analysis tool to understand dataset characteristics:
python3 -m sigtor.scripts.analyze
# or
sigtor-analyzeThis generates comprehensive statistics, visualizations, and reports about class distribution, object sizes, spatial distribution, and imbalance metrics. See the Dataset Analysis section for details.
Combine your source and SIGtored annotations into a single file for training:
python3 -m sigtor.scripts.merge
# or
sigtor-mergeThis merges the original dataset annotations with SIGtored synthetic annotations into one combined file, optionally shuffled for better training distribution. The output is saved to ./Datasets/Combined/combined_annotations.txt by default.
SIGtor uses a YAML configuration file (config.yaml) with three main sections:
Main configuration for image generation:
source_ann_file: Path to source annotation filedestn_dir: Output directory for generated imagesmask_image_dirs: Directory containing segmentation masks (optional)bckgrnd_imgs_dir: Directory with background images (optional)classnames_file: Path to file with class namestotal_new_imgs: Number of synthetic images to generatemax_search_iterations: Maximum iterations for object selectionblending_method: Blending method ('auto' for adaptive selection, or specific method)enable_post_processing: Enable multi-stage post-processing (true/false)edge_refinement_level: Edge refinement level ('low', 'medium', 'high')color_harmonization: Enable color harmonization between objects and background (true/false)context_aware_augmentations: Enable context-aware augmentations (true/false)quality_validation: Enable quality validation after generation (true/false)quality_reject_threshold: Quality rejection threshold ('none', 'critical', 'all')
Configuration for visualization:
source_ann_file: Annotation file to visualizeclassnames_file: Class names fileoutput_dir: Directory for output imagesnum_test_images: Number of images to visualize ("All" or integer)
Configuration for dataset analysis:
source_ann_file: Path to source annotation file (before SIGtoring)sigtored_ann_file: Path to SIGtored annotation file (after SIGtoring)classnames_file: Path to class names fileoutput_dir: Directory to save analysis reports and visualizationsgenerate_plots: Generate visualization plots (true/false)generate_report: Generate text and JSON reports (true/false)comparison_mode: Compare source vs SIGtored datasets (true/false)
Configuration for merging annotations:
source_ann_file: Path to source annotation file (original dataset)sigtored_ann_file: Path to SIGtored annotation file (synthetic dataset)output_file: Output path for combined annotations (default:./Datasets/Combined/combined_annotations.txt)shuffle: Shuffle/randomize combined annotations (true/false)
Configuration for annotation expansion:
source_ann_file: Source annotation fileiou_threshold: IoU threshold for determining inner bounding boxes (0.0-1.0)
See config.yaml.example for a complete example with comments.
SIGtor generates synthetic images through the following process:
- Input Selection: Randomly selects source images and their masks from the dataset
- Background Preparation: Chooses a background image (or generates a plain one) and resizes it
- Context Analysis: Analyzes background characteristics (lighting, color, texture) for compatibility assessment
- Object Selection: Selects object cutouts, applies context-aware augmentations, and continues until coverage threshold is met (default 80% IoL)
- Object Placement: Strategically places objects on the background to maximize space utilization without overlap
- Edge Refinement: Applies advanced edge detection and boundary smoothing to eliminate artifacts
- Adaptive Blending: Selects optimal blending method based on object-background compatibility
- Color Harmonization: Matches object colors and lighting to background context
- Post-Processing: Multi-stage pipeline for artifact reduction and quality enhancement
- Annotation Generation: Creates YOLO-format annotations with accurate bounding boxes and segmentation masks
- Quality Validation: Optional validation of generated image quality
- Output: Saves the composite image, mask, and annotation
SIGtor/
├── sigtor/ # Main package
│ ├── core/ # Core functionality
│ │ ├── generator.py # Image generation logic with quality validation
│ │ ├── expander.py # Annotation expansion
│ │ └── visualizer.py # Visualization
│ ├── processing/ # Image/data processing
│ │ ├── data_processing.py # Object selection and placement
│ │ ├── augmentation.py # Context-aware augmentations
│ │ ├── image_composition.py # Blending and composition
│ │ ├── image_postprocessing.py # Multi-stage post-processing
│ │ ├── edge_refinement.py # Advanced edge processing
│ │ ├── color_harmonization.py # Color matching and harmonization
│ │ ├── context_analysis.py # Background/object analysis
│ │ └── adaptive_blending.py # Context-aware blending selection
│ ├── utils/ # Utility modules
│ │ ├── config.py
│ │ ├── file_ops.py
│ │ ├── image_utils.py
│ │ ├── data_utils.py
│ │ └── index_generator.py
│ ├── analysis/ # Dataset analysis
│ │ ├── dataset_analyzer.py # Core statistics extraction
│ │ ├── report_generator.py # Text and JSON report generation
│ │ └── visualizer.py # Plot generation for analysis
│ └── scripts/ # CLI scripts
│ ├── analyze.py # Dataset analysis CLI
│ ├── generate.py
│ ├── expand.py
│ └── visualize.py
├── Datasets/ # User data (not in repo)
│ ├── Source/
│ │ ├── Images/
│ │ ├── Masks/
│ │ └── annotations.txt
│ ├── BackgroundImages/
│ └── SIGtored/
├── tools/ # Format conversion utilities
├── tests/ # Test suite
├── docs/ # Documentation and examples
│ └── misc/ # Example images
├── examples/ # Example notebooks and scripts
│ ├── demo.ipynb
│ └── download_background_images.py
├── config.yaml.example # Configuration template
├── setup.py
├── requirements.txt
└── README.md
The tools/ directory contains utilities for format conversion:
voc_annotation.py: Pascal VOC format utilitiescoco_annotation.py: COCO format utilitiesvoc_to_darknet.py: Convert VOC to YOLO formatcoco_to_pascal_voc.py: Convert COCO to Pascal VOCpascal_voc_to_coco.py: Convert Pascal VOC to COCO
Background images are optional but recommended for more realistic results. You can:
- Download images manually and place them in
Datasets/BackgroundImages/ - Use the provided script:
python3 examples/download_background_images.py
Important: Manually review and remove any background images that contain objects from your dataset classes to avoid introducing unannotated objects.
SIGtor can be run in two ways:
Run scripts directly using Python's module syntax from the project root directory:
# Make sure you're in the project root directory
cd /path/to/sigtor
# Generate synthetic images
python3 -m sigtor.scripts.generate [OPTIONS]
# Expand annotations
python3 -m sigtor.scripts.expand [OPTIONS]
# Visualize results
python3 -m sigtor.scripts.visualize [OPTIONS]
# Analyze dataset quality
python3 -m sigtor.scripts.analyze [OPTIONS]
# Merge annotations
python3 -m sigtor.scripts.merge [OPTIONS]Note: Always run these commands from the project root directory (where setup.py and README.md are located) so Python can find the sigtor package.
If you've installed the package (pip install -e .), you can use CLI commands:
# Generate synthetic images
sigtor [OPTIONS]
# Expand annotations
sigtor-expand [OPTIONS]
# Visualize results
sigtor-visualize [OPTIONS]
# Analyze dataset quality
sigtor-analyze [OPTIONS]
# Merge annotations
sigtor-merge [OPTIONS]All commands support the following command-line arguments (override config file settings):
Generate Images:
[--config CONFIG] [--source_ann_file PATH] [--destn_dir PATH]
[--mask_image_dirs PATH] [--bckgrnd_imgs_dir PATH] [--total_new_imgs N]Expand Annotations:
[--config CONFIG] [--source_ann_file PATH] [--iou_threshold FLOAT]Visualize:
[--config CONFIG] [--source_ann_file PATH] [--classnames_file PATH]
[--output_dir PATH] [--num_test_images N]Analyze Dataset:
[--config CONFIG] [--source_ann_file PATH] [--sigtored_ann_file PATH]
[--classnames_file PATH] [--output_dir PATH] [--generate_plots true/false]
[--generate_report true/false] [--comparison_mode true/false]Merge Annotations:
[--config CONFIG] [--source_ann_file PATH] [--sigtored_ann_file PATH]
[--output_file PATH] [--shuffle true/false]You can also use SIGtor as a Python package:
from sigtor.core import generate_images, expand_annotations, visualize_annotations
from sigtor.utils.config import load_config, get_config_section
# Load config
config = load_config('config.yaml')
sigtor_config = get_config_section(config, 'SIGtor')
# Use core functions
expand_annotations('annotations.txt', iou_threshold=0.1)
generate_images(args) # args object with configuration
visualize_annotations('annotations.txt', class_names, output_dir='./output/')- Annotation Expansion: Run
sigtor-expandfirst to handle overlapping objects properly - Background Images: Use diverse background images that don't contain objects from your classes
- Class Balance: Monitor class distribution in generated images to avoid over-representation
- Dataset Size: Start with a small number of images to test, then scale up
- Quality Check: Use
sigtor-visualizeto visualize and verify generated images before training - Quality Validation: Enable
quality_validationto automatically detect and optionally reject problematic images
When quality_validation is enabled, SIGtor performs comprehensive quality checks on each generated image:
What It Checks:
- Image Size: Ensures images meet minimum size requirements (default: 100x100 pixels)
- Empty Images: Detects completely empty or corrupted images
- Data Integrity: Checks for NaN (Not a Number) or Inf (Infinity) values that indicate processing errors
- Data Type: Validates that images are in the correct format (uint8)
- Suspicious Values: Flags images that are entirely black (mean < 5) or white (mean > 250), which may indicate failures
Rejection Behavior:
The quality_reject_threshold parameter controls what happens when issues are found:
none: Only logs issues to console and quality report. All images are saved regardless of issues.critical(default): Rejects images with critical issues (empty, NaN, Inf, wrong dtype). Non-critical issues (size warnings, suspicious values) are logged but images are still saved.all: Rejects images with any quality issues, including non-critical ones.
Quality Report:
When quality validation is enabled and issues are found, a quality_report.json file is automatically saved in the output directory containing:
- Total number of images validated
- Total issues found
- Number of critical issues
- Number of rejected images
- Detailed log of all issues by image index
Example Usage:
# Log issues but keep all images
quality_validation: true
quality_reject_threshold: "none"
# Reject only critical failures (recommended)
quality_validation: true
quality_reject_threshold: "critical"
# Strict mode - reject any issues
quality_validation: true
quality_reject_threshold: "all"When to Use:
- Development/Testing: Use
quality_reject_threshold: "none"to see what issues occur without losing images - Production: Use
quality_reject_threshold: "critical"to automatically filter out corrupted images - High-Quality Datasets: Use
quality_reject_threshold: "all"for maximum quality control
SIGtor employs a sophisticated multi-stage pipeline designed to produce high-quality synthetic images with minimal artifacts. The system consists of several interconnected modules:
The context analysis module (context_analysis.py) extracts comprehensive characteristics from both objects and backgrounds:
- Lighting Analysis: Computes brightness, contrast, and color temperature using LAB color space transformations
- Color Analysis: Extracts mean color, standard deviation, dominant color palette, and saturation metrics
- Texture Analysis: Quantifies texture complexity, edge density, and smoothness using Laplacian variance and Canny edge detection
- Compatibility Scoring: Computes multi-dimensional compatibility scores between objects and backgrounds based on lighting, color, and texture characteristics
The compatibility score
where each component is normalized to [0, 1] based on feature differences.
The edge refinement module (edge_refinement.py) implements advanced boundary processing techniques:
- Multi-Scale Edge Detection: Uses Canny edge detection at multiple scales (1.0x, 0.5x, 2.0x) with adaptive thresholding based on image statistics
- Distance Transform: Computes distance from boundaries using Euclidean distance transform to create smooth transition zones
-
Adaptive Feathering: Dynamically adjusts feather radius based on object size and edge strength:
$$r_{feather} = r_{base} \cdot (1 + \alpha \cdot \frac{A_{object}}{A_{image}}) \cdot (1 - \beta \cdot E_{strength})$$ where$\alpha$ and$\beta$ are sensitivity parameters,$A$ represents area, and$E_{strength}$ is normalized edge strength - Morphological Refinement: Applies edge-aware morphological operations (erosion, dilation) with iteration counts adjusted based on local edge characteristics
The color harmonization module (color_harmonization.py) ensures visual consistency between objects and backgrounds:
-
Histogram Matching: Performs histogram matching in LAB color space, preserving perceptual uniformity:
$$L'{obj} = (L{obj} - \mu_{L,obj}) \cdot \frac{\sigma_{L,bg}}{\sigma_{L,obj}} + \mu_{L,bg}$$
where
$\mu$ and$\sigma$ represent mean and standard deviation of the L channel -
Local Color Transfer: Applies color transfer in boundary regions using distance-weighted blending:
$$I_{final}(p) = w(p) \cdot I_{obj}(p) + (1-w(p)) \cdot I_{matched}(p)$$ where$w(p)$ is a distance-based weight function - Lighting Consistency: Matches brightness, contrast, and color temperature by adjusting LAB channels independently
- Color Temperature Adjustment: Estimates and adjusts color temperature using A and B channel statistics in LAB space
The adaptive blending module (adaptive_blending.py) selects optimal blending methods based on context analysis:
Method Selection Algorithm:
- Compute compatibility score
$C$ between object and background - Analyze edge density difference
$\Delta E = |E_{obj} - E_{bg}|$ - Compute color variance ratio
$R_{var} = \frac{Var_{obj}}{Var_{bg}}$
Decision Rules:
- If
$C > 0.75$ and$\Delta E < 0.05$ : Use Normal Clone (high compatibility, similar edges) - If
$\Delta E > 0.1$ : Use Soft Paste with adaptive feathering (high edge difference) - If
$C < 0.5$ : Use Harmonized Soft Paste (low compatibility requires color adjustment) - If
$|C_{texture,obj} - C_{texture,bg}| < 0.2$ : Use Normal Clone (similar texture complexity) - Default: Soft Paste with size-adaptive feathering
Available Blending Methods:
- Seamless Cloning: OpenCV's seamless clone with Normal, Mixed, or Monochrome Transfer modes
- Poisson Blending: Gradient-domain blending using biharmonic inpainting
- Soft Paste: Gaussian-blurred alpha blending with adaptive feather radius
- Alpha Blending: Weighted combination with configurable alpha values
The augmentation module (augmentation.py) applies intelligent transformations based on background context:
Augmentation Selection Process:
- Analyze object and background contexts
- Compute compatibility scores
- Generate augmentation suggestions:
- Brightness adjustment:
$\Delta B = B_{bg} - B_{obj}$ - Contrast adjustment:
$\Delta C = C_{bg} - C_{obj}$ - Color temperature adjustment:
$\Delta T = T_{bg} - T_{obj}$ - Saturation adjustment:
$\Delta S = S_{bg} - S_{obj}$
- Brightness adjustment:
- Apply suggested augmentations with smooth transitions
Augmentation Types:
- Geometric: Scaling, flipping, rotation
- Photometric: Brightness, contrast, saturation, color temperature
- Morphological: Blur (texture complexity matching)
- Combined: Multi-stage augmentation pipeline
The post-processing module (image_postprocessing.py) implements a five-stage enhancement pipeline:
Stage 1: Edge Refinement
- Applies multi-scale edge detection
- Refines mask boundaries using distance transform
- Creates smooth edge transitions
Stage 2: Color Harmonization
- Matches object colors to background (if enabled)
- Applies local color transfer at boundaries
- Adjusts lighting consistency
Stage 3: Edge Blending
- Creates gradient alpha masks
- Applies smooth blending at boundaries
- Reduces visible seams
Stage 4: Global Enhancement
- Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) to L channel
- Enhances contrast while preserving natural appearance
- Operates in LAB color space for perceptual uniformity
Stage 5: Final Smoothing
- Applies light Gaussian blur to reduce artifacts
- Preserves image sharpness while smoothing transitions
The complete SIGtor pipeline can be formalized as follows:
Algorithm: SIGtor Image Generation
-
Input: Source annotations
$A$ , background directory$B$ , configuration$C$ -
Initialize: Target size
$T$ , object list$O = \emptyset$ -
While
$IoL(O) < 0.8$ and iterations$< max_iter$ :- Select source annotation
$a_i$ from$A$ - Extract object
$o_i$ with mask$m_i$ - Analyze background context
$\Gamma_{bg}$ - Apply context-aware augmentations:
$o_i' = Augment(o_i, \Gamma_{bg})$ - Add to
$O$ :$O = O \cup {o_i'}$ - Update target size:
$T = Recalculate(O)$
- Select source annotation
-
Place objects: Compute coordinates
$P = PlaceObjects(O, T)$ - Select background: $bg = SelectBackground(B, T)$
-
For each object
$o_i$ in$O$ :- Refine mask:
$m_i' = RefineEdges(m_i, o_i)$ - Analyze contexts:
$\Gamma_{obj}, \Gamma_{bg}$ - Select blending method: $M = SelectBlending(\Gamma_{obj}, \Gamma_{bg})$
- Harmonize colors:
$o_i'' = Harmonize(o_i', bg, m_i')$ - Blend:
$I = Blend(o_i'', bg, m_i', M)$
- Refine mask:
-
Post-process:
$I_{final} = PostProcess(I, m, bg)$ -
Validate:
$Q = ValidateQuality(I_{final})$ -
Output: Image
$I_{final}$ , mask$m$ , annotations$A_{final}$
-
Computational Complexity:
$O(n \cdot (E + H + B + P))$ where$n$ is number of objects,$E$ is edge refinement,$H$ is color harmonization,$B$ is blending, and$P$ is post-processing - Memory Requirements: Linear with image size and number of objects
- Quality Metrics: Compatibility scores, edge smoothness, color consistency
- Scalability: Efficient for batch processing with configurable quality/performance trade-offs
Advanced users can fine-tune SIGtor behavior through configuration parameters:
-
Edge Refinement Level: Controls computational intensity vs. quality trade-off
low: Fast processing, basic edge smoothingmedium: Balanced quality and performance (default)high: Maximum quality, slower processing
-
Blending Method: Manual override or adaptive selection
auto: Context-aware automatic selection (recommended)- Specific methods:
SoftPaste,NormalClone,MixedClone,MonochromeTransfer,AlphaBlend
-
Post-Processing: Multi-stage enhancement pipeline
- Can be disabled for faster generation
- Individual stages can be configured
-
Context-Aware Augmentations: Enable/disable intelligent augmentation selection
- When enabled, augmentations adapt to background characteristics
- When disabled, uses heuristic-based augmentations
- SIGtor is an offline dataset generator, not a real-time augmentation tool
- Contextual relationships between objects are not preserved (objects are placed independently)
- Requires YOLO-format annotations as input
- Computational cost increases with higher refinement levels and post-processing enabled
- Quality depends on source image and mask quality
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.txt file for details.
SIGtor is ideal for:
- Research: Generate balanced datasets for academic research in computer vision
- Industry: Create training data for production object detection systems
- Data Scarcity: Augment small datasets to improve model performance
- Class Balancing: Address imbalanced datasets by generating more samples for underrepresented classes
- Domain Adaptation: Create synthetic data for specific domains (autonomous vehicles, surveillance, etc.)
- Rapid Prototyping: Quickly generate diverse training data without manual annotation
- YOLO Training: Perfect companion for YOLOv3, YOLOv4, YOLOv5, YOLOv8 training
- COCO/VOC Datasets: Extend existing COCO or Pascal VOC datasets with synthetic samples
SIGtor is unique in that it:
- ✅ No GANs required - Pure image processing approach
- ✅ Offline operation - No internet or cloud services needed
- ✅ Automatic annotations - Generates bounding boxes and masks automatically
- ✅ Context-aware - Intelligent blending and augmentation selection
- ✅ Production-ready - Quality validation and comprehensive error handling
Similar tools: Mixup, CutMix, Simple Copy-Paste, Albumentations (but SIGtor is specialized for offline copy-paste with automatic annotation generation)
If you use SIGtor in your research, please cite:
@software{sigtor2024,
title={SIGtor: Supplementary Synthetic Image Generation for Object Detection and Segmentation},
author={Tesema, Solomon Negussie},
year={2024},
url={https://github.com/solomontesema/sigtor},
keywords={object detection, data augmentation, synthetic dataset generation}
}SIGtor represents a significant advancement in offline copy-paste augmentation for object detection and segmentation. The system addresses key limitations of traditional copy-paste methods:
- Artifact Reduction: Advanced edge refinement and color harmonization eliminate visible boundaries that can cause model overfitting
- Context Awareness: Dynamic augmentation and blending selection based on object-background compatibility ensures realistic compositions
- Quality Assurance: Multi-stage post-processing pipeline and optional quality validation ensure production-ready outputs
- Flexibility: Configurable pipeline allows balancing quality and performance for different use cases
- Multi-Scale Edge Refinement: Distance transform-based boundary smoothing with adaptive feathering
- Context-Aware Augmentation: Intelligent augmentation selection based on compatibility analysis
- Adaptive Blending Selection: Automatic method selection based on object-background characteristics
- Color Harmonization Pipeline: Histogram matching and lighting consistency in perceptually uniform color space
- Multi-Stage Post-Processing: Comprehensive artifact reduction while preserving image quality
Potential enhancements for future versions:
- Real-time augmentation during training
- Deep learning-based blending methods
- Semantic-aware object placement
- 3D-aware composition for perspective correction
- Style transfer integration
- GAN-based refinement for photorealistic results
SIGtor was developed to address the challenge of creating large, diverse training datasets for object detection and segmentation tasks. The copy-paste augmentation approach has been shown to be effective in improving model performance. The advanced techniques implemented in SIGtor further enhance this effectiveness by reducing artifacts and ensuring visual consistency.
For questions, issues, or contributions, please open an issue on GitHub.
Star this repository ⭐ if you find SIGtor useful for your research or projects!