Can't get the data from drive

I uploaded train test folder on my drive and mounted my drive on google colab and used this:

from google.colab import drive
drive.mount(’/content/drive’)

!ls “/content/drive/My Drive/Colab Notebooks/Pokedex”

This shows the data correctly but I can’t figure out how to proceed to get the data correctly

Hey @samriddhijain2000, now you can simple use the os module to change the directory like this :

import os
os.chdir('/content/drive/My Drive')
os.chdir('/content/drive/My Drive/your_train_test_folder_name')

After changing the directory you can load that data using

data = os.listdir()

If you still have any doubts or issues, you can ask me anytime :slight_smile:

Hope this helps.
Happy Learning :slight_smile:

1 Like

Thankyou @Aayushkh_333! Now I have tried many modules like cv2, cairosvg, keras image for loading the images. jpg and png work fine but what to do about svg images? it can’t be loaded using cv2 and keras.preprocessing.image and with cairosvg it can’t be resized.

Hey @samriddhijain2000, you can refer to this library or you can also try using Pillow. Also I request you to please create a new doubt on the portal for a query based on a new topic. I would be extremely happy to help you ! If you stilll have doubts on loading svg images, you can create a new doubt anytime !

Happy Coding :slight_smile:
Best of Luck !

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.