Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhotoRank-AI

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.


Features

  • 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

Example Workflow

  1. Provide a folder of images
photos/
    img001.jpg
    img002.jpg
    img003.jpg
  1. Run the ranking script
python rank_photos.py ./photos
  1. The model outputs scores and sorts images
0.91 img002.jpg
0.83 img001.jpg
0.45 img003.jpg

Model Architecture

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.


Training Results

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.

Example Training Curves

Training Graph 1 Training Graph 2 Training Graph 3


Current Status

  • 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

Dataset

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.


Tech Stack

  • Python
  • PyTorch
  • TorchVision
  • NumPy
  • OpenCV

Project Structure

photorank-ai/
  dataset/
  models/
  training/
  inference/
  utils/

  train.py
  rank_photos.py
  model.py
  dataset.py
  README.md

Future Improvements

  • Burst detection for similar photos
  • Expression detection for portraits
  • Attention-based architectures
  • Vision Transformer experiments
  • Automatic duplicate detection
  • Photo clustering

Motivation

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.


License

MIT License

About

A deep learning system that ranks and selects the best photos from a collection using a custom CNN trained on photographer-labeled images.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages