Commit ·
6cb86d0
1
Parent(s): 0171dff
test
Browse files- handler.py +9 -2
handler.py
CHANGED
|
@@ -35,9 +35,16 @@ class EndpointHandler():
|
|
| 35 |
def __init__(self, model_dir):
|
| 36 |
|
| 37 |
print("Loading FaceAnalysis", model_dir)
|
| 38 |
-
self.app = FaceAnalysis(name="buffalo_l", providers=["CPUExecutionProvider"])
|
| 39 |
-
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
|
| 42 |
# depth_anything = DepthAnything.from_pretrained('LiheYoung/depth_anything_vitl14').to(device).eval()
|
| 43 |
|
|
|
|
| 35 |
def __init__(self, model_dir):
|
| 36 |
|
| 37 |
print("Loading FaceAnalysis", model_dir)
|
| 38 |
+
# self.app = FaceAnalysis(name="buffalo_l", providers=["CPUExecutionProvider"])
|
| 39 |
+
# self.app.prepare(ctx_id=0, det_size=(640, 640))
|
| 40 |
|
| 41 |
+
self.app = FaceAnalysis(
|
| 42 |
+
name="antelopev2",
|
| 43 |
+
root="./antelopev2",
|
| 44 |
+
providers=["CPUExecutionProvider"],
|
| 45 |
+
)
|
| 46 |
+
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
| 47 |
+
|
| 48 |
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
|
| 49 |
# depth_anything = DepthAnything.from_pretrained('LiheYoung/depth_anything_vitl14').to(device).eval()
|
| 50 |
|