Skip to content

Commit ee290fe

Browse files
Fixed RGB/BGR issue with RRDB models
1 parent e233e92 commit ee290fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: run.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ def main():
227227
# print("normal frame:", idx_frame)
228228
LR_img = images[idx+i_frame] if is_video else cv2.imread(images[idx_frame+i_frame], cv2.IMREAD_COLOR)
229229

230+
if not only_y:
231+
LR_img = cv2.cvtColor(LR_img, cv2.COLOR_BGR2RGB)
232+
230233
# get the bicubic upscale of the center frame to concatenate for SR
231234
if only_y and i_frame == idx_center:
232235
if args.denoise:
@@ -311,7 +314,7 @@ def main():
311314
else:
312315
sr_img = SR
313316

314-
sr_img = util.tensor2np(sr_img, rgb2bgr=only_y) # uint8
317+
sr_img = util.tensor2np(sr_img) # uint8
315318

316319
if not is_video:
317320
# save images

0 commit comments

Comments
 (0)