diff --git a/.coveragerc b/.coveragerc index 5c3313c..8452ef8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,6 @@ [run] -source = color_correction_asdfghjkl +source = color_correction omit = tests/* diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f78fc3..c3c1e09 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish Python Package to PyPI +name: ๐Ÿ“ฆ Publish Python Package to PyPI on: push: @@ -9,26 +9,25 @@ jobs: publish: runs-on: ubuntu-latest steps: - - name: Clone repository + - name: ๐Ÿ“ฅ Checkout repository uses: actions/checkout@v4 - - - name: Install uv and set the python version + + - name: ๐Ÿ Install uv and set the python version uses: astral-sh/setup-uv@v5 with: - version: "0.5.23" enable-cache: true cache-dependency-glob: "uv.lock" python-version: 3.12 - - name: Extract version from Git tag + - name: ๐Ÿท๏ธ Extract version from Git tag id: get_version run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV - - - name: Clear directory + + - name: ๐Ÿงน Clear directory run: rm -rf dist - - name: Build package + - name: ๐Ÿ”จ Build package run: uv build - - name: Publish to PyPI + - name: ๐Ÿš€ Publish to PyPI run: uv publish --token ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cd7f010..394eac7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,20 @@ -name: Test +name: ๐Ÿงช Test on: pull_request: branches: [ main ] + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE' + - '.gitignore' + - '.pre-commit-config.yaml' + - 'mkdocs.yml' + - 'docs_requirements.txt' jobs: test: - name: Test + name: ๐Ÿงช Test runs-on: ${{ matrix.os }} strategy: matrix: @@ -17,23 +25,23 @@ jobs: - "3.12" steps: - - uses: actions/checkout@v4 + - name: ๐Ÿ“ฅ Checkout repository + uses: actions/checkout@v4 - - name: Install uv and set the python version + - name: ๐Ÿ Install uv and set the python version uses: astral-sh/setup-uv@v5 with: - version: "0.5.24" enable-cache: true cache-dependency-glob: "uv.lock" python-version: ${{ matrix.python-version }} - - name: Install the project + - name: ๐Ÿ“ฆ Install the project run: uv sync --all-groups --no-group dev-model - - name: Checking linter and formatting + - name: ๐Ÿ” Checking linter and formatting run: uvx ruff check - - name: Run tests with Coverage + - name: ๐Ÿ“Š Run tests with Coverage run: | - uv run pytest --cov-report=term-missing --cov=color_correction_asdfghjkl tests/ + uv run pytest --cov-report=term-missing --cov=color_correction tests/ uv run coverage report --fail-under=35 diff --git a/.gitignore b/.gitignore index 6267f05..5b2915f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ wheels/ tmp/ zzz/ -color_correction_asdfghjkl/asset/images/ +color_correction/asset/images/ diff --git a/Makefile b/Makefile index 4479202..3a6341f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ yolo-export-onnx: yolo export \ - model=color_correction_asdfghjkl/asset/.model/yv8-det.pt \ + model=color_correction/asset/.model/yv8-det.pt \ format=onnx \ device=mps \ simplify=True \ diff --git a/README.md b/README.md index 145ae53..b6d55f7 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,24 @@ -# ๐ŸŽจ Color Correction +
-> **Note:** The "asdfghjkl" is just a placeholder due to some naming difficulties. +# Color Correction + +
+ +[![version](https://badge.fury.io/py/color-correction.svg)](https://badge.fury.io/py/color-correction) +[![downloads](https://img.shields.io/pypi/dm/color-correction)](https://pypistats.org/packages/color-correction) +[![python-version](https://img.shields.io/pypi/pyversions/color-correction)](https://badge.fury.io/py/color-correction) + +
+ +> _Package formerly published as [`color-correction-asdfghjkl`](https://pypi.org/project/color-correction-asdfghjkl/) on PyPI. The name has been simplified for better accessibility and professional recognition._ This package is designed to perform color correction on images using the Color Checker Classic 24 Patch card. It provides a robust solution for ensuring accurate color representation in your images. ## ๐Ÿ“ฆ Installation ```bash -pip install color-correction-asdfghjkl +pip install color-correction ``` ## ๐Ÿ‹๏ธโ€โ™€๏ธ How it works @@ -18,6 +28,8 @@ pip install color-correction-asdfghjkl ## โšก How to use ```python +from color_correction import ColorCorrection + # Step 1: Define the path to the input image image_path = "asset/images/cc-19.png" @@ -49,31 +61,40 @@ corrected_image = color_corrector.predict( eval_result = color_corrector.calc_color_diff_patches() print(eval_result) ``` -- Output evaluation result: - ```json - { - "initial": { - "min": 2.254003059526461, - "max": 13.461066402633447, - "mean": 8.3072755187654, - "std": 3.123962754767539, - }, - "corrected": { - "min": 0.30910031798755183, - "max": 5.422311999126372, - "mean": 1.4965478752947827, - "std": 1.2915738724958112, - }, - "delta": { - "min": 1.9449027415389093, - "max": 8.038754403507074, - "mean": 6.810727643470616, - "std": 1.8323888822717276, - }, - } - ``` -- Sample output debug image (polynomial degree=2): - ![Sample Output](assets/sample-output-debug.jpg) + +
+Sample Evaluation Output + +```json +{ + "initial": { + "min": 2.254003059526461, + "max": 13.461066402633447, + "mean": 8.3072755187654, + "std": 3.123962754767539, + }, + "corrected": { + "min": 0.30910031798755183, + "max": 5.422311999126372, + "mean": 1.4965478752947827, + "std": 1.2915738724958112, + }, + "delta": { + "min": 1.9449027415389093, + "max": 8.038754403507074, + "mean": 6.810727643470616, + "std": 1.8323888822717276, + }, +} +``` +
+ +
+Sample Output Debug Image + +![Sample Output](assets/sample-output-debug.jpg) + +
## ๐Ÿ“ˆ Benefits - **Consistency**: Ensure uniform color correction across multiple images. @@ -89,6 +110,7 @@ print(eval_result) - [ ] Add more analysis and evaluation metrics (Still thinking...) + ## ๐Ÿ“š References - [Color Checker Classic 24 Patch Card](https://www.xrite.com/categories/calibration-profiling/colorchecker-classic) - [Color Correction Tool ML](https://github.com/collinswakholi/ML_ColorCorrection_tool/tree/Pip_package) diff --git a/color_correction_asdfghjkl/__init__.py b/color_correction/__init__.py similarity index 100% rename from color_correction_asdfghjkl/__init__.py rename to color_correction/__init__.py diff --git a/color_correction_asdfghjkl/constant/color_checker.py b/color_correction/constant/color_checker.py similarity index 100% rename from color_correction_asdfghjkl/constant/color_checker.py rename to color_correction/constant/color_checker.py diff --git a/color_correction_asdfghjkl/constant/yolov8_det.py b/color_correction/constant/yolov8_det.py similarity index 100% rename from color_correction_asdfghjkl/constant/yolov8_det.py rename to color_correction/constant/yolov8_det.py diff --git a/color_correction_asdfghjkl/utils/__init__.py b/color_correction/core/card_detection/__init__.py similarity index 100% rename from color_correction_asdfghjkl/utils/__init__.py rename to color_correction/core/card_detection/__init__.py diff --git a/color_correction_asdfghjkl/core/card_detection/base.py b/color_correction/core/card_detection/base.py similarity index 75% rename from color_correction_asdfghjkl/core/card_detection/base.py rename to color_correction/core/card_detection/base.py index a050e85..b904675 100644 --- a/color_correction_asdfghjkl/core/card_detection/base.py +++ b/color_correction/core/card_detection/base.py @@ -2,7 +2,7 @@ import numpy as np -from color_correction_asdfghjkl.schemas.det_yv8 import DetectionResult +from color_correction.schemas.det_yv8 import DetectionResult class BaseCardDetector(ABC): diff --git a/color_correction_asdfghjkl/core/card_detection/det_yv8_onnx.py b/color_correction/core/card_detection/det_yv8_onnx.py similarity index 92% rename from color_correction_asdfghjkl/core/card_detection/det_yv8_onnx.py rename to color_correction/core/card_detection/det_yv8_onnx.py index ebc5cf7..9183510 100644 --- a/color_correction_asdfghjkl/core/card_detection/det_yv8_onnx.py +++ b/color_correction/core/card_detection/det_yv8_onnx.py @@ -4,10 +4,10 @@ import numpy as np import onnxruntime -from color_correction_asdfghjkl.core.card_detection.base import BaseCardDetector -from color_correction_asdfghjkl.schemas.det_yv8 import DetectionResult -from color_correction_asdfghjkl.utils.downloader import downloader_model_yolov8 -from color_correction_asdfghjkl.utils.yolo_utils import ( +from color_correction.core.card_detection.base import BaseCardDetector +from color_correction.schemas.det_yv8 import DetectionResult +from color_correction.utils.downloader import downloader_model_yolov8 +from color_correction.utils.yolo_utils import ( multiclass_nms, xywh2xyxy, ) @@ -180,9 +180,9 @@ def __get_output_details(self) -> None: if __name__ == "__main__": print("YOLOv8CardDetector") - model_path = "color_correction_asdfghjkl/asset/.model/yv8-det.onnx" - image_path = "color_correction_asdfghjkl/asset/images/cc-1.jpg" - image_path = "color_correction_asdfghjkl/asset/images/Test 19.png" + model_path = "color_correction/asset/.model/yv8-det.onnx" + image_path = "color_correction/asset/images/cc-1.jpg" + image_path = "color_correction/asset/images/Test 19.png" detector = YOLOv8CardDetector(conf_th=0.15, iou_th=0.7, use_gpu=True) input_image = cv2.imread(image_path) diff --git a/color_correction_asdfghjkl/core/card_detection/mcc_det.py b/color_correction/core/card_detection/mcc_det.py similarity index 100% rename from color_correction_asdfghjkl/core/card_detection/mcc_det.py rename to color_correction/core/card_detection/mcc_det.py diff --git a/color_correction/core/correction/__init__.py b/color_correction/core/correction/__init__.py new file mode 100644 index 0000000..d19cc64 --- /dev/null +++ b/color_correction/core/correction/__init__.py @@ -0,0 +1,17 @@ +from color_correction.core.correction._factory import ( + CorrectionModelFactory, +) +from color_correction.core.correction.affine_reg import AffineReg +from color_correction.core.correction.least_squares import ( + LeastSquaresRegression, +) +from color_correction.core.correction.linear_reg import LinearReg +from color_correction.core.correction.polynomial import Polynomial + +__all__ = [ + "CorrectionModelFactory", + "LeastSquaresRegression", + "Polynomial", + "LinearReg", + "AffineReg", +] diff --git a/color_correction_asdfghjkl/core/correction/_factory.py b/color_correction/core/correction/_factory.py similarity index 57% rename from color_correction_asdfghjkl/core/correction/_factory.py rename to color_correction/core/correction/_factory.py index c7d6290..16d796f 100644 --- a/color_correction_asdfghjkl/core/correction/_factory.py +++ b/color_correction/core/correction/_factory.py @@ -1,9 +1,9 @@ -from color_correction_asdfghjkl.core.correction.affine_reg import AffineReg -from color_correction_asdfghjkl.core.correction.least_squares import ( +from color_correction.core.correction.affine_reg import AffineReg +from color_correction.core.correction.least_squares import ( LeastSquaresRegression, ) -from color_correction_asdfghjkl.core.correction.linear_reg import LinearReg -from color_correction_asdfghjkl.core.correction.polynomial import Polynomial +from color_correction.core.correction.linear_reg import LinearReg +from color_correction.core.correction.polynomial import Polynomial class CorrectionModelFactory: diff --git a/color_correction_asdfghjkl/core/correction/affine_reg.py b/color_correction/core/correction/affine_reg.py similarity index 90% rename from color_correction_asdfghjkl/core/correction/affine_reg.py rename to color_correction/core/correction/affine_reg.py index e6f7f32..6e5b123 100644 --- a/color_correction_asdfghjkl/core/correction/affine_reg.py +++ b/color_correction/core/correction/affine_reg.py @@ -3,8 +3,8 @@ import numpy as np from sklearn.linear_model import LinearRegression -from color_correction_asdfghjkl.core.correction.base import BaseComputeCorrection -from color_correction_asdfghjkl.utils.correction import ( +from color_correction.core.correction.base import BaseComputeCorrection +from color_correction.utils.correction import ( postprocessing_compute, preprocessing_compute, ) diff --git a/color_correction_asdfghjkl/core/correction/base.py b/color_correction/core/correction/base.py similarity index 100% rename from color_correction_asdfghjkl/core/correction/base.py rename to color_correction/core/correction/base.py diff --git a/color_correction_asdfghjkl/core/correction/least_squares.py b/color_correction/core/correction/least_squares.py similarity index 89% rename from color_correction_asdfghjkl/core/correction/least_squares.py rename to color_correction/core/correction/least_squares.py index 1375d8e..76beb39 100644 --- a/color_correction_asdfghjkl/core/correction/least_squares.py +++ b/color_correction/core/correction/least_squares.py @@ -2,8 +2,8 @@ import numpy as np -from color_correction_asdfghjkl.core.correction.base import BaseComputeCorrection -from color_correction_asdfghjkl.utils.correction import ( +from color_correction.core.correction.base import BaseComputeCorrection +from color_correction.utils.correction import ( postprocessing_compute, preprocessing_compute, ) diff --git a/color_correction_asdfghjkl/core/correction/linear_reg.py b/color_correction/core/correction/linear_reg.py similarity index 88% rename from color_correction_asdfghjkl/core/correction/linear_reg.py rename to color_correction/core/correction/linear_reg.py index 37db8bc..7ce2795 100644 --- a/color_correction_asdfghjkl/core/correction/linear_reg.py +++ b/color_correction/core/correction/linear_reg.py @@ -3,8 +3,8 @@ import numpy as np from sklearn.linear_model import LinearRegression -from color_correction_asdfghjkl.core.correction.base import BaseComputeCorrection -from color_correction_asdfghjkl.utils.correction import ( +from color_correction.core.correction.base import BaseComputeCorrection +from color_correction.utils.correction import ( postprocessing_compute, preprocessing_compute, ) diff --git a/color_correction_asdfghjkl/core/correction/polynomial.py b/color_correction/core/correction/polynomial.py similarity index 90% rename from color_correction_asdfghjkl/core/correction/polynomial.py rename to color_correction/core/correction/polynomial.py index 50080bc..5df8bf2 100644 --- a/color_correction_asdfghjkl/core/correction/polynomial.py +++ b/color_correction/core/correction/polynomial.py @@ -5,8 +5,8 @@ from sklearn.pipeline import make_pipeline from sklearn.preprocessing import PolynomialFeatures -from color_correction_asdfghjkl.core.correction.base import BaseComputeCorrection -from color_correction_asdfghjkl.utils.correction import ( +from color_correction.core.correction.base import BaseComputeCorrection +from color_correction.utils.correction import ( postprocessing_compute, preprocessing_compute, ) diff --git a/color_correction_asdfghjkl/processor/det_yv8.py b/color_correction/processor/det_yv8.py similarity index 97% rename from color_correction_asdfghjkl/processor/det_yv8.py rename to color_correction/processor/det_yv8.py index bfd0bda..8cfb1af 100644 --- a/color_correction_asdfghjkl/processor/det_yv8.py +++ b/color_correction/processor/det_yv8.py @@ -1,13 +1,13 @@ import cv2 import numpy as np -from color_correction_asdfghjkl.schemas.det_yv8 import DetectionResult -from color_correction_asdfghjkl.utils.geometry_processing import ( +from color_correction.schemas.det_yv8 import DetectionResult +from color_correction.utils.geometry_processing import ( extract_intersecting_patches, generate_expected_patches, suggest_missing_patch_coordinates, ) -from color_correction_asdfghjkl.utils.image_processing import ( +from color_correction.utils.image_processing import ( calc_mean_color_patch, crop_region_with_margin, ) diff --git a/color_correction_asdfghjkl/py.typed b/color_correction/py.typed similarity index 100% rename from color_correction_asdfghjkl/py.typed rename to color_correction/py.typed diff --git a/color_correction_asdfghjkl/schemas/det_yv8.py b/color_correction/schemas/det_yv8.py similarity index 85% rename from color_correction_asdfghjkl/schemas/det_yv8.py rename to color_correction/schemas/det_yv8.py index f6e8724..6d4a3f7 100644 --- a/color_correction_asdfghjkl/schemas/det_yv8.py +++ b/color_correction/schemas/det_yv8.py @@ -1,7 +1,7 @@ import numpy as np from pydantic import BaseModel -from color_correction_asdfghjkl.utils.yolo_utils import draw_detections +from color_correction.utils.yolo_utils import draw_detections BoundingBox = tuple[int, int, int, int] diff --git a/color_correction_asdfghjkl/schemas/device.py b/color_correction/schemas/device.py similarity index 100% rename from color_correction_asdfghjkl/schemas/device.py rename to color_correction/schemas/device.py diff --git a/color_correction_asdfghjkl/services/color_correction.py b/color_correction/services/color_correction.py similarity index 96% rename from color_correction_asdfghjkl/services/color_correction.py rename to color_correction/services/color_correction.py index fdf6ada..f88898a 100644 --- a/color_correction_asdfghjkl/services/color_correction.py +++ b/color_correction/services/color_correction.py @@ -5,18 +5,18 @@ import numpy as np from numpy.typing import NDArray -from color_correction_asdfghjkl.constant.color_checker import reference_color_d50_bgr -from color_correction_asdfghjkl.core.card_detection.det_yv8_onnx import ( +from color_correction.constant.color_checker import reference_color_d50_bgr +from color_correction.core.card_detection.det_yv8_onnx import ( YOLOv8CardDetector, ) -from color_correction_asdfghjkl.core.correction import CorrectionModelFactory -from color_correction_asdfghjkl.processor.det_yv8 import DetectionProcessor -from color_correction_asdfghjkl.utils.image_patch import ( +from color_correction.core.correction import CorrectionModelFactory +from color_correction.processor.det_yv8 import DetectionProcessor +from color_correction.utils.image_patch import ( create_patch_tiled_image, visualize_patch_comparison, ) -from color_correction_asdfghjkl.utils.image_processing import calc_color_diff -from color_correction_asdfghjkl.utils.visualization_utils import ( +from color_correction.utils.image_processing import calc_color_diff +from color_correction.utils.visualization_utils import ( create_image_grid_visualization, ) diff --git a/color_correction/utils/__init__.py b/color_correction/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/color_correction_asdfghjkl/utils/correction.py b/color_correction/utils/correction.py similarity index 100% rename from color_correction_asdfghjkl/utils/correction.py rename to color_correction/utils/correction.py diff --git a/color_correction_asdfghjkl/utils/device_info.py b/color_correction/utils/device_info.py similarity index 98% rename from color_correction_asdfghjkl/utils/device_info.py rename to color_correction/utils/device_info.py index 07bfe94..e9b456c 100644 --- a/color_correction_asdfghjkl/utils/device_info.py +++ b/color_correction/utils/device_info.py @@ -2,7 +2,7 @@ import subprocess from typing import Any -from color_correction_asdfghjkl.schemas.device import ( +from color_correction.schemas.device import ( CPUArchitecture, DeviceSpecs, GPUType, diff --git a/color_correction_asdfghjkl/utils/downloader.py b/color_correction/utils/downloader.py similarity index 95% rename from color_correction_asdfghjkl/utils/downloader.py rename to color_correction/utils/downloader.py index 33ff30c..19770e6 100644 --- a/color_correction_asdfghjkl/utils/downloader.py +++ b/color_correction/utils/downloader.py @@ -4,8 +4,8 @@ import httpx -from color_correction_asdfghjkl.schemas.device import GPUType -from color_correction_asdfghjkl.utils.device_info import get_device_specs +from color_correction.schemas.device import GPUType +from color_correction.utils.device_info import get_device_specs def download_google_drive_file(file_id: str, output_file: str) -> None: diff --git a/color_correction_asdfghjkl/utils/geometry_processing.py b/color_correction/utils/geometry_processing.py similarity index 100% rename from color_correction_asdfghjkl/utils/geometry_processing.py rename to color_correction/utils/geometry_processing.py diff --git a/color_correction_asdfghjkl/utils/image_patch.py b/color_correction/utils/image_patch.py similarity index 100% rename from color_correction_asdfghjkl/utils/image_patch.py rename to color_correction/utils/image_patch.py diff --git a/color_correction_asdfghjkl/utils/image_processing.py b/color_correction/utils/image_processing.py similarity index 100% rename from color_correction_asdfghjkl/utils/image_processing.py rename to color_correction/utils/image_processing.py diff --git a/color_correction_asdfghjkl/utils/visualization_utils.py b/color_correction/utils/visualization_utils.py similarity index 100% rename from color_correction_asdfghjkl/utils/visualization_utils.py rename to color_correction/utils/visualization_utils.py diff --git a/color_correction_asdfghjkl/utils/yolo_utils.py b/color_correction/utils/yolo_utils.py similarity index 99% rename from color_correction_asdfghjkl/utils/yolo_utils.py rename to color_correction/utils/yolo_utils.py index b2bf62d..96925ff 100644 --- a/color_correction_asdfghjkl/utils/yolo_utils.py +++ b/color_correction/utils/yolo_utils.py @@ -9,7 +9,7 @@ import cv2 import numpy as np -from color_correction_asdfghjkl.constant.yolov8_det import class_names +from color_correction.constant.yolov8_det import class_names # Constants RANDOM_SEED = 3 diff --git a/color_correction_asdfghjkl/core/correction/__init__.py b/color_correction_asdfghjkl/core/correction/__init__.py deleted file mode 100644 index cf1004a..0000000 --- a/color_correction_asdfghjkl/core/correction/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -from color_correction_asdfghjkl.core.correction._factory import ( - CorrectionModelFactory, -) -from color_correction_asdfghjkl.core.correction.affine_reg import AffineReg -from color_correction_asdfghjkl.core.correction.least_squares import ( - LeastSquaresRegression, -) -from color_correction_asdfghjkl.core.correction.linear_reg import LinearReg -from color_correction_asdfghjkl.core.correction.polynomial import Polynomial - -__all__ = [ - "CorrectionModelFactory", - "LeastSquaresRegression", - "Polynomial", - "LinearReg", - "AffineReg", -] diff --git a/pyproject.toml b/pyproject.toml index 2c029bc..487b0e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,15 @@ [project] -name = "color-correction-asdfghjkl" -version = "0.0.1b1" +name = "color-correction" +version = "0.0.1b2" description = "help to do color correction on images based on color checker card classic 24 patch." -keywords = ["color correction", "color-correction", "color consistency", "color-consistency"] +keywords = ["color correction", "color-correction", "color consistency", "color-consistency", "vision", "computer vision"] readme = "README.md" authors = [ { name = "magfianf", email = "muhammadagfian96@gmail.com" } ] +maintainers = [ + { name = "magfianf", email = "muhammadagfian96@gmail.com" } +] requires-python = ">=3.10" dependencies = [ "httpx>=0.28.1", @@ -31,8 +34,9 @@ classifiers = [ [project.urls] -Repository = "https://github.com/agfianf/color-correction-asdfghjkl" -Issues = "https://github.com/agfianf/color-correction-asdfghjkl/issues" +Homepage = "https://github.com/agfianf/color-correction" +Repository = "https://github.com/agfianf/color-correction" +Issues = "https://github.com/agfianf/color-correction/issues" [dependency-groups] @@ -56,7 +60,7 @@ build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["color_correction_asdfghjkl"] +packages = ["color_correction"] # ---- ruff ---- [tool.ruff] diff --git a/tests/core/card_detection/test_yolov8_detector.py b/tests/core/card_detection/test_yolov8_detector.py index 40c6939..83a3489 100644 --- a/tests/core/card_detection/test_yolov8_detector.py +++ b/tests/core/card_detection/test_yolov8_detector.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from color_correction_asdfghjkl.core.card_detection.det_yv8_onnx import YOLOv8CardDetector +from color_correction.core.card_detection.det_yv8_onnx import YOLOv8CardDetector @pytest.mark.skip(reason="Test is not implemented") def test_detector_init(sample_image: np.ndarray) -> None: diff --git a/tests/utils/test_image_patch.py b/tests/utils/test_image_patch.py index 53e8cb8..9e7c389 100644 --- a/tests/utils/test_image_patch.py +++ b/tests/utils/test_image_patch.py @@ -1,8 +1,7 @@ import numpy as np import pytest -import cv2 -from color_correction_asdfghjkl.utils.image_patch import ( +from color_correction.utils.image_patch import ( create_patch_tiled_image, visualize_patch_comparison, ) diff --git a/tests/utils/test_image_processing.py b/tests/utils/test_image_processing.py index 3293c05..4090831 100644 --- a/tests/utils/test_image_processing.py +++ b/tests/utils/test_image_processing.py @@ -1,6 +1,6 @@ import numpy as np import pytest -from color_correction_asdfghjkl.utils.image_processing import crop_region_with_margin, calc_mean_color_patch +from color_correction.utils.image_processing import crop_region_with_margin, calc_mean_color_patch @pytest.fixture def known_image() -> np.ndarray: diff --git a/tests/utils/test_yolo_utils.py b/tests/utils/test_yolo_utils.py index a9b45b5..958c0ff 100644 --- a/tests/utils/test_yolo_utils.py +++ b/tests/utils/test_yolo_utils.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from color_correction_asdfghjkl.utils.yolo_utils import ( +from color_correction.utils.yolo_utils import ( compute_iou, multiclass_nms, nms,