Project Mirage is a command-line utility designed to organize and process photos and videos in a specified directory or directories. The project provides functionalities such as duplicate detection, culling, and organization.
-
Photos and Videos: Mirage can organize photos and videos. Works on multiple formats such as
JPEG
,PNG
,HEIC/HEIF
(iOS format),MP4
, andMOV
. -
Duplicate Grouping: Groups photos and videos based on specific criteria, enhancing the organization and accessibility of the files.
-
Image Aesthetics Assessment: Using Vision Neural Models, Mirage can calculate which image from duplicates looks the best and cull them from the others.
- Python 3.x
- Required Python packages:
torch
,torchvision
,Pillow
,pillow_heif
,pyiqa
,mimetypes
,argparse
,uuid
,tqdm
- all packages can be installed with
requirements.txt
- all packages can be installed with
- At least 4GB of memory for vector embeddings
- Capable processor for vision models (CNNs like ResNet or VGG19)
I ran this on a Raspberry Pi 4 8GB with a 128GB SD card running Raspbian with Python 3.11.2 without any issues.
Clone the repository and install the required dependencies:
$ git clone https://github.com/hetkpatel/Project-Mirage.git
$ cd Project-Mirage
$ pip install -r requirements.txt
$ python pipeline.py [dir] [--dry_run] [--show_unsupported_files] [--quality_check] [--order_by_date]
-
dir
: One or more directory paths containing the images and videos to be processed. Mirage will crawl through all sub-directories from the parent directory and find all photos and videos to process. -
--dry_run
(-d
): Perform a dry run without any modifications. Useful for previewing changes. -
--show_unsupported_files
(-u
): Display unsupported files during execution. -
--quality_check
(-q
): Enable image quality checking. -
--order_by_date
(-o
): Enable image sort into sub-directories by date.
$ python pipeline.py /path/to/images --dry_run --show_unsupported_files --quality_check --order_by_date
Mirage generates an organized output structure in the current working directory:
-
./output/{session}/images
: Processed and grouped images. -
./output/{session}/videos
: Processed and grouped videos.
Use caution when running Mirage without the --dry_run
option, as it will modify files and directories. Always review the dry run output before proceeding with actual modifications.
This project is licensed under the GNU AGPLv3 License - see the LICENSE file for details.