Skip to main content

Digit classifiers (MNIST / USPS / SVHN) with a unified training, evaluation and inference CLI.

Project description

ACME Digit Classification

ACME Digit Classification is a machine learning framework for handwritten digit recognition developed as part of the FYS-8805 Collaborative Coding Exam at UiT.

The repository provides a unified interface for training, evaluating, and deploying digit classification models for three customer datasets:

  • Customer A: MNIST
  • Customer B: SVHN
  • Customer C: USPS

Installation

Install directly from GitHub [NEED TO BE FIXED]:

pip install git+https://github.com/FYS-8805-Collaborative-Coding/Collaborative-Coding-Exam.git

Alternatively, clone the repository via SSH:

git clone git@github.com:FYS-8805-Collaborative-Coding/Collaborative-Coding-Exam.git

Quick start: run interference

Suggested way to get inference from a trained model (example):

from src import run_inference

results = run_inference(model="model-a", input_path="path/to/your/data")
print(results)

Or from the command line:

python -m src.inference --model model-a --input datasets/inference/mnist_test_0_label_7.png

Trained model weights are stored in the weights/ directory and are loaded automatically during inference.


Model Cards

Model A — model-a

Brief description of what this model does and what problem it solves.

Architecture ...
Training data ...
Intended use ...
Limitations ...

Performance:

Metric Value
Precision 0.00
Recall 0.00
Speed (inference) 0.00 ms / sample

Model B — SVHN

CNN classifier for Street View House Numbers. It predicts a single cropped house-number digit (0–9) from a 32×32 RGB image.

Architecture 3-block CNN (per block: Conv-BN-ReLU ×2 + MaxPool, channels 3→32→64→128) followed by a 2-layer fully-connected head with dropout 0.3
Training data SVHN train_32x32.mat (~73k 32×32 RGB cropped-digit images), trained 5 epochs, Adam, lr 1e-3, batch size 64
Intended use Classifying house-number digits
Limitations Single digits only (not multi-digit house numbers). Fixed 32×32 RGB input. Trained only 5 epochs with no data augmentation

Performance: (measured on the SVHN test set, weights/svhn.pth, LUMI-G / MI250x)

Metric Value
Precision 0.9465
Recall 0.9465
Speed (inference) 0.470 ms / sample

Model C — model-c

Brief description of what this model does and what problem it solves.

Architecture ...
Training data ...
Intended use ...
Limitations ...

Performance:

Metric Value
Precision 0.00
Recall 0.00
Speed (inference) 0.00 ms / sample

Documentation

More detailed documentation is available at https://fys-8805-collaborative-coding.github.io/Collaborative-Coding-Exam/.


Model development

Training

You can run training from the repository root with the CLI. All arguments are entirely optional; running the command without any flags will automatically train on the default mnist dataset:

# Run with absolute defaults (MNIST, 1 epoch, batch size 64, automatic device selection)
python -m src.training

# Run with custom configuration overrides
python -m src.training --dataset mnist --epochs 5 --batch-size 32 --device cuda

The checkpoint is written to weights/mnist.pth by default. The current training entry point supports mnist and can be extended with more datasets through the registry in src/training.py.

Testing

Run the basic tests with:

pytest -q

The tests are lightweight and only validate the training CLI, argument parsing, and factory wiring.


Contributing to the code

We use a branch → pull request → review workflow. All changes to main require at least one approved review — direct pushes are not allowed.

  1. Open an issue describing your change
  2. Create a branch and commit your work (reference the issue, e.g. fixes #5)
  3. Open a pull request towards main
  4. Get a review, address feedback, then merge

See CONTRIBUTION.md for the full guide.


Further use of the software

If you use this software in your research, teaching, or projects, please cite this repository. This project is released under the MIT License. You are free to use, modify, and distribute the software in accordance with the terms of the license.

Citation

APA:

Chen, S., Løkke, A., Gelato, R., Baburajan, R., Oei, K., & Catteau, M. (2026). Collaborative Coding Exam (Version 1.1.0) [Computer software]. https://github.com/FYS-8805-Collaborative-Coding/Collaborative-Coding-Exam

BibTex:

@software{Chen_Collaborative_Coding_Exam_2026,
author = {Chen, Siyan and Løkke, Andrea and Gelato, Riccardo and Baburajan, Rahul and Oei, Keyne and Catteau, Myrthe},
month = jun,
title = {{Collaborative Coding Exam}},
url = {https://github.com/FYS-8805-Collaborative-Coding/Collaborative-Coding-Exam},
version = {1.1.0},
year = {2026}
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccexam-0.0.1-py3-none-any.whl (5.2 MB view details)

Uploaded Python 3

File details

Details for the file ccexam-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ccexam-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for ccexam-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57119dc8f51c50de4c66b65715c2ff496dffc41e6e798e89a8093268507b8727
MD5 fee3e210d58e06a29f7d179961b1e70f
BLAKE2b-256 90135184a13003ebc4d1e7e7205cb6c94bdbb181e7e75b7daa8748f70fd3f028

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page