-
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.
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)
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
To use this project, follow these steps:
- Download the ILSVRC dataset from ILSVRC 2012 Image Competition.
- Unzip the dataset, put it to the above directory or change the directory and path string in the beginning of train.py.
- Train the classification model:
python train.py
. The model checkpoints and results will automatically be generated by the program.
Contributions are welcome! If you would like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature
- Make your changes and commit them:
git commit -am 'Add your feature'
- Push to the branch:
git push origin feature/your-feature
- Submit a pull request.
This project is licensed under the MIT License.