MCPcopy
hub / github.com/facefusion/facefusion / create_static_model_set

Function create_static_model_set

facefusion/face_classifier.py:15–47  ·  view source on GitHub ↗
(download_scope : DownloadScope)

Source from the content-addressed store, hash-verified

13
14@lru_cache()
15def create_static_model_set(download_scope : DownloadScope) -> ModelSet:
16 return\
17 {
18 'fairface':
19 {
20 '__metadata__':
21 {
22 'vendor': 'dchen236',
23 'license': 'CC-BY-4.0',
24 'year': 2021
25 },
26 'hashes':
27 {
28 'face_classifier':
29 {
30 'url': resolve_download_url('models-3.0.0', 'fairface.hash'),
31 'path': resolve_relative_path('../.assets/models/fairface.hash')
32 }
33 },
34 'sources':
35 {
36 'face_classifier':
37 {
38 'url': resolve_download_url('models-3.0.0', 'fairface.onnx'),
39 'path': resolve_relative_path('../.assets/models/fairface.onnx')
40 }
41 },
42 'template': 'arcface_112_v2',
43 'size': (224, 224),
44 'mean': [ 0.485, 0.456, 0.406 ],
45 'standard_deviation': [ 0.229, 0.224, 0.225 ]
46 }
47 }
48
49
50def get_inference_pool() -> InferencePool:

Callers 1

get_model_optionsFunction · 0.70

Calls 2

resolve_download_urlFunction · 0.90
resolve_relative_pathFunction · 0.90

Tested by

no test coverage detected