Skip to content

anseryuer/ILSVRC-2012-Image-Classification-Competition-with-Pytorch

Repository files navigation

ILSVRC 2012 Image Classification Competition with Pytorch

License

Description

  • Completing the classification task on the ILSVRC dataset with pytorch from ground up, reaching 30% top-1 class accuracy for the 1000 classification task.

  • Containing the dataset preprocess, loading, training, validation and testing part, offering customization ability in model structure, data transformation and other parts in the task.

  • Implemented with PyTorch, can be used with GPU acceleration.

  • Dataset: Imagenet Large Scale Visual Recognition Competition

  • The Jupyter Notebook version of the whole project can be accessed on my Kaggle. Still working on it.

Table of Contents

Model score and prediction accuracy

The following results is generated by Res_Norm_Dropout_Net to the ILSVRC 2013 Test server. Please note that the model is only trained on 10% of the random selected training dataset due to my limited GPU computation capability. Training the model on the whole dataset can definitely increase the predicting precision.

Error: 0.46071 (top-5) 0.7059 (top-1)

Program Folder Structure

ILSVRC 2012 Image Classification Competition with Pytorch/
├── README.md         # Project description and usage instructions
├── train.py           # Main script to run the training process
├── dataset/          # Not included here, need to be downloaded from the dataset link above
│   ├── ILSVRC2012_devkit_t12/ 
|   |   ├── COPYING
|   |   ├── data
|   |   |   ├── ILSVRC2012_validation_ground_truth.txt
|   |   |   └── meta.mat
|   |   ├── evaluation       # This doesn't really matter here
|   |   |   └── ...
|   |   └── readme.txt       # Dataset information
│   ├── ILSVRC2012_img_train/        # Folder for training data (all 1000 categories of images)
│   │   ├── n01440764/ # Each folder
|   │   │   ├── n01440764_78.JPEG
│   │   │   └── ...
│   │   └── ...
│   ├── ILSVRC2012_img_val/   # Folder for validation data
│   │   ├── ILSVRC2012_val_00000001.JPEG
│   │   └── ...
│   └── test/         # Folder for test data
│       ├── ILSVRC2012_test_00000001.JPEG
│       └── ...
├── models/
│   ├── model.py       # Script defining the deep learning model architecture
│   └── ONNX/   # Folder to store saved model ONNX
|       └── export.py  # Export model to ONNX
├── utils/
│   ├── data_utils.py  # Script for data loading, preprocessing, and augmentation
│   ├── training.py    # Script for training the deep learning model
│   ├── plot.py        # Script for ploting image in torch.Tensor 
│   ├── transforms.py  # Script for data transformation and preprocessing
│   └── evaluation.py  # Script for evaluating the trained model and output the final result.
└── requirements.txt  # List of required Python libraries

Network Structure

Neural Network Structure

Usage

To use this project, follow these steps:

  1. Download the ILSVRC dataset from ILSVRC 2012 Image Competition.
  2. Unzip the dataset, put it to the above directory or change the directory and path string in the beginning of train.py.
  3. Train the classification model: python train.py. The model checkpoints and results will automatically be generated by the program.

Contributing

Contributions are welcome! If you would like to contribute to this project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature
  3. Make your changes and commit them: git commit -am 'Add your feature'
  4. Push to the branch: git push origin feature/your-feature
  5. Submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published