mirror of
https://github.com/deepinsight/insightface.git
synced 2026-03-05 15:33:25 +00:00
a big tree refine
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## Python package of insightface README
|
||||
## Python package
|
||||
|
||||
|
||||
For insightface pip-package <= 0.1.5, we use MXNet as inference backend, please download all models from [onedrive](https://1drv.ms/u/s!AswpsDO2toNKrUy0VktHTWgIQ0bn?e=UEF7C4), and put them all under `~/.insightface/models/` directory.
|
||||
|
||||
BIN
python-package/insightface/data/images/Tom_Hanks_54745.png
Normal file
BIN
python-package/insightface/data/images/Tom_Hanks_54745.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
python-package/insightface/data/images/t1.jpg
Normal file
BIN
python-package/insightface/data/images/t1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
@@ -82,4 +82,14 @@ class ArcFaceONNX:
|
||||
sim = np.dot(feat1, feat2) / (norm(feat1) * norm(feat2))
|
||||
return sim
|
||||
|
||||
def forward(self, imgs):
|
||||
if not isinstance(imgs, list):
|
||||
imgs = [imgs]
|
||||
input_size = self.input_size
|
||||
|
||||
blob = cv2.dnn.blobFromImages(imgs, 1.0 / self.input_std, input_size,
|
||||
(self.input_mean, self.input_mean, self.input_mean), swapRB=True)
|
||||
net_out = self.session.run(self.output_names, {self.input_name: blob})[0]
|
||||
return net_out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user