mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2025-05-16 23:30:13 -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
|
||||
run: |
|
||||
flake8 .
|
||||
isort --check-only --diff basicsr/ options/ scripts/ tests/ inference/ setup.py
|
||||
yapf -r -d basicsr/ options/ scripts/ tests/ inference/ setup.py
|
||||
isort --check-only --diff data/ archs/ models/ train.py inference_gfpgan_full.py
|
||||
yapf -r -d data/ archs/ models/ train.py inference_gfpgan_full.py
|
||||
|
@ -202,16 +202,18 @@ class GFPGANModel(BaseModel):
|
||||
if 'gt' in data:
|
||||
self.gt = data['gt'].to(self.device)
|
||||
|
||||
import torchvision
|
||||
if self.opt['rank'] == 0:
|
||||
import os
|
||||
os.makedirs('tmp/gt', exist_ok=True)
|
||||
os.makedirs('tmp/lq', exist_ok=True)
|
||||
print(self.idx)
|
||||
torchvision.utils.save_image(
|
||||
self.gt, f'tmp/gt/gt_{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))
|
||||
# uncomment to check data
|
||||
# import torchvision
|
||||
# if self.opt['rank'] == 0:
|
||||
# import os
|
||||
# os.makedirs('tmp/gt', exist_ok=True)
|
||||
# os.makedirs('tmp/lq', exist_ok=True)
|
||||
# print(self.idx)
|
||||
# torchvision.utils.save_image(
|
||||
# self.gt, f'tmp/gt/gt_{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:
|
||||
# get facial component locations, shape (batch, 4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user