wvinzh / face_feature_extractor_pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A face feature extractor using pretrained models

(Now included: SphereFace, CosFace, InsightFace, VGGFACE2-Resnet50)

Intro

This repo is used to extract feature from face images and save the feature to npy numpy.

Usage

  1. clone this repo and download pretrained models into ./model
    sphereface-onedrive
    cosface-onedrive
    insightface-onedrive
    VGGFace2-resnet-onedrive

  2. then:

 image_list = "../*/img_list.txt"
 image_root_folder = "../*/images"
 feature_folder = "../*/featrues"
 extractor = Extractor('cosface') # ['resnet', 'sphereface','cosface', 'insightface']
 extractor.extract(image_root_folder,image_list,feature_folder)

Reference

sphereface_pytorch
CosFace_pytorch
InsightFace_Pytorch
VGGFace2-pytorch

About

License:MIT License


Languages

Language:Python 100.0%