This project involves using deep learning techniques for computer vision tasks. The project includes multiple models for image classification, leveraging architectures like CNN, ResNet-101, and Vision Transformer (ViT), InceptionNet and Retinanet with Resnet50 as bacbone. Additionally, a Streamlit app is provided for easy model interaction.
To get started, you need to install the required dependencies.
pip install -r requirements.txt
To run the Streamlit app:
- Navigate to the application directory.
cd Code/app
- Download the pre-trained models.
wget https://storage.googleapis.com/dl-grp-4-bucket/model/model_cnn.pt
wget https://storage.googleapis.com/dl-grp-4-bucket/model/model_resnet_101.pt
wget https://storage.googleapis.com/dl-grp-4-bucket/model/model_vit_b_16.pt
- Start the Streamlit server.
python3 -m streamlit run image_classifier_app.py --server.port=8888
To download the dataset, you need a Kaggle account.
- Create an account on Kaggle and generate an API token under your profile settings. Save the token as
~/.kaggle/kaggle.json
.
vim ~/.kaggle/kaggle.json
-
Accept the competition rules on the Kaggle competition page:
Kaggle Competition Page. -
Download the dataset using the provided script:
chmod +x download_data/download_data.sh
./download_data/download_data.sh
- Process the dataset by running all cells in the following Jupyter Notebook:
download_data/final_dataset_excel_creation.ipynb
To download the dataset directly:
wget https://storage.googleapis.com/dl-grp-4-bucket/dataset.zip
unzip dataset.zip
The provided scripts allow you to train different models. Ensure the PATH
variable in each script points to the parent directory where the dataset folder is located.
python3 Code/train_cnn.py
python3 Code/train_resnet_50.py
python3 Code/Code/train_torch_vit.py
python3 Code/inception_net.py