A Keras image-quality judge that trains big models on small GPUs
Implements NIMA in Keras to score image aesthetics, with pre-trained weights and a workaround for training large models on memory-starved GPUs.

What it does
NIMA assigns a mean and standard deviation score to images, effectively rating their aesthetic quality. This repo provides a Keras and TensorFlow implementation with pre-trained weights for MobileNet, NASNet Mobile, and Inception ResNet v2, all trained on the AVA dataset. You can use it to automatically inspect image quality or drop it in as a loss function to nudge generative models toward prettier outputs.
The interesting bit
The standout is a three-stage pre-training pipeline for models too large to fit on a single GPU: extract features to TFRecords, train a small classifier on top, and optionally fine-tune the full stack if memory allows. It is an admission that not everyone has a V100, and the README is upfront that this shortcut sacrifices performance unless you finetune afterward.
Key highlights
- Pre-trained weights provided for NASNet Mobile (0.067 EMD), Inception ResNet v2 (~0.07 EMD), and MobileNet (0.0804 EMD) on the AVA dataset.
- Scores images via mean and standard deviation, useful both for standalone evaluation and as a differentiable loss function.
- Includes a feature-extraction workaround to train oversized models when direct single-GPU training is impossible.
- Supports batch evaluation of directories or individual image paths.
Caveats
- NASNet models do not support runtime resizing; images must be pre-resized to 224×224 before scoring.
- The pre-training workaround for large models yields weaker performance unless you complete the optional fine-tuning step.
- Corrupted images in the training set drastically slow down TensorFlow Dataset buffering, so dataset cleaning is mandatory.
Verdict
Useful for developers building generative pipelines or automated curation tools who need a ready-made aesthetic metric in Keras. Skip it if you need a turnkey, paper-exact reproduction or if your workflow depends on resizing NASNet inputs on the fly.
Frequently asked
- What is titu1994/neural-image-assessment?
- Implements NIMA in Keras to score image aesthetics, with pre-trained weights and a workaround for training large models on memory-starved GPUs.
- Is neural-image-assessment open source?
- Yes — titu1994/neural-image-assessment is open source, released under the MIT license.
- What language is neural-image-assessment written in?
- titu1994/neural-image-assessment is primarily written in Python.
- How popular is neural-image-assessment?
- titu1994/neural-image-assessment has 823 stars on GitHub.
- Where can I find neural-image-assessment?
- titu1994/neural-image-assessment is on GitHub at https://github.com/titu1994/neural-image-assessment.