Skip to content

Commit ca64a1d

Browse files
authored
Merge pull request #6 from agfianf/fix/naming-package
Fix/naming package
2 parents 0e121db + a06e1c4 commit ca64a1d

40 files changed

+145
-113
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
[run]
3-
source = color_correction_asdfghjkl
3+
source = color_correction
44
omit =
55
tests/*
66

.github/workflows/publish.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python Package to PyPI
1+
name: 📦 Publish Python Package to PyPI
22

33
on:
44
push:
@@ -9,26 +9,25 @@ jobs:
99
publish:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Clone repository
12+
- name: 📥 Checkout repository
1313
uses: actions/checkout@v4
14-
15-
- name: Install uv and set the python version
14+
15+
- name: 🐍 Install uv and set the python version
1616
uses: astral-sh/setup-uv@v5
1717
with:
18-
version: "0.5.23"
1918
enable-cache: true
2019
cache-dependency-glob: "uv.lock"
2120
python-version: 3.12
2221

23-
- name: Extract version from Git tag
22+
- name: 🏷️ Extract version from Git tag
2423
id: get_version
2524
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
26-
27-
- name: Clear directory
25+
26+
- name: 🧹 Clear directory
2827
run: rm -rf dist
2928

30-
- name: Build package
29+
- name: 🔨 Build package
3130
run: uv build
3231

33-
- name: Publish to PyPI
32+
- name: 🚀 Publish to PyPI
3433
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
name: Test
1+
name: 🧪 Test
22

33
on:
44
pull_request:
55
branches: [ main ]
6+
paths-ignore:
7+
- '**.md'
8+
- 'docs/**'
9+
- 'LICENSE'
10+
- '.gitignore'
11+
- '.pre-commit-config.yaml'
12+
- 'mkdocs.yml'
13+
- 'docs_requirements.txt'
614

715
jobs:
816
test:
9-
name: Test
17+
name: 🧪 Test
1018
runs-on: ${{ matrix.os }}
1119
strategy:
1220
matrix:
@@ -17,23 +25,23 @@ jobs:
1725
- "3.12"
1826

1927
steps:
20-
- uses: actions/checkout@v4
28+
- name: 📥 Checkout repository
29+
uses: actions/checkout@v4
2130

22-
- name: Install uv and set the python version
31+
- name: 🐍 Install uv and set the python version
2332
uses: astral-sh/setup-uv@v5
2433
with:
25-
version: "0.5.24"
2634
enable-cache: true
2735
cache-dependency-glob: "uv.lock"
2836
python-version: ${{ matrix.python-version }}
2937

30-
- name: Install the project
38+
- name: 📦 Install the project
3139
run: uv sync --all-groups --no-group dev-model
3240

33-
- name: Checking linter and formatting
41+
- name: 🔍 Checking linter and formatting
3442
run: uvx ruff check
3543

36-
- name: Run tests with Coverage
44+
- name: 📊 Run tests with Coverage
3745
run: |
38-
uv run pytest --cov-report=term-missing --cov=color_correction_asdfghjkl tests/
46+
uv run pytest --cov-report=term-missing --cov=color_correction tests/
3947
uv run coverage report --fail-under=35

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ wheels/
2020

2121
tmp/
2222
zzz/
23-
color_correction_asdfghjkl/asset/images/
23+
color_correction/asset/images/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
yolo-export-onnx:
22
yolo export \
3-
model=color_correction_asdfghjkl/asset/.model/yv8-det.pt \
3+
model=color_correction/asset/.model/yv8-det.pt \
44
format=onnx \
55
device=mps \
66
simplify=True \

README.md

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11

2-
# 🎨 Color Correction
2+
<div align="center">
33

4-
> **Note:** The "asdfghjkl" is just a placeholder due to some naming difficulties.
4+
# Color Correction
5+
6+
<br>
7+
8+
[![version](https://badge.fury.io/py/color-correction.svg)](https://badge.fury.io/py/color-correction)
9+
[![downloads](https://img.shields.io/pypi/dm/color-correction)](https://pypistats.org/packages/color-correction)
10+
[![python-version](https://img.shields.io/pypi/pyversions/color-correction)](https://badge.fury.io/py/color-correction)
11+
12+
</div>
13+
14+
> _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._
515
616
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.
717

818
## 📦 Installation
919

1020
```bash
11-
pip install color-correction-asdfghjkl
21+
pip install color-correction
1222
```
1323

1424
## 🏋️‍♀️ How it works
@@ -18,6 +28,8 @@ pip install color-correction-asdfghjkl
1828
## ⚡ How to use
1929

2030
```python
31+
from color_correction import ColorCorrection
32+
2133
# Step 1: Define the path to the input image
2234
image_path = "asset/images/cc-19.png"
2335

@@ -49,31 +61,40 @@ corrected_image = color_corrector.predict(
4961
eval_result = color_corrector.calc_color_diff_patches()
5062
print(eval_result)
5163
```
52-
- Output evaluation result:
53-
```json
54-
{
55-
"initial": {
56-
"min": 2.254003059526461,
57-
"max": 13.461066402633447,
58-
"mean": 8.3072755187654,
59-
"std": 3.123962754767539,
60-
},
61-
"corrected": {
62-
"min": 0.30910031798755183,
63-
"max": 5.422311999126372,
64-
"mean": 1.4965478752947827,
65-
"std": 1.2915738724958112,
66-
},
67-
"delta": {
68-
"min": 1.9449027415389093,
69-
"max": 8.038754403507074,
70-
"mean": 6.810727643470616,
71-
"std": 1.8323888822717276,
72-
},
73-
}
74-
```
75-
- Sample output debug image (polynomial degree=2):
76-
![Sample Output](assets/sample-output-debug.jpg)
64+
65+
<details>
66+
<summary>Sample Evaluation Output</summary>
67+
68+
```json
69+
{
70+
"initial": {
71+
"min": 2.254003059526461,
72+
"max": 13.461066402633447,
73+
"mean": 8.3072755187654,
74+
"std": 3.123962754767539,
75+
},
76+
"corrected": {
77+
"min": 0.30910031798755183,
78+
"max": 5.422311999126372,
79+
"mean": 1.4965478752947827,
80+
"std": 1.2915738724958112,
81+
},
82+
"delta": {
83+
"min": 1.9449027415389093,
84+
"max": 8.038754403507074,
85+
"mean": 6.810727643470616,
86+
"std": 1.8323888822717276,
87+
},
88+
}
89+
```
90+
</details>
91+
92+
<details>
93+
<summary>Sample Output Debug Image</summary>
94+
95+
![Sample Output](assets/sample-output-debug.jpg)
96+
97+
</details>
7798

7899
## 📈 Benefits
79100
- **Consistency**: Ensure uniform color correction across multiple images.
@@ -89,6 +110,7 @@ print(eval_result)
89110
- [ ] Add more analysis and evaluation metrics (Still thinking...)
90111

91112
<!-- write reference -->
113+
92114
## 📚 References
93115
- [Color Checker Classic 24 Patch Card](https://www.xrite.com/categories/calibration-profiling/colorchecker-classic)
94116
- [Color Correction Tool ML](https://github.com/collinswakholi/ML_ColorCorrection_tool/tree/Pip_package)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)