Skip to content

Latest commit

 

History

History

vggface2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

VGGFace2 Dataset for Face Recognition

Input

  • image_a : Input
  • image_b : Input
  • image_c : Input

Ailia input shape : (1, 3, 224, 224)

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

By default, the following two images are loaded: couple_a.jpg, couple_c.jpg (Same person example)

$ python3 vggface2.py
...
couple_a.jpg vs couple_c.jpg = 0.6718782782554626
Same person

If you want to specify images, speficy the paths of the two images after the --inputs option.

$ python3 vggface2.py --inputs IMAGE_PATH1 IMAGE_PATH2

By adding --video option, you can compare the face from video frame and the still image, and calculate the distance. If you pass 0 as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.

$ python3 vggface2.py --video VIDEO_PATH IMAGE_PATH
$ python3 vggface2.py --video 0 IMAGE_PATH

Reference

Framework

Caffe

Model Format

CaffeModel

Netron

resnet50_scratch.prototxt