/FacialSimilarity

FacialSimilarity: a compression-based face identifier through image similarity.

Primary LanguageTeX

Facial Similarity

A Compression-Based Face Identifier through Image Similarity

Description

The programs implemented in Shell have the purpose of measuring similarity of images using a compression-based strategy and automatically identify human faces.

Compressors tested: zip, gzip, lzma, bzip2, zpaq, ppmd.

Along with the description of the solutions, we also discuss the characteristics and the preprocessing done to the available dataset, the data compression algorithms used and the tests executed.

Repository Structure

/bin - binary files of the source code of the Normalized Conditional Compression Distance (NCCD) given as base code

/examples - example files (do not belong to us)

/experiments - face identification studies conducted and performance evaluation scripts

/orl_faces - original dataset ("The Database of Faces")

/processedFaces - pre-processed dataset (size reduction and quantization)

/report - written report explaining the work developed, presenting study results and conclusions

/src - source code (Shell scripts)

/src_nccd - source code of NCCD (does not belong to us)

Main Programs

  • src/checkCompressors: developed to help us manually verifying each compressor. For each candidate, we compressed an example image and the concatenation of itself, and then ran this script. What it does is collect the outcomes of the compressions and print them to the console side by side for us to quickly detect which break the C(x,x) ≈ C(x) condition.

  • src/preprocessImages: script to apply transformations to the images present on the original dataset to later be processed by the other scripts.

  • src/testCompressors: using the NCD formula, tests several compressors to classify different subjects of the faces dataset

  • experiments/calculateAccuracy: calculates the accuracy of each compressor accordingly to the output of the src/testCompressors script

  • experiments/nccdAccuracy: calculates the accuracy using a conditional compressor accordingly to the output of the src/TEST123 script

Instructions to Build and Run

  • ./src/preprocessing while on the path of this README file, applies the some preprocessing transformations to the faces dataset present on the directory orl_faces/, outputting the result to the directory processedFaces/

  • ./src/checkCompressors.sh processedFaces/s01/01.pgm outputs the sizes of the compressed files generated by each compressor for the different merger methods and compressing the image alone, using the processedFaces/s01/01.pgm as target file to compress

  • ./src/testCompressor.sh append tests the different compressors following the NCD formula to classify faces of the dataset using the append merge method

Some scripts have mandatory arguments. To have information about them call them without parameters, like:

$ ./build/<script_name>

Authors

The authors of this repository are André Pedrosa, Filipe Pires and João Alegria, and the project was developed for the Algorithmic Theory of Information Course of the Master's degree in Informatics Engineering of the University of Aveiro.

For further information, please read our report.