Spaces:
Runtime error
Runtime error
Upload dataclass.py
Browse files- dataclass.py +16 -0
dataclass.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dataclasses import dataclass, field
|
| 2 |
+
from typing import Dict, Union
|
| 3 |
+
|
| 4 |
+
PARAM = Dict[str, Union[int,float]]
|
| 5 |
+
WEIGHT = str
|
| 6 |
+
NETWORK = Dict[str, Union[PARAM, WEIGHT]]
|
| 7 |
+
|
| 8 |
+
@dataclass
|
| 9 |
+
class TaskConfig:
|
| 10 |
+
localize : Dict[str, NETWORK]
|
| 11 |
+
check_liveness : Dict[str, NETWORK]
|
| 12 |
+
check_mask : Dict[str, NETWORK]
|
| 13 |
+
estimate_headpose : Dict[str, NETWORK]
|
| 14 |
+
extract_vector : Dict[str, NETWORK]
|
| 15 |
+
extract_emotion : Dict[str, NETWORK]
|
| 16 |
+
extract_agegender : Dict[str, NETWORK]
|