Kaggle's Cassava Leaf Disease Classification Project using ResNet-18 - UCLA ACM AI, Projects
This project was conducted as part of UCLA's ACM AI Projects committee, during Winter '22.
For more references, kindly check out the following resources:
- Project Skeleton Code (Repo)
- Project Skeleton Notebook (Kaggle)
- Cassava Leaf Disease Challenge (Kaggle)
Quick Statistics: utilized data augmentation (rotate, flip, blur), achieved accuracy of: 95%
-
Create and activate a new Conda environment.
-
Install PyTorch, PIL, Pandas, TorchVision, and TensorBoard.
-
Download the Cassava Leaf dataset from Kaggle Cassava Data
-
Clone this repository and run
python main.py
-
Modifications can be made by changing
constants.py
-
Navigate to the code tab of the Kaggle competition. Click on the "New Notebook" button to create a new notebook. The dataset should be automatically loaded in the
/kaggle/input
folder. -
To use the GPU, click the three dots in the top-right corner and select Accelerator > GPU.
-
To access your code, run the following command (replacing the URL):
!git clone "https://github.com/uclaacmai/leaf-us-alone"
This should clone this repository into the
/kaggle/working
folder. -
Change directories into your repository by running the command:
cd leaf-us-alone
-
You should now be able to import your code normally. For instance, the following code will import the starting code:
import constants from datasets.StartingDataset import StartingDataset from networks.StartingNetwork import StartingNetwork from train_functions.starting_train import starting_train
-
If you want your code to run without keeping the tab open, you can click on "Save version" and commit your code. Make sure to save any outputs (e.g. log files) to the
/kaggle/output
, and you should be able to access them in the future.
To learn more about ACM AI, feel free to check out our LinkTree!