diff --git a/modules/image/image_processing/enlightengan/enlighten_inference/__init__.py b/modules/image/image_processing/enlightengan/enlighten_inference/__init__.py index b9ebee0f89978664218ff667170b03e1a2172b2d..5736aafcbcd81bdfdfe284a177005f98495354d3 100755 --- a/modules/image/image_processing/enlightengan/enlighten_inference/__init__.py +++ b/modules/image/image_processing/enlightengan/enlighten_inference/__init__.py @@ -14,7 +14,7 @@ class EnlightenOnnxModel: self.graph = InferenceSession(model or get_relative_path(__file__, 'enlighten.onnx')) def __repr__(self): - return f'' + return ' {}'.format(id(self)) def _pad(self, img): h, w, _ = img.shape @@ -26,7 +26,7 @@ class EnlightenOnnxModel: def _preprocess(self, img): if len(img.shape) != 3: - raise ValueError(f'Incorrect shape: expected 3, got {len(img.shape)}') + raise ValueError('Incorrect shape: expected 3, got {}'.format(img.shape)) return np.expand_dims(np.transpose(img, (2, 0, 1)).astype(np.float32) / 255., 0) def predict(self, img):