colour-checker-detection

colour-scienceBSD-3-Clause活跃维护

用 Python 自动检测图像中的色卡(ColorChecker)位置,为色彩校正和色彩空间分析提供准确的色块定位。

Colour checker detection with Python

v0.2.3发布于 2025-12-11 06:27 UTC295star +1 / 7 天43fork同步于 2026-11-11 00:00 UTC

怎么上手

由 README 提炼,执行前请确认
pip install --user colour-checker-detection
硬件要求按 README 说明

README 未说明显存或 GPU 型号要求;YOLOv8 推理依赖 ultralytics,实际运行环境需自行确认。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Python 在图像中自动检测色卡位置的算法库,支持分割、模板匹配和 YOLOv8 推理

用 Python 自动检测图像中的色卡(ColorChecker)位置,为色彩校正和色彩空间分析提供准确的色块定位。

核心能力

  • 提供分割与模板匹配两种传统检测算法
  • 集成 Ultralytics YOLOv8 做机器学习推理
  • 模型托管在 HuggingFace 并附专用训练数据集
  • 配套 colour-science 生态,便于后续色彩处理

容易踩的坑

示例与单元测试所需资源不在 PyPI 包内,需克隆仓库并拉取 Git Submodules;YOLOv8 模型需从 HuggingFace 单独获取,且仅支持 ColorChecker Classic 24,对 Nano 和 SG 无效;推理脚本因使用 Ultralytics API 采用 AGPL-3.0 许可,与主包 BSD-3-Clause 不同。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.3
  1. v0.2.3Colour - Checker Detection - 0.2.3最新正式版2025-12-11 · 2025-12-11 06:27 UTC

    Fixes

    Packaging

  2. v0.2.2Colour - Checker Detection - 0.2.22025-12-06 · 2025-12-06 22:59 UTC
    查看更新说明

    Features

    Dependencies

    Templated Detection

    • Implement support for template-based detection with colour_checker_detection.detect_colour_checkers_templated definition. (#86, @TimWalter, @KelSolaar)
  3. v0.2.1Colour - Checker Detection - 0.2.12024-10-12 · 2024-10-12 23:28 UTC
    查看更新说明

    This release is a compatibility release with Colour 0.4.5.

    Features

    Dependencies

  4. v0.2.0Colour - Checker Detection - 0.2.02024-01-11 · 2024-01-11 03:27 UTC
    查看更新说明

    This release introduces machine learning inference for the detection of the ColorChecker Classic 24.

    Features

    colour_checker_detection.detection

    Machine Learning Inference

    • Add colour_checker_detection.detection.detect_colour_checkers_inference definition. (#75, @KelSolaar)

    The model used for inference is published on HuggingFace, and was trained on a purposely constructed dataset.

    The model has only been trained on ColorChecker Classic 24 images and will not work with ColorChecker Nano or ColorChecker SG images.

    Inference is performed by a script licensed under the terms of the GNU Affero General Public License v3.0 as it uses the Ultralytics YOLOv8 API which is incompatible with the BSD-3-Clause.

    image

    image

    image

    Fixes

    • Fix incorrect colour checker flipping detection in colour_checker_detection.detection.detect_colour_checkers_segmentation definition. (#73, @andieich, @mexicantexan, @KelSolaar)

    Changes

    • The colour_checker_detection.detection.detect_colour_checkers_segmentation definition has been overhauled to provide a consistent interface with the colour_checker_detection.detection.detect_colour_checkers_inference definition. It also features some improvements following discussions with contributors. (#53, #73, #74, @andieich, @mexicantexan, @TimWalter, @KelSolaar)
    ObjectSignatureAuthor
    colour_checker_detection.detection.detect_colour_checkers_segmentationdetect_colour_checkers_segmentation( image: str | ArrayLike, samples: int = 32, cctf_decoding: Callable = eotf_sRGB, apply_cctf_decoding: bool = False, segmenter: Callable = segmenter_default, segmenter_kwargs: dict | None = None, show: bool = False, additional_data: bool = False, **kwargs: Any) -> Tuple[DataDetectionColourChecker | NDArrayFloat, ...]@KelSolaar
    ObjectNameAuthor
    colour_checker_detection.colour_checkers_coordinates_segmentationsegmenter_default@KelSolaar
    • colour_checker_detection.extract_colour_checkers_segmentation: (@KelSolaar)
      • Remove
  5. v0.1.6Colour - Checker Detection - 0.1.62023-12-21 · 2023-12-21 09:45 UTC
    查看更新说明

    This release is a compatibility release with Colour 0.4.4.

    The following scientific packages minimum versions are required:

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Colour - Checker Detection

    .. start-badges

    |actions| |coveralls| |codacy| |version|

    .. |actions| image:: https://img.shields.io/github/actions/workflow/status/colour-science/colour-checker-detection/.github/workflows/continuous-integration-quality-unit-tests.yml?branch=develop&style=flat-square :target: https://github.com/colour-science/colour-checker-detection/actions :alt: Develop Build Status .. |coveralls| image:: http://img.shields.io/coveralls/colour-science/colour-checker-detection/develop.svg?style=flat-square :target: https://coveralls.io/r/colour-science/colour-checker-detection :alt: Coverage Status .. |codacy| image:: https://img.shields.io/codacy/grade/c543bc30229347cdaea00aadd3f79499/develop.svg?style=flat-square :target: https://app.codacy.com/gh/colour-science/colour-checker-detection :alt: Code Grade .. |version| image:: https://img.shields.io/pypi/v/colour-checker-detection.svg?style=flat-square :target: https://pypi.org/project/colour-checker-detection :alt: Package Version

    .. end-badges

    A Python <https://www.python.org>__ package implementing various colour checker detection algorithms and related utilities.

    It is open source and freely available under the BSD-3-Clause <https://opensource.org/licenses/BSD-3-Clause>__ terms.

    .. image:: https://raw.githubusercontent.com/colour-science/colour-checker-detection/master/docs/_static/ColourCheckerDetection_001.png

    .. contents:: Table of Contents :backlinks: none :depth: 2

    .. sectnum::

    Features

    The following colour checker detection algorithms are implemented:

    • Segmentation

    • Templated

    • Machine learning inference via Ultralytics YOLOv8 <https://github.com/ultralytics/ultralytics>__

      • The model is published on HuggingFace <https://huggingface.co/colour-science/colour-checker-detection-models>, and was trained on a purposely constructed dataset <https://huggingface.co/datasets/colour-science/colour-checker-detection-dataset>.
      • The model has only been trained on ColorChecker Classic 24 images and will not work with ColorChecker Nano or ColorChecker SG images.
      • Inference is performed by a script licensed under the terms of the GNU Affero General Public License v3.0 as it uses the Ultralytics YOLOv8 API which is incompatible with the BSD-3-Clause.

    Examples ^^^^^^^^

    Various usage examples are available from the examples directory <https://github.com/colour-science/colour-checker-detection/tree/master/colour_checker_detection/examples>__.

    User Guide

    Installation ^^^^^^^^^^^^

    Because of their size, the resources dependencies needed to run the various examples and unit tests are not provided within the Pypi package. They are separately available as Git Submodules <https://git-scm.com/book/en/v2/Git-Tools-Submodules>__ when cloning the repository <https://github.com/colour-science/colour-checker-detection>__.

    Primary Dependencies

    
    **Colour - Checker Detection** requires various dependencies in order to run:
    
    - `python >= 3.10, < 3.14 <https://www.python.org/download/releases>`__
    - `colour-science >= 4.5 <https://pypi.org/project/colour-science>`__
    - `imageio >= 2, < 3 <https://imageio.github.io>`__
    - `numpy >= 1.24, < 3 <https://pypi.org/project/numpy>`__
    - `opencv-python >= 4, < 5 <https://pypi.org/project/opencv-python>`__
    - `scipy >= 1.10, < 2 <https://pypi.org/project/scipy>`__
    
    Secondary Dependencies
    
    • click >= 8, < 9 <https://pypi.org/project/click>__
    • ultralytics >= 8, < 9 <https://pypi.org/project/ultralytics>__

    Pypi

    
    Once the dependencies are satisfied, **Colour - Checker Detection** can be installed from
    the `Python Package Index <http://pypi.python.org/pypi/colour-checker-detection>`__ by
    issuing this command in a shell::
    
        pip install --user colour-checker-detection
    
    The overall development dependencies are installed as follows::
    
        pip install --user 'colour-checker-detection[development]'
    
    Contributing
    ^^^^^^^^^^^^
    
    If you would like to contribute to `Colour - Checker Detection <https://github.com/colour-science/colour-checker-detection>`__,
    please refer to the following `Contributing <https://www.colour-science.org/contributing>`__
    guide for `Colour <https://github.com/colour-science/colour>`__.
    
    Bibliography
    ^^^^^^^^^^^^
    
    The bibliography is available in the repository in
    `BibTeX <https://github.com/colour-science/colour-checker-detection/blob/develop/BIBLIOGRAPHY.bib>`__
    format.
    
    API Reference
    -------------
    
    The main technical reference `Colour - Checker Detection <https://github.com/colour-science/colour-checker-detection>`__
    is the `API Reference <https://colour-checker-detection.readthedocs.io/en/latest/reference.html>`__.
    
    Code of Conduct
    ---------------
    
    The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>`__,
    is available on the `Code of Conduct <https://www.colour-science.org/code-of-conduct>`__ page.
    
    Contact & Social
    ----------------
    
    The *Colour Developers* can be reached via different means:
    
    - `Email <mailto:[email protected]>`__
    - `Facebook <https://www.facebook.com/python.colour.science>`__
    - `Github Discussions <https://github.com/colour-science/colour-checker-detection/discussions>`__
    - `Gitter <https://gitter.im/colour-science/colour>`__
    - `X <https://x.com/colour_science>`__
    - `Bluesky <https://bsky.app/profile/colour-science.bsky.social>`__
    
    About
    -----
    
    | **Colour - Checker Detection** by Colour Developers
    | Copyright 2018 Colour Developers – `[email protected] <[email protected]>`__
    | This software is released under terms of BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause
    | `https://github.com/colour-science/colour-checker-detection <https://github.com/colour-science/colour-checker-detection>`__