Bobholamovic пре 2 година
родитељ
комит
c73a52465d
2 измењених фајлова са 6 додато и 10 уклоњено
  1. 3 7
      paddlers/tasks/restorer.py
  2. 3 3
      test_tipc/docs/test_train_inference_python.md

+ 3 - 7
paddlers/tasks/restorer.py

@@ -655,17 +655,13 @@ class BaseRestorer(BaseModel):
         if squeeze:
             tensor = tensor.squeeze()
         images = tensor.numpy().astype('float32')
-        images = self._normalize(
-            images, copy=True, clip=True, quantize=quantize)
+        images = self._normalize(images, copy=True, quantize=quantize)
         return images
 
-    def _normalize(self, im, copy=False, clip=True, quantize=True):
+    def _normalize(self, im, copy=False, quantize=True):
         if copy:
             im = im.copy()
-        if clip:
-            im = np.clip(im, self.min_max[0], self.min_max[1])
-        im -= self.min_max[0]
-        im /= self.min_max[1] - self.min_max[0]
+        im = np.clip(im, self.min_max[0], self.min_max[1])
         if quantize:
             im *= 255
             im = im.astype('uint8')

+ 3 - 3
test_tipc/docs/test_train_inference_python.md

@@ -28,9 +28,9 @@ Linux GPU/CPU 基础训练推理测试的主程序为`test_train_inference_pytho
 |  目标检测  | PP-YOLO Tiny | 正常训练 | 正常训练 | 暂无稳定精度 |
 |  目标检测  | PP-YOLOv2 | 正常训练 | 正常训练 | 暂无稳定精度 |
 |  目标检测  | YOLOv3 | 正常训练 | 正常训练 | 暂无稳定精度 |
-|  图像复原  | DRN | 正常训练 | 正常训练 | PSNR=24.14 |
-|  图像复原  | ESRGAN | 正常训练 | 正常训练 | PSNR=21.25 |
-|  图像复原  | LESRCNN | 正常训练 | 正常训练 | PSNR=22.96 |
+|  图像复原  | DRN | 正常训练 | 正常训练 | PSNR=24.92 |
+|  图像复原  | ESRGAN | 正常训练 | 正常训练 | PSNR=21.39 |
+|  图像复原  | LESRCNN | 正常训练 | 正常训练 | PSNR=23.67 |
 |  图像分割  | BiSeNet V2 | 正常训练 | 正常训练 | mIoU=70.52% |
 |  图像分割  | DeepLab V3+ | 正常训练 | 正常训练 | mIoU=64.41% |
 |  图像分割  | FarSeg | 正常训练 | 正常训练 | mIoU=50.60% |