Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab : [Errno 2] No such file or directory: '/content/gdrive/My' #61

Closed
kidboy-man opened this issue Jan 5, 2020 · 2 comments
Closed

Comments

@kidboy-man
Copy link

Hi Anton!
Thank you for your amazing work man, it really helps me.
I managed to run the training process on my local machine, however since I only use CPU, it took so long. Therefore, I try to run the training process on google colab so it can benefit from the GPU.
I redo all the procedures in colab notebook, but on running Train_YOLO.py I got an error message:

Epoch 1/51 Traceback (most recent call last): File "Train_YOLO.py", line 157, in <module> callbacks=[logging, checkpoint]) File "/usr/local/lib/python3.6/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/keras/engine/training.py", line 1418, in fit_generator initial_epoch=initial_epoch) File "/usr/local/lib/python3.6/dist-packages/keras/engine/training_generator.py", line 181, in fit_generator generator_output = next(output_generator) File "/usr/local/lib/python3.6/dist-packages/keras/utils/data_utils.py", line 709, in get six.reraise(*sys.exc_info()) File "/usr/local/lib/python3.6/dist-packages/six.py", line 693, in reraise raise value File "/usr/local/lib/python3.6/dist-packages/keras/utils/data_utils.py", line 685, in get inputs = self.queue.get(block=True).get() File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/local/lib/python3.6/dist-packages/keras/utils/data_utils.py", line 626, in next_sample return six.next(_SHARED_SEQUENCES[uid]) File "/content/gdrive/My Drive/Evos AI Stuffs/TrainYourOwnYOLO/Utils/Train_Utils.py", line 116, in data_generator image, box = get_random_data(annotation_lines[i], input_shape, random=True) File "/content/gdrive/My Drive/Evos AI Stuffs/TrainYourOwnYOLO/2_Training/src/keras_yolo3/yolo3/utils.py", line 40, in get_random_data image = Image.open(line[0]) File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2766, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/My'

I am pretty sure this caused by the name of my directory since it is contained space in My Drive (this is default from Gdrive), so the function fp = builtins.open(filename, "rb") failed to get the correct directory. Any suggestion or idea how to solve this?
Thank you

@AntonMu
Copy link
Owner

AntonMu commented Jan 5, 2020

You are welcome. I am glad you are enjoying it.

Have a look at the white_spaces branch: https://github.com/AntonMu/TrainYourOwnYOLO/tree/white_spaces

It should fix the problem.

If you are able to run it successfully on colab, it would be great to share your steps. You can either send them to me here or make a pull request. Thanks!

@kidboy-man
Copy link
Author

Thank you Sir, now it is working fine. I just need to prepare the proper data train for my model.
I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants