- Open “CE_Assgnment.ipynb” file for the complete code.
- File with name “epoch10.pt”.
- File with name “MAR.docx”.
vis10cat.txt : 2223 URLs in 10 categories
A tab-delimited file with each line giving the category and then the URL of an image.
Note: The data given in vis10cat.txt after downloading and removing corrupted file was only 759 as many links were not working and some files were corrupted.
Hence after the training the model on that dataset, model was over fitting.
That data is in "vis10cat Data".
So, in order to train our model in a better way I scraped some data from Google Images one by one using the code given in the file “graphextr.py”.
That data is in “Scraped Data".
Master folder containing both the data mixed is “Plot_Data” having 2864 images to be exact.
To run the file,
- Upload the Jupyter Notebook to your Google Collab.
- Mount your google drive from “Mounting Google drive” section in the notebook.
- Place the “epoch10.pt” file in path "/content/drive/MyDrive/encoder/epoch10.pt".
- Place the test image in path "/content/test.jpg" having name test.jpg
- Go to the “Run pretrained model From Here” section of the code and run it.
The code for training the model is from starting of the notebook up to the section named “Model”.
The validation accuracy of the model can also be seen in the “Model” section.
If training the model again,
Put the “Plot_Data” folder at the path "/content/drive/MyDrive/Plot_Data/" and run the whole code up to the “Model” section.