Skip to content

Simple command line tool to sort faces based on different criteria

License

Notifications You must be signed in to change notification settings

0xhephaistos/face_sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

face_sort

Simple command line tool to sort faces based on different criteria

Description

This Python script sorts images based on gender, ethnicity, and age. It reads images from a given input folder and moves or copies them to an output folder, organizing them into nested subfolders based on the identified attributes.

Requirements

  • Python 3.x
  • DeepFace library
  • tqdm library

To install the required Python packages, run:

pip install deepface tqdm

Usage

Basic Usage To run the script, navigate to the folder containing the script in your terminal and execute:

python face_sort.py [input_folder]

Replace [input_folder] with the path to the folder containing the images you want to sort.

Optional Parameters

  • --output_folder [folder_name]: Specify an alternate destination folder. Default is output.
  • -cp: Copy images instead of moving.
  • --dry_run: Simulate the sorting process without moving or copying files.
  • -bk: Backup original images.

Examples

Run script with default output folder and move files:

python face_sort.py /path/to/input_folder

Run script with a custom output folder and copy files:

python face_sort.py /path/to/input_folder --output_folder /path/to/output_folder -cp

Optional Features

  • Dry Run: To see what the script will do without actually moving or copying any files, use the --dry_run option.
  • Backup: To create a backup of the original images, use the -bk option.

About

Simple command line tool to sort faces based on different criteria

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages