mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2025-05-18 08:10:16 -07:00
update gfpgan model
This commit is contained in:
parent
f565932fb0
commit
237e0c13e7
@ -202,6 +202,12 @@ class GFPGANModel(BaseModel):
|
||||
if 'gt' in data:
|
||||
self.gt = data['gt'].to(self.device)
|
||||
|
||||
if 'loc_left_eye' in data:
|
||||
# get facial component locations, shape (batch, 4)
|
||||
self.loc_left_eyes = data['loc_left_eye']
|
||||
self.loc_right_eyes = data['loc_right_eye']
|
||||
self.loc_mouths = data['loc_mouth']
|
||||
|
||||
# uncomment to check data
|
||||
# import torchvision
|
||||
# if self.opt['rank'] == 0:
|
||||
@ -215,12 +221,6 @@ class GFPGANModel(BaseModel):
|
||||
# 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)
|
||||
self.loc_left_eyes = data['loc_left_eye']
|
||||
self.loc_right_eyes = data['loc_right_eye']
|
||||
self.loc_mouths = data['loc_mouth']
|
||||
|
||||
def construct_img_pyramid(self):
|
||||
pyramid_gt = [self.gt]
|
||||
down_img = self.gt
|
||||
|
Loading…
x
Reference in New Issue
Block a user