ataturhan21/Cifar10-Image-Classification
ataturhan21/Cifar10-Image-Classification has 29 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 19:50 UTC. Last push 2026-11-14.
計測したスター増加
- 24時間
- 0
- 7日間
- 更新が遅れています
- 15日間
- 更新が遅れています
- 1か月
- 更新が遅れています
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
TensorFlow/Keras CNN for the Kaggle CIFAR-10 competition with data augmentation and submission generation.
機械学習README.md
オリジナルCIFAR-10 Image Classification
A TensorFlow/Keras notebook for the Kaggle CIFAR-10 competition. It loads archived images, trains a convolutional classifier, and generates predictions aligned with the sample submission.
Open the notebook · Dependencies
Model and workflow
- Extract
train.7zandtest.7z; read labels fromtrainLabels.csv. - Load 32 × 32 images with OpenCV and normalize pixel values to 0–1.
- Split training images into 80% training and 20% validation with
random_state=42. - Use 3 convolutional blocks with 32, 64, and 128 filters, batch normalization, pooling, dropout, and L2 regularization.
- Train with augmentation, Adam, early stopping, and learning-rate reduction. The current training call uses batch size 128 and a maximum of 5 epochs.
- Export
submission.csvwithidandlabelcolumns.
Saved results
The committed notebook outputs come from one 5-epoch Kaggle run without an accelerator. They predate the later class-mapping and partial-batch fixes, so treat them as historical, not as a measurement of the current code.
| Item | Saved output |
|---|---|
| Training / validation / test images | 40,000 / 10,000 / 300,000 (32 × 32 × 3) |
| Epoch 5 training accuracy / loss | 0.5323 / 2.1703 |
| Epoch 5 validation accuracy / loss | 0.5529 / 2.0264 |
The notebook also includes the accuracy and loss curves from that run under Plotting Accuracy and Loss.
Run on Kaggle
Create a notebook and attach the CIFAR-10 competition data.
Import
cifar10-image-classification.ipynb.Confirm these inputs in Loading the Dataset:
/kaggle/input/cifar-10/trainLabels.csv/kaggle/input/cifar-10/sampleSubmission.csv/kaggle/input/cifar-10/train.7z/kaggle/input/cifar-10/test.7z
Confirm that extraction writes to
/kaggle/working/trainand/kaggle/working/test.Run the cells in order and download
submission.csv.
The current loader holds image arrays in memory. Check available RAM and storage before extracting and loading the full competition data.
Run locally
git clone https://github.com/ataturhan21/Cifar10-Image-Classification.git
cd Cifar10-Image-Classification
python -m venv .venv
Activate the environment, then run:
python -m pip install -r requirements.txt notebook
jupyter notebook cifar10-image-classification.ipynb
Download the competition data separately and replace the Kaggle input and extraction paths. Data archives and trained weights are not included. Saved metadata records Python 3.10.14; dependency versions are currently unpinned.
Prediction integrity
Training and prediction share the same explicit class mapping. Test images are loaded in sampleSubmission.csv ID order instead of filesystem order. Missing images, unknown labels, mismatched image counts, and unexpected prediction shapes raise errors before a misleading CSV is written.
Regression checks
The checks need only NumPy and pandas, so a light environment is enough:
python -m pip install numpy pandas
python -m unittest discover -s tests -v
Training includes the final partial batch, including datasets smaller than the batch size. The tests execute the notebook's loading, submission, and training-setup functions with synthetic inputs and small model/image doubles. They do not need TensorFlow, OpenCV, or the competition dataset.
The GitHub Actions workflow runs these same focused checks on Ubuntu and Windows with read-only repository access.
The existing notebook outputs are historical. The tests verify label and row alignment, not a newly measured model accuracy.
Copyright
© Ata Turhan. All rights reserved. This repository has no open-source license: its code may not be copied, modified or redistributed.