Deeplabcut error in label frames and data training

Hi, I am trying to setup deeplabcut on my labtop.
I have checked my graphic card driver as well as CUDA beforehand.
I installed Anaconda 3 and installed deeplabcut using yaml file from homepage (windowsGPU version).
deeplabcut was run on anaconda promt, and it seems to have no problem until labeling frames.
After marking body part and when I select ‘save’ button, I got

Missing optional dependency ‘tables’. Use pip or conda to install tables.

message.
And, I think because of this missing ‘tables’, training dataset fails.
Have anyone encountered a similar problem or know how to solve this?

Full promt page

(base) C:\Windows\system32>activate dlc-windowsGPU

(dlc-windowsGPU) C:\Windows\system32>ipython
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 6.0.0 – An enhanced Interactive Python. Type ‘?’ for help.

In [1]: import deeplabcut

In [2]: deeplabcut.create_new_project(‘demorun’, ‘JHK’, [r’C:\Users\kjinn\Desktop\20180424_BKO_CT12\Media Files\demo.mp
…: g’], working_directory=r’C:\Users\kjinn\Desktop\deeplabcut’, copy_videos=True)
Created “C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\videos”
Created “C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\labeled-data”
Created “C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\training-datasets”
Created “C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\dlc-models”
Copying the videos
C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\videos\demo.mpg
Generated “C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\config.yaml”

A new project with name demorun-JHK-2019-10-01 is created at C:\Users\kjinn\Desktop\deeplabcut and a configurable file (config.yaml) is stored there. Change the parameters in this file to adapt to your project’s needs.
Once you have changed the configuration file, use the function ‘extract_frames’ to select frames for labeling.
. [OPTIONAL] Use the function ‘add_new_videos’ to add new videos to your project (at any stage).
Out[2]: ‘C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\config.yaml’

In [3]: config_path=r’C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\config.yaml’

In [4]: deeplabcut.extract_frames(config_path, ‘automatic’, ‘kmeans’, crop=False, userfeedback=True)
Config file read successfully.
Do you want to extract (perhaps additional) frames for video: C:\Users\kjinn\Desktop\deeplabcut\demorun-JHK-2019-10-01\videos\demo.mpg ?
yes/noy
Extracting frames based on kmeans …
Kmeans-quantization based extracting of frames from 0.0 seconds to 301.6 seconds.
Extracting and downsampling… 9039 frames from the video.
9039it [00:04, 1968.53it/s]
Kmeans clustering … (this might take a while)
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced
[NULL @ 000001cb163008a0] non-existing PPS 0 referenced

Frames were selected.
You can now label the frames using the function ‘label_frames’ (if you extracted enough frames for all videos).

In [5]: deeplabcut.label_frames(config_path)

ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

ImportError Traceback (most recent call last)
c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\deeplabcut\generate_training_dataset\labeling_toolbox.py in saveDataSet(self, event)
654 self.dataFrame.sort_index(inplace=True)
655 self.dataFrame.to_csv(os.path.join(self.dir,“CollectedData_” + self.scorer + “.csv”))
–> 656 self.dataFrame.to_hdf(os.path.join(self.dir,“CollectedData_” + self.scorer + ‘.h5’),‘df_with_missing’,format=‘table’, mode=‘w’)
657
658 def onChecked(self, event):

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\core\generic.py in to_hdf(self, path_or_buf, key, **kwargs)
2528 from pandas.io import pytables
2529
-> 2530 pytables.to_hdf(path_or_buf, key, self, **kwargs)
2531
2532 def to_msgpack(self, path_or_buf=None, encoding=“utf-8”, **kwargs):

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\io\pytables.py in to_hdf(path_or_buf, key, value, mode, complevel, complib, append, **kwargs)
274 if isinstance(path_or_buf, str):
275 with HDFStore(
–> 276 path_or_buf, mode=mode, complevel=complevel, complib=complib
277 ) as store:
278 f(store)

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\io\pytables.py in init(self, path, mode, complevel, complib, fletcher32, **kwargs)
482 raise ValueError(“format is not a defined argument for HDFStore”)
483
–> 484 tables = import_optional_dependency(“tables”)
485
486 if complib is not None and complib not in tables.filters.all_complibs:

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\compat_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
91 except ImportError:
92 if raise_on_missing:
—> 93 raise ImportError(message.format(name=name, extra=extra)) from None
94 else:
95 return None

ImportError: Missing optional dependency ‘tables’. Use pip or conda to install tables.

ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

ImportError Traceback (most recent call last)
c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\deeplabcut\generate_training_dataset\labeling_toolbox.py in saveDataSet(self, event)
654 self.dataFrame.sort_index(inplace=True)
655 self.dataFrame.to_csv(os.path.join(self.dir,“CollectedData_” + self.scorer + “.csv”))
–> 656 self.dataFrame.to_hdf(os.path.join(self.dir,“CollectedData_” + self.scorer + ‘.h5’),‘df_with_missing’,format=‘table’, mode=‘w’)
657
658 def onChecked(self, event):

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\core\generic.py in to_hdf(self, path_or_buf, key, **kwargs)
2528 from pandas.io import pytables
2529
-> 2530 pytables.to_hdf(path_or_buf, key, self, **kwargs)
2531
2532 def to_msgpack(self, path_or_buf=None, encoding=“utf-8”, **kwargs):

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\io\pytables.py in to_hdf(path_or_buf, key, value, mode, complevel, complib, append, **kwargs)
274 if isinstance(path_or_buf, str):
275 with HDFStore(
–> 276 path_or_buf, mode=mode, complevel=complevel, complib=complib
277 ) as store:
278 f(store)

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\io\pytables.py in init(self, path, mode, complevel, complib, fletcher32, **kwargs)
482 raise ValueError(“format is not a defined argument for HDFStore”)
483
–> 484 tables = import_optional_dependency(“tables”)
485
486 if complib is not None and complib not in tables.filters.all_complibs:

c:\users\kjinn\anaconda3\envs\dlc-windowsgpu\lib\site-packages\pandas\compat_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
91 except ImportError:
92 if raise_on_missing:
—> 93 raise ImportError(message.format(name=name, extra=extra)) from None
94 else:
95 return None

ImportError: Missing optional dependency ‘tables’. Use pip or conda to install tables.

same as here: https://github.com/AlexEMG/DeepLabCut/issues/431

the fix is:
pip uninstall numpy==1.14.5
conda install numpy==1.14.5

cheers

1 Like

Your code fixed the problem!
Thank you!