Problem plotting trajectory of analyzed video

Hi,

I’m using Google Colab to run my project and I was able to obtain a satisfactory pixel error (below) after evaluating the trained model:
image

I wanted to analyze a video but I get the following error:

Loading /content/drive/My Drive/Marmoset/Activity_Emilio-Kwan-2020-12-02/analysis_new/2018-12-18_Emilio.mpg and data.
No unfiltered data file found in /content/drive/My Drive/Marmoset/Activity_Emilio-Kwan-2020-12-02/analysis_new for video 2018-12-18_Emilio and scorer DLC_resnet50_Activity_EmilioDec2shuffle1_267500 and skeleton tracker.
No detection data found in /content/drive/My Drive/Marmoset/Activity_Emilio-Kwan-2020-12-02/analysis_new for video 2018-12-18_Emilio, scorer DLC_resnet50_Activity_EmilioDec2shuffle1_267500, and tracker skeleton
Make sure /content/drive/My Drive/Marmoset/Activity_Emilio-Kwan-2020-12-02/analysis_new/2018-12-18_Emilio.mpg was previously analyzed, and that detections were successively converted to tracklets using “deeplabcut.convert_detections2tracklets()” and “deeplabcut.convert_raw_tracks_to_h5()”.
Plots could not be created! Videos were not evaluated with the current scorer DLC_resnet50_Activity_EmilioDec2shuffle1_267500.

I’m confused as to why I get this error message as I analyzed the video. I also don’t think I have the incorrect path to the video file, I specified the new path for the video for analysis. Unless it has to be in the same folder as the training videos?

Can anyone advise on how to rectify this error. Thanks!

Hi,

If it’s multianimal project you have to convert tracklets first.

Hi,

I’m only tracking a single animal, so I don’t need to convert tracklets. Is there a way I can specify this?

When you created the project, did you select “multi-animal project”? That’s when the determination is made.

Whatever line you are calling to get the error above thinks that you are running a multi-animal project. So, if you did not select multi-animal project, make sure you are running the line for single animal projects.
My guess is that this isn’t on the analyze video call, but rather the plot_trajectories call. If that’s the case, and you have a single-animal project, make sure you don’t include a flag for track_method=skeleton because that is for multi-animal projects only.

You’re not the first person to hit this error, either. Just make sure that if you created a single animal project, you use COLAB_YOURDATA_TrainNetwork_VideoAnalysis.ipynb as your template. But if you created a multi-animal project, you should use COLAB_maDLC_TrainNetwork_VideoAnalysis.ipynb as your template.

No, I didn’t select “multi-animal project” when I created the project using my Windows PC.

I looked back at the code and it looks like for the video analysis step, I incorrectly added the tracklet specification when it was not needed. It looked like I was able to run the analyze video command but when I check the directory of the analyzed video, I don’t see a .hd5 file.

I suppose this is why I can’t verify the frames for outliers or proceed to plot trajectories? I get the following message when I try to plot trajectories:

No filtered data file found in /content/drive/My Drive/Marmoset/Activity_Emilio-Kwan-2020-12-02/analysis_new for video 2018-12-18_Emilio and scorer DLC_resnet50_Activity_EmilioDec2shuffle1_267500.

Not sure if this is relevant but I also don’t see any .hd5 files in the videos used for labeling/training.

You wouldn’t see anything there unless you analyzed those videos. By they way, you should analyze those videos first. If your model can’t track the videos it trained on, you should add to your training set before doing too much else.

I’d need more info to help, and without knowing your computer/programming background, I apologize if some of the following seems rudimentary.

  1. What is the exact line of code you are running when you get the error? And what are the variables (i.e. if you are running deeplabcut.analyze_videos(config, vids), what have you set config and vids to?

  2. When you are looking on your computer at the folder containing the video, where you say no hd5 file is saved, you are looking at a folder in your Google Drive folder, not a local folder, correct?

  3. Is any file created in that video folder other than the video after analyze videos? Anything beginning with the name of the video with any extension?

  4. Please confirm that your config.yaml file has a line that says multianimalproject: false. That should be right near the top. You should also not see individuals:, or multianimalbodyparts:.