Skip to content

Feat/add least squares correction#2

Merged
agfianf merged 5 commits intomainfrom
feat/add-least-squares-correction
Jan 25, 2025
Merged

Feat/add least squares correction#2
agfianf merged 5 commits intomainfrom
feat/add-least-squares-correction

Conversation

@agfianf
Copy link
Owner

@agfianf agfianf commented Jan 25, 2025

Add least squares to the Color Correction Module

This pull request introduces several exciting updates to the color correction module. Below is a summary of the key changes, new features, and improvements:


🚀 Dependencies

  • Added shapely: For geometric operations and calculations.
  • Added colour-science: For advanced color science calculations.
    Both dependencies have been included in pyproject.toml.

✨ Core Functionality

  • BaseComputeCorrection Abstract Class:
    Defines the foundation for implementing various color correction techniques.
    Code Ref

  • LeastSquaresRegression Class:
    Implements color correction using least squares regression for accurate and robust adjustments.
    Code Ref


🖼️ Color Correction Service

  • New ColorCorrection Class:
    Centralizes all color correction tasks, including:

    • Extracting color patches from detected regions.
    • Fitting correction models to align colors.
    • Applying corrections to input images.
    • Calculating and analyzing color differences.

    Find the implementation in color_correction.py.


🛠️ Utility Functions

  • Geometry Utilities (in geometry_processing.py):

    • Calculate IoU (Intersection over Union).
    • Convert between box formats.
    • Suggest missing patch coordinates for incomplete detections.
  • Image Processing Utilities (in image_processing.py):

    • Crop regions with custom margins.
    • Compute mean RGB values from patches.
    • Generate image patches and display grids for visualization.

🔧 Minor Fixes

  • Removed an unused debug print statement in the nms function within yolo_utils.py. 🧹

@agfianf agfianf merged commit d69c03e into main Jan 25, 2025
3 checks passed
@agfianf agfianf deleted the feat/add-least-squares-correction branch January 25, 2025 04:38
@agfianf agfianf self-assigned this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant