patchmatch-cython 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patchmatch_cython-1.0.0/src/patchmatch_cython.egg-info → patchmatch_cython-1.0.2}/PKG-INFO +4 -4
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/README.md +3 -3
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/pyproject.toml +1 -1
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/setup.py +1 -1
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/__init__.py +1 -1
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/cython_solver_impl.cpp +149 -137
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/cython_solver_impl.pyx +3 -2
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/imageops.py +1 -1
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/inpaint.py +4 -6
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/philippeau.cpp +2747 -2813
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/philippeau.pyx +39 -40
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/python_solver.py +2 -3
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2/src/patchmatch_cython.egg-info}/PKG-INFO +4 -4
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_inpaint_api.py +8 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_philippeau.py +7 -6
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/LICENSE +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/MANIFEST.in +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/local_build.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/setup.cfg +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/cython_solver.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/exceptions.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython/solver.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython.egg-info/SOURCES.txt +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython.egg-info/dependency_links.txt +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython.egg-info/not-zip-safe +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython.egg-info/requires.txt +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/src/patchmatch_cython.egg-info/top_level.txt +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_basic_functionality.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_imageops.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_quality_options.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_questionable_behaviors.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_solvers.py +0 -0
- {patchmatch_cython-1.0.0 → patchmatch_cython-1.0.2}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchmatch-cython
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: High-performance PatchMatch implementation for image inpainting using Cython
|
|
5
5
|
Home-page: https://github.com/Teriks/patchmatch-cython
|
|
6
6
|
Author: Teriks
|
|
@@ -120,7 +120,7 @@ result = inpaint_pyramid(image, mask, seed=42)
|
|
|
120
120
|
Image.fromarray(result).save("filled.jpg")
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
A rectangle is enough when you do not have a mask file. `seed` makes the fill repeatable
|
|
123
|
+
A rectangle is enough when you do not have a mask file. `seed` makes the fill repeatable. Omitting it, or passing `None`, uses seed 0.
|
|
124
124
|
|
|
125
125
|
```python
|
|
126
126
|
import numpy as np
|
|
@@ -184,7 +184,7 @@ result = inpaint_pyramid(image, mask, patch_size=7, em_loops=2, seed=42)
|
|
|
184
184
|
| Parameter | Default | Description |
|
|
185
185
|
|---|---|---|
|
|
186
186
|
| `patch_size` | `5` | Odd positive int; square patch side for matching and voting. |
|
|
187
|
-
| `seed` | `None` | RNG seed. `None`
|
|
187
|
+
| `seed` | `None` | RNG seed. `None` is 0. The same seed repeats the fill. |
|
|
188
188
|
| `solver_class` | `None` | `None` uses `CythonSolver` when the extension is available, otherwise `PythonSolver`. |
|
|
189
189
|
| `em_loops` | `1` | Outer match→paint→rematch loops. On pyramids, applied at coarse levels only (finest stays `1`). |
|
|
190
190
|
| `edge_weighted` | `False` | `False` = color-only matching. `True` = color + boosted gradient channels. Hole-touching gradients are suppressed so zeroed holes do not create fake edges. |
|
|
@@ -203,7 +203,7 @@ Masks may be `bool`, `{0,1}`, or `{0,255}`. The library does not dilate or erode
|
|
|
203
203
|
|
|
204
204
|
In this mode `patch_size` is a **radius**: each patch spans `2 * patch_size + 1` pixels. Any integer from 1 up is valid, including even values. A radius of 3 is a 7×7 patch. `inpaint_philippeau` defaults to radius 15. `inpaint_pyramid` and `inpaint_single` still default `patch_size` to 5, and that 5 is a radius here.
|
|
205
205
|
|
|
206
|
-
Pass `seed` for a repeatable fill.
|
|
206
|
+
Pass `seed` for a repeatable fill. Omitting it, or passing `None`, uses seed 0.
|
|
207
207
|
|
|
208
208
|
`inpaint_philippeau` requires an HxWx3 `uint8` image. `inpaint_pyramid` and `inpaint_single` round other numeric images into `uint8` and clip them to 0–255 before filling. The same `uint8` image, mask, radius, and seed produce the same fill from either call.
|
|
209
209
|
|
|
@@ -50,7 +50,7 @@ result = inpaint_pyramid(image, mask, seed=42)
|
|
|
50
50
|
Image.fromarray(result).save("filled.jpg")
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
A rectangle is enough when you do not have a mask file. `seed` makes the fill repeatable
|
|
53
|
+
A rectangle is enough when you do not have a mask file. `seed` makes the fill repeatable. Omitting it, or passing `None`, uses seed 0.
|
|
54
54
|
|
|
55
55
|
```python
|
|
56
56
|
import numpy as np
|
|
@@ -114,7 +114,7 @@ result = inpaint_pyramid(image, mask, patch_size=7, em_loops=2, seed=42)
|
|
|
114
114
|
| Parameter | Default | Description |
|
|
115
115
|
|---|---|---|
|
|
116
116
|
| `patch_size` | `5` | Odd positive int; square patch side for matching and voting. |
|
|
117
|
-
| `seed` | `None` | RNG seed. `None`
|
|
117
|
+
| `seed` | `None` | RNG seed. `None` is 0. The same seed repeats the fill. |
|
|
118
118
|
| `solver_class` | `None` | `None` uses `CythonSolver` when the extension is available, otherwise `PythonSolver`. |
|
|
119
119
|
| `em_loops` | `1` | Outer match→paint→rematch loops. On pyramids, applied at coarse levels only (finest stays `1`). |
|
|
120
120
|
| `edge_weighted` | `False` | `False` = color-only matching. `True` = color + boosted gradient channels. Hole-touching gradients are suppressed so zeroed holes do not create fake edges. |
|
|
@@ -133,7 +133,7 @@ Masks may be `bool`, `{0,1}`, or `{0,255}`. The library does not dilate or erode
|
|
|
133
133
|
|
|
134
134
|
In this mode `patch_size` is a **radius**: each patch spans `2 * patch_size + 1` pixels. Any integer from 1 up is valid, including even values. A radius of 3 is a 7×7 patch. `inpaint_philippeau` defaults to radius 15. `inpaint_pyramid` and `inpaint_single` still default `patch_size` to 5, and that 5 is a radius here.
|
|
135
135
|
|
|
136
|
-
Pass `seed` for a repeatable fill.
|
|
136
|
+
Pass `seed` for a repeatable fill. Omitting it, or passing `None`, uses seed 0.
|
|
137
137
|
|
|
138
138
|
`inpaint_philippeau` requires an HxWx3 `uint8` image. `inpaint_pyramid` and `inpaint_single` round other numeric images into `uint8` and clip them to 0–255 before filling. The same `uint8` image, mask, radius, and seed produce the same fill from either call.
|
|
139
139
|
|
|
@@ -119,7 +119,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
119
119
|
|
|
120
120
|
setup(
|
|
121
121
|
name="patchmatch-cython",
|
|
122
|
-
version="1.0.
|
|
122
|
+
version="1.0.2",
|
|
123
123
|
author="Teriks",
|
|
124
124
|
author_email="Teriks999@gmail.com",
|
|
125
125
|
description="High-performance PatchMatch implementation for image inpainting using Cython",
|