From e3046b61768c917c3069179e3dd0dd6d4258fa84 Mon Sep 17 00:00:00 2001 From: LielinJiang Date: Thu, 22 Oct 2020 13:22:07 +0000 Subject: [PATCH] update requirements.txt --- ppgan/datasets/unpaired_dataset.py | 4 ++-- ppgan/modules/first_order.py | 2 +- requirments.txt | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ppgan/datasets/unpaired_dataset.py b/ppgan/datasets/unpaired_dataset.py index 232f7bd..494099c 100644 --- a/ppgan/datasets/unpaired_dataset.py +++ b/ppgan/datasets/unpaired_dataset.py @@ -64,8 +64,8 @@ class UnpairedDataset(BaseDataset): index_B = random.randint(0, self.B_size - 1) B_path = self.B_paths[index_B] - A_img = cv2.imread(A_path) - B_img = cv2.imread(B_path) + A_img = cv2.cvtColor(cv2.imread(A_path), cv2.COLOR_BGR2RGB) + B_img = cv2.cvtColor(cv2.imread(B_path), cv2.COLOR_BGR2RGB) # apply image transformation A = self.transform_A(A_img) B = self.transform_B(B_img) diff --git a/ppgan/modules/first_order.py b/ppgan/modules/first_order.py index 7751171..3e84d8a 100644 --- a/ppgan/modules/first_order.py +++ b/ppgan/modules/first_order.py @@ -118,7 +118,7 @@ class DownBlock2d(nn.Layer): padding=padding, groups=groups) self.norm = nn.BatchNorm2D(out_features) - self.pool = nn.AvgPool2d(kernel_size=(2, 2)) + self.pool = nn.AvgPool2D(kernel_size=(2, 2)) def forward(self, x): out = self.conv(x) diff --git a/requirments.txt b/requirments.txt index 51a8cf8..2816f6b 100644 --- a/requirments.txt +++ b/requirments.txt @@ -2,3 +2,5 @@ tqdm PyYAML>=5.1 scikit-image>=0.14.0 scipy>=1.1.0 +opencv-python +imageio-ffmpeg -- GitLab