PyPatchMatch 2.1.0__py3-none-win_amd64.whl → 2.2.0__py3-none-win_amd64.whl
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/_lib.py +3 -2
- patchmatch/_version.py +2 -2
- patchmatch/patchmatch.dll +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/METADATA +29 -11
- pypatchmatch-2.2.0.dist-info/RECORD +16 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/WHEEL +1 -1
- pypatchmatch-2.1.0.dist-info/RECORD +0 -16
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/LICENSE +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/SoftFloat-COPYING.txt +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/dlpack-LICENSE +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/flatbuffers-LICENSE.txt +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/opencv-LICENSE +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/zlib-LICENSE +0 -0
- {pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/sboms/opencv.cdx.json +0 -0
patchmatch/_lib.py
CHANGED
|
@@ -82,8 +82,9 @@ def find_library() -> Path:
|
|
|
82
82
|
)
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
def load_library() -> ctypes.CDLL:
|
|
86
|
-
|
|
85
|
+
def load_library(path: Path | None = None) -> ctypes.CDLL:
|
|
86
|
+
"""Load the installed library, or the build at ``path``."""
|
|
87
|
+
lib = ctypes.CDLL(str(path or find_library()))
|
|
87
88
|
|
|
88
89
|
lib.PM_set_random_seed.argtypes = [ctypes.c_uint]
|
|
89
90
|
lib.PM_set_random_seed.restype = None
|
patchmatch/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 2, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
patchmatch/patchmatch.dll
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyPatchMatch
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: This library implements the PatchMatch based inpainting algorithm.
|
|
5
5
|
Keywords: inpainting,patchmatch,image-processing,opencv
|
|
6
6
|
Author-Email: The InvokeAI Project <lincoln.stein@gmail.com>, Jiayuan Mao <maojiayuan@gmail.com>, Kyle Schouviller <kyle0654@hotmail.com>, Matthias Wild <mauwii@outlook.de>, Younesse ANDAM <younesse.andam@gmail.com>
|
|
@@ -30,20 +30,28 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
|
|
31
31
|
# PatchMatch based Inpainting
|
|
32
32
|
|
|
33
|
-
[](https://sonarcloud.io/summary/new_code?id=mauwii_PyPatchMatch)
|
|
34
|
-
[](https://github.com/mauwii/PyPatchMatch/blob/main/LICENSE)
|
|
35
33
|
[](https://pypi.org/project/PyPatchMatch/)
|
|
36
|
-
[](https://pypi.org/project/PyPatchMatch/)
|
|
35
|
+
[](https://pepy.tech/projects/pypatchmatch)
|
|
36
|
+
[](https://github.com/mauwii/PyPatchMatch/blob/main/LICENSE)
|
|
37
|
+
|
|
38
|
+
[](https://github.com/mauwii/PyPatchMatch/actions/workflows/ci.yml?query=branch%3Amain)
|
|
39
|
+
[](https://sonarcloud.io/component_measures?id=mauwii_PyPatchMatch&metric=coverage)
|
|
40
|
+
[](https://sonarcloud.io/summary/new_code?id=mauwii_PyPatchMatch)
|
|
41
|
+
|
|
42
|
+
[](https://github.com/astral-sh/uv)
|
|
37
43
|
[](https://github.com/astral-sh/ruff)
|
|
38
44
|
[](https://github.com/DietrichGebert/ponytail)
|
|
39
|
-
[](https://github.com/JuliusBrussee/caveman)
|
|
40
45
|
|
|
41
46
|
This library implements the PatchMatch based inpainting algorithm. It provides both C++
|
|
42
47
|
and Python interfaces. This implementation is heavily based on the implementation by
|
|
43
48
|
Younesse ANDAM: [younesse-cv/PatchMatch](https://github.com/younesse-cv/PatchMatch),
|
|
44
|
-
with some bug fixes, and updates.
|
|
49
|
+
with some bug fixes, and updates. This repository continues
|
|
50
|
+
[vacancy/PyPatchMatch](https://github.com/vacancy/PyPatchMatch) by Jiayuan Mao, through
|
|
51
|
+
the forks [lkwq007/PyPatchMatch](https://github.com/lkwq007/PyPatchMatch) and
|
|
52
|
+
[invoke-ai/PyPatchMatch](https://github.com/invoke-ai/PyPatchMatch).
|
|
45
53
|
|
|
46
|
-

|
|
47
55
|
|
|
48
56
|
From left to right: the photo, the input of
|
|
49
57
|
[examples/py_example.py](https://github.com/mauwii/PyPatchMatch/blob/main/examples/py_example.py)
|
|
@@ -56,9 +64,9 @@ pip install PyPatchMatch
|
|
|
56
64
|
```
|
|
57
65
|
|
|
58
66
|
Wheels for Linux (glibc, x86_64 and aarch64), macOS 11+ (arm64 and x86_64) and Windows
|
|
59
|
-
(x64) ship the compiled library with a statically linked OpenCV, so no
|
|
60
|
-
OpenCV installation is needed. On other platforms, e.g. Alpine Linux
|
|
61
|
-
|
|
67
|
+
(x64 and ARM64) ship the compiled library with a statically linked OpenCV, so no
|
|
68
|
+
compiler or OpenCV installation is needed. On other platforms, e.g. Alpine Linux, pip
|
|
69
|
+
builds from the source distribution, which requires a C++17 compiler, CMake and the
|
|
62
70
|
OpenCV development files (e.g. `apt install libopencv-dev` or `brew install opencv`).
|
|
63
71
|
|
|
64
72
|
If that build fails, PyPatchMatch is installed without the native library instead of
|
|
@@ -98,7 +106,11 @@ The previous import path `from patchmatch import patch_match` keeps working.
|
|
|
98
106
|
|
|
99
107
|
`patch_size` is the radius of the compared patches, which span `2 * patch_size + 1`
|
|
100
108
|
pixels in each direction. Larger patches follow larger structures but are much slower;
|
|
101
|
-
the default of 15 compares 31x31 patches, the examples use 3.
|
|
109
|
+
the default of 15 compares 31x31 patches, the examples use 3. Below 5, the coarse levels
|
|
110
|
+
that lay out the fill are also tried with a radius of 5, which is kept where it fits
|
|
111
|
+
the surroundings better, so that repeating patterns continue across larger holes. Above
|
|
112
|
+
7, coarse levels narrower than six patches use the largest radius that fits, but at
|
|
113
|
+
least 7: larger patches found no sources there and left the fill flat.
|
|
102
114
|
|
|
103
115
|
`patchmatch.set_random_seed(seed)` sets the seed of the randomized search, modulo
|
|
104
116
|
`2**32`, and `patchmatch.set_verbose(True)` prints the progress of the native code to
|
|
@@ -136,8 +148,14 @@ uv run pre-commit install # enable ruff and the other hooks on commit
|
|
|
136
148
|
uv run pytest # run the test suite
|
|
137
149
|
uv run pytest -m "not e2e" # only the fast unit tests
|
|
138
150
|
uv run python scripts/evaluate_inpainting.py # measure the fill quality
|
|
151
|
+
uv run --group gui gui/app.py # draw masks in the browser, http://127.0.0.1:7860
|
|
139
152
|
```
|
|
140
153
|
|
|
154
|
+
The GUI tries new images quickly, without writing a script for each one, e.g. to pick
|
|
155
|
+
new examples or to verify edge cases: load an image, paint the holes (every painted
|
|
156
|
+
pixel is one) and compare the original with the fill. Its test runs with
|
|
157
|
+
`uv run --group gui pytest gui --no-cov`.
|
|
158
|
+
|
|
141
159
|
The evaluation cuts holes into the images of `examples/images`, compares the fills with
|
|
142
160
|
the original content and writes `examples/images/evaluation.html`, which shows them side
|
|
143
161
|
by side. `--baseline` evaluates another build of the library as well, e.g. of the main
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
patchmatch/__init__.py,sha256=Xg_AyDjCY9obrk95tzu6h0ox1fttEczi_OKu3ycsSvM,345
|
|
2
|
+
patchmatch/_lib.py,sha256=IpCdxc_mG2rT8RzPBTMcZgWV_JSkfwFa_JL8o6F-qls,3836
|
|
3
|
+
patchmatch/_version.py,sha256=_6Jl7jsBV_C7c_pTssYQwBPsCePvXJEjxCHwz_n6WEw,544
|
|
4
|
+
patchmatch/patch_match.py,sha256=TlmBMxgqk5vdepAoZgduy2axJJBHHYLFuMENc3DnIv4,9424
|
|
5
|
+
patchmatch/patchmatch.dll,sha256=rrc8QG8omei2kWfe2AGojsMnRZT7DM8fLB8KCyzXBhE,1612800
|
|
6
|
+
patchmatch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
pypatchmatch-2.2.0.dist-info/METADATA,sha256=L0nsU0OM7lmsLa5pqPpqXP-LJZPaoJdQthDSKtqDAVM,10159
|
|
8
|
+
pypatchmatch-2.2.0.dist-info/WHEEL,sha256=H2-vNj0Uj93L_UlwWLAHSbPwt0nxqZmlgAGZZjm-2qY,102
|
|
9
|
+
pypatchmatch-2.2.0.dist-info/licenses/LICENSE,sha256=6VGSBzoFC-2RWaUpfSom3IlBW3AZfOwDuZrVzOmfN_E,1101
|
|
10
|
+
pypatchmatch-2.2.0.dist-info/licenses/opencv/dlpack-LICENSE,sha256=Po9rw5J2pYbWDIxars4v-YkmIYHPKz0qEo21j5epMAw,11345
|
|
11
|
+
pypatchmatch-2.2.0.dist-info/licenses/opencv/flatbuffers-LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
12
|
+
pypatchmatch-2.2.0.dist-info/licenses/opencv/opencv-LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
13
|
+
pypatchmatch-2.2.0.dist-info/licenses/opencv/SoftFloat-COPYING.txt,sha256=DFsINlE22lJjnXd_Hr_AOYiwFp2AZVyQxZ8bP6PlJqI,1732
|
|
14
|
+
pypatchmatch-2.2.0.dist-info/licenses/opencv/zlib-LICENSE,sha256=4y_04A2dlJMFN2NSkdo55-YScDM0v2_ejH8Whv6KRaI,1002
|
|
15
|
+
pypatchmatch-2.2.0.dist-info/sboms/opencv.cdx.json,sha256=ATex-BysD8SgsmzwbF8T3jwHedHA_RBYyqgJlC-Amew,866
|
|
16
|
+
pypatchmatch-2.2.0.dist-info/RECORD,,
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
patchmatch/__init__.py,sha256=Xg_AyDjCY9obrk95tzu6h0ox1fttEczi_OKu3ycsSvM,345
|
|
2
|
-
patchmatch/_lib.py,sha256=KKEeHtn4I0IcRdG49FQV_xpezcar9LqlGD-kvf-pZiM,3740
|
|
3
|
-
patchmatch/_version.py,sha256=CA0QMwNdN31xaPguElVMtu0XzlYbZkXUdKk_RYgFCjg,544
|
|
4
|
-
patchmatch/patch_match.py,sha256=TlmBMxgqk5vdepAoZgduy2axJJBHHYLFuMENc3DnIv4,9424
|
|
5
|
-
patchmatch/patchmatch.dll,sha256=Fua2_pvH_n2J0NCQBI9E-rvalL5gEQLRaxMNBZkY3D0,1553408
|
|
6
|
-
patchmatch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
pypatchmatch-2.1.0.dist-info/METADATA,sha256=pWtaQBm8NLLzdodeZ3lbN5zm3300YhAz0A7BZ8s0Qmc,8640
|
|
8
|
-
pypatchmatch-2.1.0.dist-info/WHEEL,sha256=QOQSSLDAidk39OMVpTfE4kjgcxpaKg4ohhjJQ7vAJpA,102
|
|
9
|
-
pypatchmatch-2.1.0.dist-info/licenses/LICENSE,sha256=6VGSBzoFC-2RWaUpfSom3IlBW3AZfOwDuZrVzOmfN_E,1101
|
|
10
|
-
pypatchmatch-2.1.0.dist-info/licenses/opencv/dlpack-LICENSE,sha256=Po9rw5J2pYbWDIxars4v-YkmIYHPKz0qEo21j5epMAw,11345
|
|
11
|
-
pypatchmatch-2.1.0.dist-info/licenses/opencv/flatbuffers-LICENSE.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
12
|
-
pypatchmatch-2.1.0.dist-info/licenses/opencv/opencv-LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
13
|
-
pypatchmatch-2.1.0.dist-info/licenses/opencv/SoftFloat-COPYING.txt,sha256=DFsINlE22lJjnXd_Hr_AOYiwFp2AZVyQxZ8bP6PlJqI,1732
|
|
14
|
-
pypatchmatch-2.1.0.dist-info/licenses/opencv/zlib-LICENSE,sha256=4y_04A2dlJMFN2NSkdo55-YScDM0v2_ejH8Whv6KRaI,1002
|
|
15
|
-
pypatchmatch-2.1.0.dist-info/sboms/opencv.cdx.json,sha256=ATex-BysD8SgsmzwbF8T3jwHedHA_RBYyqgJlC-Amew,866
|
|
16
|
-
pypatchmatch-2.1.0.dist-info/RECORD,,
|
|
File without changes
|
{pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/SoftFloat-COPYING.txt
RENAMED
|
File without changes
|
{pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/dlpack-LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
{pypatchmatch-2.1.0.dist-info → pypatchmatch-2.2.0.dist-info}/licenses/opencv/opencv-LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|