yamildiego
commited on
Commit
·
868133d
1
Parent(s):
515873a
with the print so
Browse files- .insightface/models/antelopev2.zip +3 -0
- .insightface/models/antelopev2/1k3d68.onnx +3 -0
- .insightface/models/antelopev2/2d106det.onnx +3 -0
- .insightface/models/antelopev2/genderage.onnx +3 -0
- .insightface/models/antelopev2/glintr100.onnx +3 -0
- .insightface/models/antelopev2/scrfd_10g_bnkps.onnx +3 -0
- handler.py +6 -1
- root/.insightface/models/antelopev2.zip +3 -0
- root/.insightface/models/antelopev2/1k3d68.onnx +3 -0
- root/.insightface/models/antelopev2/2d106det.onnx +3 -0
- root/.insightface/models/antelopev2/genderage.onnx +3 -0
- root/.insightface/models/antelopev2/glintr100.onnx +3 -0
- root/.insightface/models/antelopev2/scrfd_10g_bnkps.onnx +3 -0
- root/.insightface/models/test_ce/1k3d68.onnx +3 -0
- root/.insightface/models/test_ce/2d106det.onnx +3 -0
- root/.insightface/models/test_ce/genderage.onnx +3 -0
- root/.insightface/models/test_ce/glintr100.onnx +3 -0
- root/.insightface/models/test_ce/scrfd_10g_bnkps.onnx +3 -0
.insightface/models/antelopev2.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e182f14fc6e80b3bfa375b33eb6cff7ee05d8ef7633e738d1c89021dcf0c5c5
|
3 |
+
size 360662982
|
.insightface/models/antelopev2/1k3d68.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df5c06b8a0c12e422b2ed8947b8869faa4105387f199c477af038aa01f9a45cc
|
3 |
+
size 143607619
|
.insightface/models/antelopev2/2d106det.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f001b856447c413801ef5c42091ed0cd516fcd21f2d6b79635b1e733a7109dbf
|
3 |
+
size 5030888
|
.insightface/models/antelopev2/genderage.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4fde69b1c810857b88c64a335084f1c3fe8f01246c9a191b48c7bb756d6652fb
|
3 |
+
size 1322532
|
.insightface/models/antelopev2/glintr100.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ab1d6435d639628a6f3e5008dd4f929edf4c4124b1a7169e1048f9fef534cdf
|
3 |
+
size 260665334
|
.insightface/models/antelopev2/scrfd_10g_bnkps.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5838f7fe053675b1c7a08b633df49e7af5495cee0493c7dcf6697200b85b5b91
|
3 |
+
size 16923827
|
handler.py
CHANGED
@@ -24,6 +24,8 @@ from controlnet_aux import OpenposeDetector
|
|
24 |
import torch.nn.functional as F
|
25 |
from torchvision.transforms import Compose
|
26 |
|
|
|
|
|
27 |
# global variable
|
28 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
29 |
dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
|
@@ -48,7 +50,10 @@ class EndpointHandler():
|
|
48 |
# providers=["CPUExecutionProvider"],
|
49 |
# )
|
50 |
|
51 |
-
|
|
|
|
|
|
|
52 |
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
53 |
|
54 |
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
|
|
|
24 |
import torch.nn.functional as F
|
25 |
from torchvision.transforms import Compose
|
26 |
|
27 |
+
import os
|
28 |
+
|
29 |
# global variable
|
30 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
dtype = torch.float16 if str(device).__contains__("cuda") else torch.float32
|
|
|
50 |
# providers=["CPUExecutionProvider"],
|
51 |
# )
|
52 |
|
53 |
+
dir_path = os.path.join("/repository", "models", "antelopev2")
|
54 |
+
print(dir_path)
|
55 |
+
|
56 |
+
self.app = FaceAnalysis(name="antelopev2", root="/repository", providers=["CPUExecutionProvider"])
|
57 |
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
58 |
|
59 |
openpose = OpenposeDetector.from_pretrained("lllyasviel/ControlNet")
|
root/.insightface/models/antelopev2.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e182f14fc6e80b3bfa375b33eb6cff7ee05d8ef7633e738d1c89021dcf0c5c5
|
3 |
+
size 360662982
|
root/.insightface/models/antelopev2/1k3d68.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df5c06b8a0c12e422b2ed8947b8869faa4105387f199c477af038aa01f9a45cc
|
3 |
+
size 143607619
|
root/.insightface/models/antelopev2/2d106det.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f001b856447c413801ef5c42091ed0cd516fcd21f2d6b79635b1e733a7109dbf
|
3 |
+
size 5030888
|
root/.insightface/models/antelopev2/genderage.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4fde69b1c810857b88c64a335084f1c3fe8f01246c9a191b48c7bb756d6652fb
|
3 |
+
size 1322532
|
root/.insightface/models/antelopev2/glintr100.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ab1d6435d639628a6f3e5008dd4f929edf4c4124b1a7169e1048f9fef534cdf
|
3 |
+
size 260665334
|
root/.insightface/models/antelopev2/scrfd_10g_bnkps.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5838f7fe053675b1c7a08b633df49e7af5495cee0493c7dcf6697200b85b5b91
|
3 |
+
size 16923827
|
root/.insightface/models/test_ce/1k3d68.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:df5c06b8a0c12e422b2ed8947b8869faa4105387f199c477af038aa01f9a45cc
|
3 |
+
size 143607619
|
root/.insightface/models/test_ce/2d106det.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f001b856447c413801ef5c42091ed0cd516fcd21f2d6b79635b1e733a7109dbf
|
3 |
+
size 5030888
|
root/.insightface/models/test_ce/genderage.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4fde69b1c810857b88c64a335084f1c3fe8f01246c9a191b48c7bb756d6652fb
|
3 |
+
size 1322532
|
root/.insightface/models/test_ce/glintr100.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ab1d6435d639628a6f3e5008dd4f929edf4c4124b1a7169e1048f9fef534cdf
|
3 |
+
size 260665334
|
root/.insightface/models/test_ce/scrfd_10g_bnkps.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5838f7fe053675b1c7a08b633df49e7af5495cee0493c7dcf6697200b85b5b91
|
3 |
+
size 16923827
|