Skip to content

v2.0.0b2

Pre-release
Pre-release

Choose a tag to compare

@mauwii mauwii released this 25 Sep 17:41
d8a1332

Second beta of 2.0.0, with fixes from a final review before the release. Please test it,
especially if you rely on seeds, call inpaint from several threads or use
global_mask, and report problems before 2.0.0.

pip install --pre PyPatchMatch==2.0.0b2

Changes that affect results

  • Results for a given seed differ from 2.0.0b1 and 1.x. The randomized search uses a
    per-thread std::mt19937 instead of rand(), so concurrent calls from several
    threads are reproducible and the random sequence no longer depends on the platform's
    C runtime. The quality of the results is unchanged.
  • Pixels under global_mask keep their input values; they came out black before.
    They are still neither filled nor used as a source.

Fixes

  • patch_size < 1 and an empty ijmap raise ValueError instead of crashing or
    hanging.
  • Fixed a data race when several threads start their first inpainting at the same time.
  • C++: the nearest-neighbor field checks target coordinates against the target size.
    This only matters when the classes are used directly, not for Inpainting.

Packaging

  • The wheels include the licenses of the bundled OpenCV code in
    .dist-info/licenses/opencv.
  • The arm64 wheels no longer contain OpenCV's Carotene and KleidiCV libraries and are
    smaller (Linux aarch64: 3.1 MB → 2.0 MB, macOS arm64: 2.8 MB → 1.6 MB).
  • The README lists the supported platforms and documents all public functions,
    including global_mask.