зеркало из https://github.com/microsoft/torchgeo.git
Bump pillow from 10.3.0 to 10.4.0 in /requirements (#2150)
This commit is contained in:
Родитель
0448d6d945
Коммит
f0a2571c98
|
@ -26,7 +26,7 @@ repos:
|
|||
- lightning>=2.0.9
|
||||
- matplotlib>=3.8.1
|
||||
- numpy>=1.22
|
||||
- pillow>=10.3.0
|
||||
- pillow>=10.4.0
|
||||
- pytest>=6.1.2
|
||||
- pyvista>=0.34.2
|
||||
- scikit-image>=0.22.0
|
||||
|
|
|
@ -63,13 +63,9 @@ for batch in datamodule.test_dataloader():
|
|||
data = sample[key]
|
||||
if key == 'image':
|
||||
data = data[[2, 1, 0]].permute(1, 2, 0).numpy().astype('uint8')
|
||||
Image.fromarray(data, 'RGB').save( # type: ignore[no-untyped-call]
|
||||
f'{path}/{key}.png'
|
||||
)
|
||||
Image.fromarray(data, 'RGB').save(f'{path}/{key}.png')
|
||||
else:
|
||||
data = data * 255 / 4
|
||||
data = data.numpy().astype('uint8').squeeze()
|
||||
Image.fromarray(data, 'L').save( # type: ignore[no-untyped-call]
|
||||
f'{path}/{key}.png'
|
||||
)
|
||||
Image.fromarray(data, 'L').save(f'{path}/{key}.png')
|
||||
i += 1
|
||||
|
|
|
@ -10,7 +10,7 @@ lightning[pytorch-extra]==2.2.5
|
|||
matplotlib==3.9.0
|
||||
numpy==1.26.4
|
||||
pandas==2.2.2
|
||||
pillow==10.3.0
|
||||
pillow==10.4.0
|
||||
pyproj==3.6.1
|
||||
rasterio==1.3.10
|
||||
rtree==1.2.0
|
||||
|
|
|
@ -169,7 +169,7 @@ class SeasonalContrastS2(NonGeoDataset):
|
|||
# what could be sped up throughout later. There is also a potential
|
||||
# slowdown here from converting to/from a PIL Image just to resize.
|
||||
# https://gist.github.com/calebrob6/748045ac8d844154067b2eefa47de92f
|
||||
pil_image = Image.fromarray(band_data) # type: ignore[no-untyped-call]
|
||||
pil_image = Image.fromarray(band_data)
|
||||
# Moved in PIL 9.1.0
|
||||
try:
|
||||
resample = Image.Resampling.BILINEAR
|
||||
|
|
Загрузка…
Ссылка в новой задаче