To get VGG or CASIA network model running:

- install Caffe from http://caffe.berkeleyvision.org/

- install required Python packages:
	python-opencv python-numpy python-sklearn

- download the model files
	- source for VGG: http://www.robots.ox.ac.uk/~vgg/software/vgg_face/, download and unpack vgg_face_caffe.tar.gz.
	- CASIA model trained in Tartu University is available at https://github.com/tambetm/face_kiosk (12.05.2016)



To get Openface running: 
- run the setup at http://cmusatyalab.github.io/openface/setup/

- model files are available at http://cmusatyalab.github.io/openface/models-and-accuracies/. In 12.05.2016, the latest model was nn4.small2

- the face extraction is run with the following command, or use one of the several convenience scripts like extract_CASIA_lfw.sh 
		
	python src/extract.py <images_path> <features.npz> <metadata.csv> <options>

	with the options being:
		--model_file - Caffe .prototxt file (deploy version)
		--pretrained_file - Caffe .caffemodel file
		--mean_file - Caffe image mean file, either in .binaryproto or .npy format
		--image_size - original image size before cropping, all images are resized to this size
		--grayscale - if input to the network is grayscale image (1 channel)
		--oversample - average features over 10 cropped images (4 corners + center + 2 mirrors of each)
		--layer - name of the layer from which to extract the features
		--backend - either gpu or cpu
		--filter - which files to look at, e.g. *.jpg
		--openface - use Openface network, 0 or 1

- the feature file will be extracted to features.npz, and the image labels and paths to metadata.csv

- for pair generation, download pairs.txt http://vis-www.cs.umass.edu/lfw/ 
	or run src/generate_pairs.py

- to calculate the accuracy, run 
	python calculate_accuracy_stdv.py <path_to_features.npz> <path_to_pairs.txt> <path_to_metadata.csv>

