insightfaceWrapper
Wrapper for easier inference for insightface
Install
pip install -U insightfacewrapper
Models
ms1mv3_arcface_r18ms1mv3_arcface_r34ms1mv3_arcface_r50ms1mv3_arcface_r100glint360k_cosface_r18glint360k_cosface_r34glint360k_cosface_r50glint360k_cosface_r100
from insightfacewrapper.get_model import get_model
model = get_model(<model_name>)
model.eval()
Inference
Based on the original
inference script,
image should be resized to (112, 112).
def normalize(image: np.ndarray) -> np.ndarray:
image /= 255
image -= 0.5
image /= 0.5
return image
def image2input(image: np.ndarray) -> np.ndarray:
transposed = np.transpose(image, (2, 0, 1)).astype(np.float32)
return normalize(np.expand_dims(np.ascontiguousarray(transposed), 0))
torch_input = image2input(image)
with torch.inference_engine():
result = model(torch_input)[0].cpu().numpy()
Metadata
Release files for insightfacewrapper 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| insightfacewrapper-0.0.4.tar.gz | 4.5 kB | Without provenance | Details for insightfacewrapper-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| insightfacewrapper-0.0.4-py3.8.egg | Legacy Egg format | - | - | Details for insightfacewrapper-0.0.4-py3.8.egg |
Total release size: 8.4 kB
Release files / insightfacewrapper-0.0.4.tar.gz
| Download URL | insightfacewrapper-0.0.4.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0c18d4e4e31ed373eecce288e2664a73d22d78f32ad4e2eb8d5bce09a8be3ed
|
|
BLAKE2b-256 checksum How to use checksums |
81b01c4059b0cc262859ddc3f88029f3dff6f9a10c21bf3eadaa3d05fd6399d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / insightfacewrapper-0.0.4-py3.8.egg
| Download URL | insightfacewrapper-0.0.4-py3.8.egg |
|---|---|
| Size | 3.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
f76cceadecc1a15a2da00cd8f9500d225cf7b9fc19cc29b60d23805589b9e1ea
|
|
BLAKE2b-256 checksum How to use checksums |
5ac35f2971a74f7cbad4421172f3dda749611918f4b77ee3cd689e4502807a16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for insightfacewrapper 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.