Deeplabcut: Error using create_video_with_all_detections

Created on 6 Nov 2020  路  5Comments  路  Source: DeepLabCut/DeepLabCut

Dear DLC Team,

Your Operating system and DeepLabCut version
Windows 10 with an Anaconda Env, & DeepLabCut 2.2b8, using maDLC

I wanted to use these sets of functions that you suggest to use for checking the trained network:
scorername = deeplabcut.analyze_videos(config_path,['/fullpath/project/videos/testVideo.mp4'], videotype='.mp4')
deeplabcut.create_video_with_all_detections(config_path, ['/fullpath/project/videos/testVideo.mp4'], scorername)

However, when I use those and try to look at a new video that has not been used for training the network, I get this error:
DLC1

If I understand correctly, the function looks for the network with a modified version of the actual network name, in face one D is added to the name of network.

Do you have any idea of what I might be doing wrong here?

Thank you very much,
Isa

All 5 comments

I've run into similar problems. I think that your ipython variable video is overwritten during the call to analyze_videos, so you're not actually passing the path to your videos to create_video_with_all_detections. Rather than using video as the name of that variable, try something more unique (e.g. my_videos) that isn't used in the code, or just re-declare video before your call to create_video_with_all_detections.

@imgross, you need to pass a list of videos, even if you analyze only one; [video] should work. Let me know if that helps!

Hi there, thanks a lot, both tips were helpful and I could run the function with [video] in brackets or when analyzing several videos at the same time :)

What would not be the best way to get to the trajectories from that videos in .csv format?

Cheers, Isa

Excuse me for the typo. I wanted to say:

what would now be the best way to get to the trajectories in .csv format? :)

we recommend using the h5 files (you can view them just like as with excel here: https://www.hdfgroup.org/downloads/hdfview/

but otherwise, you can import the files in matlab, R, python and export as csv if you like! https://towardsdatascience.com/working-with-hdf5-files-and-creating-csv-files-1a7d212d970f

Was this page helpful?
0 / 5 - 0 ratings