mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2025-05-17 07:40:16 -07:00
udpate
This commit is contained in:
parent
7a6b04e5cb
commit
1c09b47fcb
4
.github/workflows/pylint.yml
vendored
4
.github/workflows/pylint.yml
vendored
@ -25,5 +25,5 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
run: |
|
run: |
|
||||||
flake8 .
|
flake8 .
|
||||||
isort --check-only --diff basicsr/ options/ scripts/ tests/ inference/ setup.py
|
isort --check-only --diff data/ archs/ models/ train.py inference_gfpgan_full.py
|
||||||
yapf -r -d basicsr/ options/ scripts/ tests/ inference/ setup.py
|
yapf -r -d data/ archs/ models/ train.py inference_gfpgan_full.py
|
||||||
|
@ -202,16 +202,18 @@ class GFPGANModel(BaseModel):
|
|||||||
if 'gt' in data:
|
if 'gt' in data:
|
||||||
self.gt = data['gt'].to(self.device)
|
self.gt = data['gt'].to(self.device)
|
||||||
|
|
||||||
import torchvision
|
# uncomment to check data
|
||||||
if self.opt['rank'] == 0:
|
# import torchvision
|
||||||
import os
|
# if self.opt['rank'] == 0:
|
||||||
os.makedirs('tmp/gt', exist_ok=True)
|
# import os
|
||||||
os.makedirs('tmp/lq', exist_ok=True)
|
# os.makedirs('tmp/gt', exist_ok=True)
|
||||||
print(self.idx)
|
# os.makedirs('tmp/lq', exist_ok=True)
|
||||||
torchvision.utils.save_image(
|
# print(self.idx)
|
||||||
self.gt, f'tmp/gt/gt_{self.idx}.png', nrow=4, padding=2, normalize=True, range=(-1, 1))
|
# torchvision.utils.save_image(
|
||||||
torchvision.utils.save_image(
|
# self.gt, f'tmp/gt/gt_{self.idx}.png', nrow=4, padding=2, normalize=True, range=(-1, 1))
|
||||||
self.lq, f'tmp/lq/lq{self.idx}.png', nrow=4, padding=2, normalize=True, range=(-1, 1))
|
# torchvision.utils.save_image(
|
||||||
|
# self.lq, f'tmp/lq/lq{self.idx}.png', nrow=4, padding=2, normalize=True, range=(-1, 1))
|
||||||
|
# self.idx = self.idx + 1
|
||||||
|
|
||||||
if 'loc_left_eye' in data:
|
if 'loc_left_eye' in data:
|
||||||
# get facial component locations, shape (batch, 4)
|
# get facial component locations, shape (batch, 4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user