-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Using Colab error (if project created in Windows, Colab runs as Ubuntu- path fix needed) #172
Comments
NotFoundError Traceback (most recent call last) in () /usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/training.py in train_network(config, shuffle, trainingsetindex, gputouse, max_snapshots_to_keep, autotune, displayiters, saveiters, maxiters) /usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/training.py in train_network(config, shuffle, trainingsetindex, gputouse, max_snapshots_to_keep, autotune, displayiters, saveiters, maxiters) /usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/train.py in train(config_yaml, displayiters, saveiters, maxiters, max_to_keep) /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py in restore(self, sess, save_path) /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/checkpoint_management.py in checkpoint_exists(checkpoint_prefix) /usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py in get_matching_files(filename) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/errors_impl.py in exit(self, type_arg, value_arg, traceback_arg) NotFoundError: /content/drive/My Drive/DLC/lib/site-packages/deeplabcut/pose_estimation_tensorflow/models/pretrained; No such file or directory |
We had the same error. I suppose you are using a windows computer to label the video. Notice the mix of forward and backward slashes in the image path. Colab seems to be running on linux. A temporary solution that worked for us was to edit the labeling_toolbox.py file. After line |
Ah, simple fix to change the paths to Linux style, we have helper code for this; will put up on DLCUtils |
Thanks. I was actually looking at the bottom error "NotFoundError: /content/drive/My Drive/DLC/lib/site-packages/deeplabcut/pose_estimation_tensorflow/models/pretrained; No such file or directory" and missed the "/" error. Let me know when it is up in DLCUtils. |
I put a quick fix on https://github.com/AlexEMG/DLCutils, see https://github.com/AlexEMG/DLCutils#running-project-created-on-windows-on-colaboratory We will integrate this functionality in the next release of DLC (in an expanded way). Let me know if it works & makes sense! |
Hi! I believe I am still experiencing this issue.
Since the newer versions of DLC already fix for this issue, is there anything that I am doing wrong? How can I fix this? Thank you! |
you can covert your files to linux style first, but it should convert when you run create_training_dataset; can you put the full code you ran and output here? |
Code:
Ouput:
|
can you also pass |
i.e.
|
It solved the issue! |
Your Operating system and DeepLabCut version
Using GoogleColab, DLC 2.0.3
Describe the problem
As per instructions copied the DLC folders created locally on my PC to Drive, no issues with any of the setup on the Colab notebook. Changed the config.yaml and pose_cfg.yaml folders to reflect the Drive locations, e.g 'snapshot_prefix': '/content/drive/MyDrive/DLC/ThoroughbredDLC-Byron-2018-12-08/dlc-models/iteration-0/ThoroughbredDLCDec8-trainset95shuffle1/train/snapshot',
Error generated....
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/train.py", line 51, in load_and_enqueue
batch_np = dataset.next_batch()
File "/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/dataset/pose_dataset.py", line 188, in next_batch
return self.make_batch(data_item, scale, mirror)
File "/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/dataset/pose_dataset.py", line 215, in make_batch
image = imread(os.path.join(self.cfg.project_path,im_file), mode='RGB')
File "/usr/local/lib/python3.6/dist-packages/numpy/lib/utils.py", line 101, in newfunc
return func(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/scipy/misc/pilutil.py", line 164, in imread
im = Image.open(name)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2312, in open
class ImageTransformHandler(object):
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/My Drive/DLC/ThoroughbredDLC-Byron-2018-12-08/labeled-data\Sample34\img077.png'
NotFoundError Traceback (most recent call last)
in ()
1
----> 2 deeplabcut.train_network(path_config_file, shuffle=1, displayiters=10,saveiters=500)
3
4 #this will run until you stop it (CTRL+C), or hit "STOP" icon, or when it hits the end (default, 1.03M iterations).
5 #Whichever you chose, you will see what looks like an error message, but it's not an error - don't worry....
/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/training.py in train_network(config, shuffle, trainingsetindex, gputouse, max_snapshots_to_keep, autotune, displayiters, saveiters, maxiters)
79 train(str(poseconfigfile),displayiters,saveiters,maxiters,max_to_keep=max_snapshots_to_keep) #pass on path and file name for pose_cfg.yaml!
80 except BaseException as e:
---> 81 raise e
82 finally:
83 os.chdir(str(start_path))
The text was updated successfully, but these errors were encountered: