Shortcuts

mmedit.models.editors.arcface

Package Contents

Classes

IDLossModel

Face id loss model.

class mmedit.models.editors.arcface.IDLossModel(ir_se50_weights=None)[源代码]

Bases: torch.nn.Module

Face id loss model.

参数

ir_se50_weights (str, optional) – Url of ir-se50 weights. Defaults to None.

_ir_se50_url = 'https://gg0ltg.by.files.1drv.com/y4m3fNNszG03z9n8JQ7EhdtQKW8tQVQMFBisPVRgoXi_UfP8pKSSqv8RJNmHy2Ja...'
extract_feats(x)

Extracting face features.

参数

x (torch.Tensor) – Image tensor of faces.

返回

Face features.

返回类型

torch.Tensor

forward(pred=None, gt=None)

Calculate face loss.

参数
  • pred (torch.Tensor, optional) – Predictions of face images. Defaults to None.

  • gt (torch.Tensor, optional) – Ground truth of face images. Defaults to None.

返回

A tuple contain face similarity loss and

improvement.

返回类型

Tuple(float, float)

Read the Docs v: latest
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.