Index error on refine label

I’m trying to refine the labeling on a trained network. I get the following error. I’m using Ubuntu 18.04/Nvidia GPU. The labeled video is fine, (and looks better), but I can’t see any of the trajectories plotted as well (there is a file called trajecotry.png, but with no data points). The csv file seems to be fine. How can I resolve this?

Traceback (most recent call last)
~/anaconda3/envs/DLC-GPU/lib/python3.7/site-packages/deeplabcut/gui/ in analyze_videos(self, event)
271 if self.trajectory.GetStringSelection() == “Yes”:
272 deeplabcut.plot_trajectories(self.config, self.filelist, displayedbodyparts=self.bodyparts,
–> 273 videotype=self.videotype.GetValue(), shuffle=shuffle, trainingsetindex=trainingsetindex, filtered=True, showfigures=False, destfolder=self.destfolder)
275 def reset_analyze_videos(self,event):

~/anaconda3/envs/DLC-GPU/lib/python3.7/site-packages/deeplabcut/utils/ in plot_trajectories(config, videos, videotype, shuffle, trainingsetindex, filtered, displayedbodyparts, showfigures, destfolder)
183 tmpfolder = os.path.join(basefolder,‘plot-poses’, vname)
184 auxiliaryfunctions.attempttomakefolder(tmpfolder)
–> 185 PlottingResults(tmpfolder, Dataframe, DLCscorer, cfg, bodyparts, showfigures, suffix+’.png’)
187 print(‘Plots created! Please check the directory “plot-poses” within the video directory’)

~/anaconda3/envs/DLC-GPU/lib/python3.7/site-packages/deeplabcut/utils/ in PlottingResults(tmpfolder, Dataframe, scorer, cfg, bodyparts2plot, showfigures, suffix)
53 plt.savefig(os.path.join(tmpfolder,“trajectory”+suffix))
54 plt.figure(figsize=(30, 10))
—> 55 Time=np.arange(np.size(Dataframe[scorer][bodyparts2plot[0]][‘x’].values))
57 for bpindex, bp in enumerate(bodyparts2plot):

IndexError: list index out of range


Hi dinrao,

Were the bodyparts selected in the panel to the right of ‘Want to plot the trajectories?’ It is as if no bodyparts at all had been selected, hence the empty bodyparts2plot.

1 Like

thanks! I’ll revise it and run the refine again.