MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / FaceModel

Class FaceModel

animation/modules/face_model.py:8–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class FaceModel(nn.Module):
9 def __init__(self):
10 super(FaceModel, self).__init__()
11 self.app = FaceAnalysis(
12 name='antelopev2', root='.', providers=['CUDAExecutionProvider', 'CPUExecutionProvider', ]
13 )
14 self.app.prepare(ctx_id=-1, det_size=(640, 640))
15 self.handler_ante = insightface.model_zoo.get_model('models/antelopev2/glintr100.onnx')
16 self.handler_ante.prepare(ctx_id=-1)
17
18 self.face_helper = FaceRestoreHelper(
19 upscale_factor=1,
20 face_size=512,
21 crop_ratio=(1, 1),
22 det_model='retinaface_resnet50',
23 save_ext='png',
24 device="cpu",
25 )
26 self.face_helper.face_parse = init_parsing_model(model_name='bisenet', device="cpu")

Callers 5

mainFunction · 0.90
inference_op.pyFile · 0.90
mainFunction · 0.90
inference_basic.pyFile · 0.90
app.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected