PhotoRank-AI is a deep learning project that automatically ranks and selects the best photos from a collection.
Photographers often take hundreds of similar images during a shoot. Manually reviewing and selecting the best photos can be time consuming. PhotoRank-AI aims to solve this problem by training a neural network to evaluate image quality and rank photos based on aesthetic and technical criteria.
This model learns directly from a photographer's personal preferences, allowing it to approximate how a human would select the best shots.
- Scores photos based on aesthetic and technical quality
- Ranks images from best to worst
- Trained on a custom labeled photography dataset
- Built entirely from scratch using PyTorch
- Designed for photographers managing large image collections
- Provide a folder of images
photos/
img001.jpg
img002.jpg
img003.jpg
- Run the ranking script
python rank_photos.py ./photos- The model outputs scores and sorts images
0.91 img002.jpg
0.83 img001.jpg
0.45 img003.jpg
The current version uses a Convolutional Neural Network (CNN) that predicts a continuous photo quality score between 0 and 1.
Pipeline: image → CNN feature extractor → quality score
The model learns patterns related to:
- facial expressions
- composition
- subject placement
- sharpness
- exposure
- background separation
Future versions may include attention mechanisms and transformer-based architectures.
The model demonstrates consistent learning behavior across multiple training runs.
- Training loss decreases steadily over epochs
- Mean Absolute Error (MAE) improves over time
- Minor fluctuations are present due to dataset size and variability
These results indicate that the model is successfully learning patterns related to photo quality.
- CNN model trained on a custom photography dataset
- Training and evaluation pipeline implemented
- Photo ranking functionality working on dataset
- Currently improving inference pipeline for ranking new unseen images
The dataset consists of photographer-labeled images rated according to aesthetic quality.
Each image is assigned a score between 0 and 1:
1.0 — Excellent photo
0.8 — Strong image
0.6 — Good photo
0.4 — Average
0.2 — Poor photo
Labels reflect both technical quality and artistic value.
- Python
- PyTorch
- TorchVision
- NumPy
- OpenCV
photorank-ai/
dataset/
models/
training/
inference/
utils/
train.py
rank_photos.py
model.py
dataset.py
README.md
- Burst detection for similar photos
- Expression detection for portraits
- Attention-based architectures
- Vision Transformer experiments
- Automatic duplicate detection
- Photo clustering
This project was inspired by a common problem photographers face: sorting through thousands of similar photos to find the best shots.
As both a photographer and computer science student, I wanted to explore how machine learning could assist with the photo selection process.
MIT License


