Closed dmvlad1122 closed 5 years ago
HI @dmvlad1122 I noticed that you uploaded your dataset to google drive and you are trying to access it from colab. Note that though the notebook lives in drive, it is actually copied to a virtual machine anytime you run it, hence it cannot access any other data you have in drive. The solution to the problem is the following.
Zip up your data and upload the zipped file. Make sure the uploaded file can be publicly downloaded. A simple way to do this is to create a github repo and upload your zippped file to the release so you can easily download it, you can also use any other source that lets you publicly download your data.
In your colab notebook, run wget path-to-zippedfile-online
for instance, to download idenprof to your colab, just use wget https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-jpg.zip
Once your file is fully downloaded, in your colab notebook, run unzip your-zipped-file
for example, using IdenProf, this will be unzip idenprof-jpg.zip
Now you can specify the path to your dataset by passing the name in the function for example
model_trainer.setDataDirectory(r"idenprof-jpg")
I also encountered this issue after realizing that I needed a GPU especially for the training of the custom dataset.
However, I had spent some effort uploading the training data to Google Drive.
But I was able to find a workaround using Clouderizer.
So @dmvlad1122 , if you don't mind, you can head on to Clouderizer and sign up for a free account and use this tutorial to help you set up Clouderizer and access both the GPU of google colab and your DRIVE files.
Or you can use any other tutorial. Wrote a blog on it.
@johnolafenwa Thank you! Now I have a different problem. I completed the training. How can I download all the files that I got on my computer? There is nothing on my google drive!
@dmvlad1122 When your model is trained, ImageAI will print the path to your saved model and the path to the saved json mapping. To download both files, run
from google.colab import files files.download("path-to-your-file")
Do this for both files, it will download them directly in your browser
I want to use google.colab but I do not know which PATH to write in
model_trainer.setDataDirectory(r"***")
I've tried many options, it does not help! my path in drive - drive/asd/car