Post-Refine Labels Error (Possibly) While Creating New Training Dataset

Hi DLC Community!

As I finished refining frames for my network and have merged the datasets, I have now moved to the Create Training Dataset portion. However, when I run the GUI to create my new training data set, my GUI crashes spitting back the following code:

C:\Users\jusjames\Desktop\SPONTANEOUS-JESS_20201105-2020-12-28\training-datasets\iteration-1\UnaugmentedDataSet_SPONTANEOUSDec28  already exists!
Traceback (most recent call last):
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\gui\", line 385, in create_training_dataset
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\generate_training_dataset\", line 1018, in create_training_dataset
    Data, trainIndices, nbodyparts, project_path
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\generate_training_dataset\", line 793, in format_training_data
    img_shape = _read_image_shape_fast(os.path.join(project_path, filename))
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\deeplabcut\generate_training_dataset\", line 777, in _read_image_shape_fast
    return io.imread(path).shape
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\skimage\io\", line 48, in imread
    img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\skimage\io\", line 209, in call_plugin
    return func(*args, **kwargs)
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\skimage\io\_plugins\", line 10, in imread
    return np.asarray(imageio_imread(*args, **kwargs))
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\imageio\core\", line 265, in imread
    reader = read(uri, format, "i", **kwargs)
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\imageio\core\", line 172, in get_reader
    request = Request(uri, "r" + mode, **kwargs)
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\imageio\core\", line 124, in __init__
  File "C:\Users\jusjames\Anaconda3\envs\DLC-GPU\lib\site-packages\imageio\core\", line 260, in _parse_uri
    raise FileNotFoundError("No such file: '%s'" % fn)
FileNotFoundError: No such file: 'C:\Users\jusjames\Desktop\SPONTANEOUS-JESS_20201105-2020-12-28\labeled-data\578.4117_Trim\img11077.png'

If you suspect this is an IPython 7.19.0 bug, please report it at:
or send an email to the mailing list at

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

Is my training set created? Or does this crash indicate that it did not? If it did not, how do I resolve this issue?

Thank you in advance for this help!

sorry, you mean this error is not correct, the file is indeed there?

You can check to be sure every annotation has an image, and every image has annotations beforehand as well. see helper code here: DeepLabCut/ at a6346ab7b831a258d6c0aadbf81f3c0eefbef4e4 · DeepLabCut/DeepLabCut · GitHub

i.e. see: DeepLabCut/ at a6346ab7b831a258d6c0aadbf81f3c0eefbef4e4 · DeepLabCut/DeepLabCut · GitHub

1 Like

Thank you for your response! Yes, I actually redid Step E in the GUI involving labeling all the frames extracted. So I believe my post-refining step worked.

Thanks for these references also. Will refer to these again when running projects!

1 Like