Skip to content

Commit 071e18d

Browse files
committed
Albumentations Lambda support
1 parent 9c79ffa commit 071e18d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

segmentation_models_pytorch/encoders/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_preprocessing_fn(encoder_name, pretrained='imagenet'):
4545
mean = settings[pretrained].get('mean')
4646
std = settings[pretrained].get('std')
4747

48-
def _preprocess_input(x):
49-
return preprocess_input(x, mean=mean, std=std, input_space=input_space, input_range=input_range)
48+
def _preprocess_input(x, **kwargs):
49+
return preprocess_input(x, mean=mean, std=std, input_space=input_space, input_range=input_range, **kwargs)
5050

5151
return _preprocess_input

segmentation_models_pytorch/encoders/_preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33

4-
def preprocess_input(x, mean=None, std=None, input_space='RGB', input_range=None):
4+
def preprocess_input(x, mean=None, std=None, input_space='RGB', input_range=None, **kwargs):
55

66
if input_space == 'BGR':
77
x = x[..., ::-1].copy()

0 commit comments

Comments
 (0)