SCP
A CNN image-classification pipeline, from raw photos to benchmarked models
Ten-class image classification on a dataset photographed by the course itself. Augmentation grows 4,000 photos to 15,000, and VGG-16 and ResNet-50 are benchmarked with Adam and SGD. The best model reaches 67.3% on 3,000 unseen test images.
- 67.3%
- Best test accuracy (VGG-16 · Adam)
- 10
- Object classes
- 15,000
- Images after augmentation
- 3,000
- Held-out test images
Abstract
The problem and the idea
The Scientific Computing Project builds a convolutional neural network that assigns photos of everyday objects to one of ten classes (bottles, mugs, spoons, knives, forks, shoes, t-shirts, plants, chairs and bikes). The images were taken by the students themselves, so they are varied and imperfect, much like real production data. The project covers the full pipeline: dataset creation, augmentation, architecture, cross-validated hyperparameter search on a compute cluster, and evaluation on held-out data.
Pipeline
How it flows
- Data
- Model / compute
- Processing
- Control step
- Output / guard
- 1 Raw photos ~4,000 · 10 classes
- 2 Normalise 56 × 56 px
- 3 Augment Up to 4 of 8 transforms
- 4 CNN VGG-16 · ResNet-50
- 5 Tune + k-fold CV Adam vs SGD · early stop
- 6 Evaluate 3,000 held-out images
Method
How it works
-
1
Dataset
Every student photographed 15–20 distinct objects per class. Images are normalised to 56 × 56 px and randomly augmented (flips, crop, rotation, blur, brightness, contrast, colour), up to four effects at once, for 1,500 images per class.
-
2
Architectures
A simplified VGG-16 (stacked 3 × 3 convolutions with max-pooling) and a ResNet-50 for comparison.
-
3
Training
Hyperparameters found with 3-fold cross-validation, then each optimiser trained with the best settings. An early-stopping counter (7 epochs without improvement) kept runs under the cluster's 24-hour limit.
Results
What it delivers
| Model | Optimiser | Accuracy | Macro F1 |
|---|---|---|---|
| VGG-16 | Adam | 67.33% | 0.673 |
| ResNet-50 | Adam | 59.73% | 0.597 |
| ResNet-50 | SGD | 59.37% | 0.588 |
| VGG-16 | SGD | 47.47% | 0.472 |
- Adam clearly beat SGD on VGG-16 (67.33% vs 47.47%); with ResNet-50 the two optimisers were close (59.7% vs 59.4%).
- Bikes and shoes were the easiest classes (F1 ≈ 0.84 and 0.82); forks and chairs the hardest.
- Trained weights for every model and fold, plus the augmented dataset, are published on Hugging Face.
Models & downloads
Download and run it
parsabe/SCP
Hugging Face model
- VGG-16 · Adam (best) VGG-16/Training file results/best_model_Adam.pth · 73.7 MB Download
- VGG-16 · SGD VGG-16/Training file results/best_model_SGD.pth · 73.7 MB Download
- ResNet-50 · Adam · fold 0 ResNet-50/models/best_model_Adam_fold0.pth · 44.8 MB Download
- ResNet-50 · SGD · fold 0 ResNet-50/models/best_model_SGD_fold0.pth · 44.8 MB Download
Get everything
# Command line
pip install -U huggingface_hub
hf download parsabe/SCP --local-dir scp
# Python
from huggingface_hub import snapshot_download
path = snapshot_download("parsabe/SCP")
# Git (large files via LFS)
git lfs install
git clone https://huggingface.co/parsabe/SCP
Built with
- Python
- PyTorch
- VGG-16
- ResNet-50
- k-fold CV
- HPC cluster
Acknowledgements
Developed with Lars Wunderlich and Toni Sand in the Scientific Computing Project (winter semester 2024/25) at TU Bergakademie Freiberg. Thanks to all course participants who photographed the dataset. Released under the MIT License.
BibTeX
@software{scp2025,
author = {Wunderlich, Lars and Besharat, Parsa and Sand, Toni},
title = {{SCP}: A CNN Image-Classification Pipeline},
year = {2025},
institution = {TU Bergakademie Freiberg},
url = {https://github.com/parsabe/SCP}
}