Giter VIP home page Giter VIP logo

preparing_data's Introduction

preparing_data

Data preparation to use with our deep learning face recognition system

renamer.py - module to rename names of images in our dataset folder (format: Name_Surname_0001.png, Name_Surname_0002.png, etc.)

With any questions regarding usage, please send me a message to [email protected]

----- ADDITIONAL NOTES -----

  1. Collect dataset => ready ------------------------------ refine, delete advertisement pages
  2. Crop faces from images with multiple people in one folder => ready ------------------------------ crop.py => python crop.py --data-dir /home/ti/path_to_uncropped_data --target-dir /home/ti/path_to_destination_directory
  3. Refine folder names and images => ready ------------------------------ rename_folders_v2.py (e.g. python rename_folders_v2.py --data-dir /home/ti/Downloads/crop_and_find/faces501) (this module renames folder names of each person: it merges all the letters, removing sepcial characters (.,-, etc) and splits the remaining string into two parts in the middle with underline '_' ------------------------------ renamer_lfw.py (rename image names according to LFW dataset format)
  4. Select faces that correspond only to the anchored person => ready/revise ----------------------- recognize_and_store.py --known_dir /path/to/dir/with/anchor/people --unknown-dir /path/to/dir/with/images/divided/into/folders --target-dir /path/to/dir/where/to/save/the/resulting/folders (this module looks at the image in the known folder and compares the images with this images in this person's folder)
  5. Divide into Train (80), Valid (10), Test (10) => ready
  6. Align faces with - align_dataset_mtcnn_v1.py => ready
  7. create .lst file with - insightface_pairs_gen.py --use write_lst function => ready
  8. create .rec, .idx files using - face2rec2.py => ready
  9. create pairs.txt file using gen_pairs_lfw.py => if you don't have loop in generate() function you have to write it with range(10), because you have to create 10-folds cross validation .bin
  10. create .bin file using dataset2bin.py by setting => ready ------------------------------ usage: python dataset2bin.py --data-dir /your/dataset/directory --image-size 112,112 --output /output/directory/to/dave/bin
  11. Yahoooooo, STAAAAARRRRTTTT TRRRRRRAAAAAIIIIINIIIING!!!

EXAMPLE FOLDERS: https://www.dropbox.com/s/i10tma4zqygdxdm/data.zip?dl=0

EXTRA: Parse folder with face_recognition => count number of occurences of each descriptor of the image => If one descriptor appears more than 10 times => write it to another folder

EXTRA1: Before cropping faces from collective images:

  • take known image
  • parse folder with images of this person
  • take one image
  • run dlib's get_frontal_face_detector on it
  • compare each face with known image
  • save the most similar one/ones

preparing_data's People

Contributors

talgin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.