Qeustion about latest_Colab_TrainNetwork_VideoAnalysis.ipynb

I am using DeepLabcut. I am working on latest_Colab_TrainNetwork_VideoAnalysis.ipynb.

while working on creating a training dataset, I got an error.

WILL BE AUTOMATICALLY UPDATED BY DEMO CODE/labeled-data/WILL BE AUTOMATICALLY UPDATED BY DEMO CODE/CollectedData_Mackenzie.h5 not found (perhaps not annotated)
Annotation data was not found by splitting video paths (from config[‘video_sets’]). An alternative route is taken…

FileNotFoundError Traceback (most recent call last)
in ()
----> 1 deeplabcut.create_training_dataset(path_config_file, net_type=‘resnet_50’, augmenter_type=‘imgaug’)

2 frames
/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/conversioncode.py in merge_windowsannotationdataONlinuxsystem(cfg)
193 AnnotationData=None
194 data_path = Path(cfg[‘project_path’],‘labeled-data’)
–> 195 annotationfolders=[fn for fn in os.listdir(data_path) if “_labeled” not in fn]
196 print(“The following folders were found:”, annotationfolders)
197 for folder in annotationfolders:

FileNotFoundError: [Errno 2] No such file or directory: ‘WILL BE AUTOMATICALLY UPDATED BY DEMO CODE/labeled-data’

What am I supposed to do to fix this problem?

Thank you

This would mean you are using our demo project without first loading the data; please see this notebook if you want to run our data on Colab ( and see how to load the data): https://github.com/AlexEMG/DeepLabCut/blob/master/examples/COLAB_DEMO_mouse_openfield.ipynb

Or in Jupyter: https://github.com/AlexEMG/DeepLabCut/blob/master/examples/Demo_labeledexample_MouseReaching.ipynb

The notebook you attempted to run is once you have your own dated data you moved to google drive.

Thank you for answering my question

So, First I uploaded my video and mount drive. Then, I tried to run latest_Colab_TrainNetwork_VideoAnalysis.ipynb. There is config.yaml in Mom_handtracking-GunAhn-2020-04-22 folder.

Then again, while creating a training dataset, I got different error message.

/content/Mom_handtracking-GunAhn-2020-04-22/labeled-data/Mom_handtrackingdownsampled/CollectedData_GunAhn.h5  not found (perhaps not annotated)
/content/Mom_handtracking-GunAhn-2020-04-22/labeled-data/Mom_handtracking/CollectedData_GunAhn.h5  not found (perhaps not annotated)
Annotation data was not found by splitting video paths (from config['video_sets']). An alternative route is taken...
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-8-d43c96cb30c9> in <module>()
----> 1 deeplabcut.create_training_dataset(path_config_file, net_type='resnet_50', augmenter_type='imgaug')

2 frames
/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/conversioncode.py in merge_windowsannotationdataONlinuxsystem(cfg)
    193     AnnotationData=None
    194     data_path = Path(cfg['project_path'],'labeled-data')
--> 195     annotationfolders=[fn for fn in os.listdir(data_path) if "_labeled" not in fn]
    196     print("The following folders were found:", annotationfolders)
    197     for folder in annotationfolders:

FileNotFoundError: [Errno 2] No such file or directory: '/content/Mom_handtracking-GunAhn-2020-04-22/labeled-data'

did you first run “check_labels” on your computer to be sure the files are all there are look fine? i.e. you’d have to label your data first before moving to COLAB.

If so, double check you updated the project_path in your config.yaml file correctly once you moved it to google drive.

Hy, I have exactly the same problem. I changed my config.yaml to have the good path but they keep saying that this path doesn’t exist whereas it does. See text bellow and picture bellow.

\content\drive\My Drive\stage 3A\DLC\eye_lizard-IT-2020-05-21/training-datasets/iteration-0/UnaugmentedDataSet_eye_lizardMay21 already exists!
\content\drive\My Drive\stage 3A\DLC\eye_lizard-IT-2020-05-21/labeled-data/\content\drive\My Drive\stage 3A\DLC\eye_lizard-IT-2020-05-21\videos\Essai3_2019-07-30_22-49-37-217_Wake_cut2/CollectedData_IT.h5 not found (perhaps not annotated)
Annotation data was not found by splitting video paths (from config[‘video_sets’]). An alternative route is taken…


FileNotFoundError Traceback (most recent call last)

in ()
2 #Then, run this cell. There are many more functions you can set here, including which netowkr to use!
3 #check the docstring for full options you can do!
----> 4 deeplabcut.create_training_dataset(path_config_file, net_type=‘resnet_50’, augmenter_type=‘imgaug’)

2 frames

/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/conversioncode.py in merge_windowsannotationdataONlinuxsystem(cfg)
193 AnnotationData=None
194 data_path = Path(cfg[‘project_path’],‘labeled-data’)
–> 195 annotationfolders=[fn for fn in os.listdir(data_path) if “_labeled” not in fn]
196 print(“The following folders were found:”, annotationfolders)
197 for folder in annotationfolders:

FileNotFoundError: [Errno 2] No such file or directory: ‘\content\drive\My Drive\stage 3A\DLC\eye_lizard-IT-2020-05-21/labeled-data’

at @ismael your paths are wrong. Linx is. / windows is \

Thank you a lot ! It works now. I didn’t realise that as i pretrained on windows, I had to change all paths on linux synthax for colab. Thank you very much for your help and quick reply.

1 Like

just the project_path is sufficient; the code is otherwise “smart” and converts it correctly as long as you make the training dataset within colab :wink: