{"id":16916827,"url":"https://github.com/ternaus/insightfacewrapper","last_synced_at":"2025-04-11T17:27:21.990Z","repository":{"id":41146236,"uuid":"508457148","full_name":"ternaus/insightfaceWrapper","owner":"ternaus","description":"Wrapper for easier inference for insightface","archived":false,"fork":false,"pushed_at":"2023-11-07T01:05:28.000Z","size":38,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T13:21:14.681Z","etag":null,"topics":["face-recognition","insightface","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ternaus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-28T21:14:42.000Z","updated_at":"2023-12-08T16:51:18.000Z","dependencies_parsed_at":"2022-07-14T08:31:19.711Z","dependency_job_id":null,"html_url":"https://github.com/ternaus/insightfaceWrapper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2FinsightfaceWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2FinsightfaceWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2FinsightfaceWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2FinsightfaceWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ternaus","download_url":"https://codeload.github.com/ternaus/insightfaceWrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248448988,"owners_count":21105398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["face-recognition","insightface","python"],"created_at":"2024-10-13T19:30:19.413Z","updated_at":"2025-04-11T17:27:21.959Z","avatar_url":"https://github.com/ternaus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# insightfaceWrapper\nWrapper for easier inference for insightface\n\n## Install\n```\npip install -U insightfacewrapper\n```\n\n## Models\n\n* `ms1mv3_arcface_r18`\n* `ms1mv3_arcface_r34`\n* `ms1mv3_arcface_r50`\n* `ms1mv3_arcface_r100`\n* `glint360k_cosface_r18`\n* `glint360k_cosface_r34`\n* `glint360k_cosface_r50`\n* `glint360k_cosface_r100`\n\n\n```python\nfrom insightfacewrapper.get_model import get_model\nmodel = get_model(\u003cmodel_name\u003e)\nmodel.eval()\n```\n\n### Inference\n\nBased on the original\n[inference script](https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/inference.py),\nimage should be resized to `(112, 112)`.\n\n```python\ndef normalize(image: np.ndarray) -\u003e np.ndarray:\n    image /= 255\n    image -= 0.5\n    image /= 0.5\n    return image\n\ndef image2input(image: np.ndarray) -\u003e np.ndarray:\n    transposed = np.transpose(image, (2, 0, 1)).astype(np.float32)\n    return torch.from_numpy(normalize(np.expand_dims(np.ascontiguousarray(transposed), 0)))\n\ntorch_input = image2input(image)\n\nwith torch.inference_engine():\n    result = model(torch_input)[0].cpu().numpy()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Finsightfacewrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fternaus%2Finsightfacewrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Finsightfacewrapper/lists"}