/deep-face-hashing

Face hashing using neural networks, mapping images to Hamming codes.

Primary LanguagePython

Face Hasing Using Neural Networks

File structure

|--- code/ # contains code for the project
|    |--- data/ # contains preprocessed data
|--- facescrub/ # from https://github.com/faceteam/facescrub.git
|    |--- download/ # data from the download.py script
|    |--- download.py # script to download data

Packages

Run source activate cs670project to activate project conda environment.

Package Versions

  • python=3.6
  • numpy=1.15.4
  • scipy=1.1.0
  • opencv-python=3.4.3.18
  • matplotlib=3.0.1
  • jupyter=1.0.0
  • sklearn=0.20.1 (pip)
  • cmake=3.13.2 (pip)
  • dlib=19.16.0 (pip)

Installing Pytorch

conda install pytorch torchvision -c pytorch

Miscellaneous Notes

Instructions

  1. Download miniconda and pip,
  2. Install the packages noted above,
  3. git clone https://github.com/faceteam/facescrub.git into the same level as the project's path (see file structure above),
  4. Run python download.py with Python 2.7 to download the FaceScrub images,
  5. Run python utils.py to preprocess the images and move them into the project's ./data folder,
  • To run on a specific CUDA device, run python run.py CUDA_VISIBLE_DEVICES=# where # is the number of the device in nvidia-smi.