Commit ·
8e23177
1
Parent(s): 101eab1
add models
Browse files- .DS_Store +0 -0
- depth_anything/dpt.py +11 -6
- handler.py +10 -5
- insightface/.DS_Store +0 -0
- insightface/antelopev2.zip +3 -0
- insightface/antelopev2/1k3d68.onnx +3 -0
- insightface/antelopev2/2d106det.onnx +3 -0
- insightface/antelopev2/genderage.onnx +3 -0
- insightface/antelopev2/glintr100.onnx +3 -0
- insightface/antelopev2/scrfd_10g_bnkps.onnx +3 -0
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
depth_anything/dpt.py
CHANGED
|
@@ -140,13 +140,18 @@ class DPT_DINOv2(nn.Module):
|
|
| 140 |
def __init__(self, encoder='vitl', features=256, out_channels=[256, 512, 1024, 1024], use_bn=False, use_clstoken=False, localhub=False):
|
| 141 |
super(DPT_DINOv2, self).__init__()
|
| 142 |
|
| 143 |
-
assert encoder in ['vits', 'vitb', 'vitl']
|
| 144 |
|
| 145 |
-
# in case the Internet connection is not stable, please load the DINOv2 locally
|
| 146 |
-
if localhub:
|
| 147 |
-
|
| 148 |
-
else:
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
dim = self.pretrained.blocks[0].attn.qkv.in_features
|
| 152 |
|
|
|
|
| 140 |
def __init__(self, encoder='vitl', features=256, out_channels=[256, 512, 1024, 1024], use_bn=False, use_clstoken=False, localhub=False):
|
| 141 |
super(DPT_DINOv2, self).__init__()
|
| 142 |
|
| 143 |
+
# assert encoder in ['vits', 'vitb', 'vitl']
|
| 144 |
|
| 145 |
+
# # in case the Internet connection is not stable, please load the DINOv2 locally
|
| 146 |
+
# if localhub:
|
| 147 |
+
# self.pretrained = torch.hub.load('torchhub/facebookresearch_dinov2_main', 'dinov2_{:}14'.format(encoder), source='local', pretrained=False)
|
| 148 |
+
# else:
|
| 149 |
+
# self.pretrained = torch.hub.load('facebookresearch/dinov2', 'dinov2_{:}14'.format(encoder))
|
| 150 |
+
|
| 151 |
+
# self.pretrained = torch.hub.load('facebookresearch/dinov2', 'dinov2_{:}14'.format(encoder))
|
| 152 |
+
self.pretrained = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14')
|
| 153 |
+
|
| 154 |
+
|
| 155 |
|
| 156 |
dim = self.pretrained.blocks[0].attn.qkv.in_features
|
| 157 |
|
handler.py
CHANGED
|
@@ -156,12 +156,17 @@ class EndpointHandler():
|
|
| 156 |
"canny": get_canny_image,
|
| 157 |
"depth": get_depth_map,
|
| 158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
-
self.app = FaceAnalysis(
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
)
|
|
|
|
| 165 |
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
| 166 |
|
| 167 |
def __call__(self, param):
|
|
|
|
| 156 |
"canny": get_canny_image,
|
| 157 |
"depth": get_depth_map,
|
| 158 |
}
|
| 159 |
+
|
| 160 |
+
model_path = "./insightface/antelopev2"
|
| 161 |
+
|
| 162 |
+
self.app = FaceAnalysis(root=model_path, name='antelopev2')
|
| 163 |
|
| 164 |
+
# self.app = FaceAnalysis(
|
| 165 |
+
# name="antelopev2",
|
| 166 |
+
# root="./",
|
| 167 |
+
# providers=["CPUExecutionProvider"],
|
| 168 |
+
# )
|
| 169 |
+
|
| 170 |
self.app.prepare(ctx_id=0, det_size=(640, 640))
|
| 171 |
|
| 172 |
def __call__(self, param):
|
insightface/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
insightface/antelopev2.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e182f14fc6e80b3bfa375b33eb6cff7ee05d8ef7633e738d1c89021dcf0c5c5
|
| 3 |
+
size 360662982
|
insightface/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/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/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/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/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
|