Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/test_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
# see supported versions at
# https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
# test only the latest 3.x on mac
# test only the latest 3.x on windows
exclude:
Expand Down Expand Up @@ -85,27 +85,27 @@ jobs:
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash

- uses: actions/cache@v1
- uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- uses: actions/cache@v1
- uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- uses: actions/cache@v1
- uses: actions/cache@v4
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Requires scikit-image >= 0.18.0

Changes in the tests require a different minimal
`scikit-image` version. Older versions might work
but will be untested.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Support Python >=3.7,<=3.12
1 change: 1 addition & 0 deletions changelogs/master/changed/20241217_add_opencv4_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add OpenCV4 suport
6 changes: 6 additions & 0 deletions changelogs/master/fixed/20240918_fix_numpy_2_sctypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Fix broken dtypes for numpy 2.0 #856

`np.sctypes` was removed in the NumPy 2.0.
All occurences were replaced with a set of
the specific NumPy types.

5 changes: 5 additions & 0 deletions changelogs/master/fixed/20241025_fix_cval_is_depreciated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Replace default (and depreciated) cval with replacement

In `skimage.measure.block_reduce` in `imgaug.pool` the constant value is
set by depreciated `cval` variable althought replacement `pad_cval` is
available.
8 changes: 8 additions & 0 deletions changelogs/master/fixed/20241111_fix_failing_test_seed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Relax test condition for unlucky seed choice

After trying back and forth I came to the conclusion that the
`test/augmenters/test_geometric.py:_test_image_cbaoi_alignment`fails
sindce target value is highly dependend on the seed value. With `seed=1` for `iaa.ElasticTransformation` `count_bad` goes to 0.

This provides the conclusion even with a changed seed it cannot be granted that the test will pass for future random generators. Thus
a relaxed target value might be the better choice.
7 changes: 7 additions & 0 deletions changelogs/master/fixed/20241127_fix_zero_sized_arrays.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OpenCV 3 does not support zero-sized arrays

NumPy 1.23 can create zero-sized arrays which
cannot be handled by OpenCV in `_invert_uint8_subtract_`
in `imgaug/augmenters/arithmetic.py`. If a zero-sized
array is detected directly return it without further
processing.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changed behavior of `_augment_images_by_samples`

The cval test became obsolete for skimage > 0.19 since the piecewise
tested affine transform does not produce empty pixels anymore. The
test for cval == 0 only passed due to uint overflows.
7 changes: 7 additions & 0 deletions changelogs/master/fixed/20241204_fix_scikit-image_warp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Mitigate different behavior for scikit-image's transform.warp

Prior to `scikit-image=0.19.0` `transform.warp` converted float16 images
implicitly to float64 prior to the calculation. This has changed such
that we need to convert the image to a supported floating point format
ourselves in `_warp_affine_arr_skimage` and `_augment_images_by_samples`
in `imgaug/augmenters/geometric.py`.
15 changes: 15 additions & 0 deletions changelogs/master/fixed/20241206_fix_skimage_determinism.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create imagecorruptions fork

Since `scikit-image >= 0.19.0` the determinism of some
functions cannot be controlled via manipulating the global
NumPy random generator seed. This results in random behavior
for tests involving `imagecorruptions` functions.
The only solutions is to add a seed parameter to the repective
functions. A corresponding upstream pull request is pending but
the changes are low such that a `imagecorruptions` fork is required.

Another problem is the broken support of the `imagecorruptions`
main branch for older `scikit-image` versions.

In the future versions will merge the fork into the `imgaug` codebase and
also require newer `scikit-image` versions.
3 changes: 3 additions & 0 deletions changelogs/master/fixed/20241213_fix_add_numpy_126_support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add NumPy 1.26 support

Add the support of NumPy 1.26 to `test/test_random.py`.
9 changes: 9 additions & 0 deletions changelogs/master/fixed/20241216_fix_failing_int128_tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Delete different test routines for float128 systems

The test `test_unusual_channel_numbers` in
`test/augmenters/test_contrast.py` ran different test routines
depending on the float128 support of the system.

Yet, the main reason for the different behavior is the `params.draw_samples` call in `contrast.py:71` which converts a regular python int into a numpy array of int dtype and thus resulted in different floating point rounding errors.

This behavior was not mirrored in the expected test output and thus resulted in different outcomes on systems with different floating point support.
3 changes: 3 additions & 0 deletions changelogs/master/fixed/20241216_fix_seed_always_as_int.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Make sure `random.seed` received int

The multicore support was broken to to differend seed dtypes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Polygon test was inconsistent

`test_alpha_is_080` in `test/augmentables/test_polys.py`
hard-coded inconsistent behavior of `scikit-image` which
was fixed with `scikit-image >=0.18.0`.

Until this point, the polygon left and right boundaries were handled
differently.
6 changes: 6 additions & 0 deletions changelogs/master/refactored/20230413_replace_numpy_bool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Replace numpy bool with standard bool #832

This commit replaces all occurences of the
dtype `np.bool` with `bool` from the python
standard library. `np.bool` is marked as
depreciated in `numpy >= 1.20`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Change numpy complex types #840

The dtype `np.complex` is depreciated in numpy >= 1.20.
All occurrences where replaced by `np.complex128`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changed github actions

Version 1 of `actions/cache` is now depreciated.
The pipeline switched version 4.

Since `requirements.txt` was deleted, the caching
not relies on `setup.py` instead.

Python 3.7 is not available on `ubuntu-latest` runners.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def get_install_requirements(main_requires, alternative_requires):
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
Loading