Warlord-K commited on
Commit
e85d115
1 Parent(s): 017bb17

Upload folder using huggingface_hub

Browse files
Files changed (7) hide show
  1. 1k3d68.onnx +3 -0
  2. 2d106det.onnx +3 -0
  3. genderage.onnx +3 -0
  4. glintr100.onnx +3 -0
  5. inference.py +12 -1
  6. model.onnx +3 -0
  7. scrfd_10g_bnkps.onnx +3 -0
1k3d68.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df5c06b8a0c12e422b2ed8947b8869faa4105387f199c477af038aa01f9a45cc
3
+ size 143607619
2d106det.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f001b856447c413801ef5c42091ed0cd516fcd21f2d6b79635b1e733a7109dbf
3
+ size 5030888
genderage.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fde69b1c810857b88c64a335084f1c3fe8f01246c9a191b48c7bb756d6652fb
3
+ size 1322532
glintr100.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37afe35066aa3ef11d927da3758dc14dac3d0afed71558fc8488877a5fcf150b
3
+ size 156530760
inference.py CHANGED
@@ -8,4 +8,15 @@ model = get_model("r100", dropout=0.0, fp16=True, num_features=512).cuda()
8
  model.load_state_dict(torch.load("model.pt"))
9
  model.eval()
10
  img = pil_to_tensor(Image.open("test.jpg").resize((112,112))).permute(0, 1, 2).to("cuda", torch.float16).unsqueeze(dim = 0)
11
- embeddings = model(img)
 
 
 
 
 
 
 
 
 
 
 
 
8
  model.load_state_dict(torch.load("model.pt"))
9
  model.eval()
10
  img = pil_to_tensor(Image.open("test.jpg").resize((112,112))).permute(0, 1, 2).to("cuda", torch.float16).unsqueeze(dim = 0)
11
+ embeddings = model(img)
12
+
13
+ from insightface.app import FaceAnalysis
14
+ import insightface
15
+ from huggingface_hub import snapshot_download
16
+ snapshot_download('Warlord-K/resnet100', local_dir='models/antelopev2')
17
+ app = FaceAnalysis(
18
+ name='antelopev2', root='.', providers=['CUDAExecutionProvider', 'CPUExecutionProvider']
19
+ )
20
+ app.prepare(ctx_id=0, det_size=(640, 640))
21
+ handler_ante = insightface.model_zoo.get_model('models/antelopev2/glintr100.onnx')
22
+ handler_ante.prepare(ctx_id=0)
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37afe35066aa3ef11d927da3758dc14dac3d0afed71558fc8488877a5fcf150b
3
+ size 156530760
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