Issues with recognizing the body parts
Hi Lucas, as I wrote in my email I have some issues with deepof recognizing the correct bodyparts. I checked the bodypart labels. And I labbeled them like; Nose, Center etc.
This is my code:
import deepof import deepof.data my_project = deepof.data.project(path="/Users/Joeri/Desktop/JB05.4-OF", smooth_alpha=0.99, animal_ids=['B'])
my_project = my_project.run(verbose=True)
The error:
Loading trajectories... Smoothing trajectories... Computing distances... Computing angles...
KeyError Traceback (most recent call last) in ----> 1 my_project = my_project.run(verbose=True)
~/Documents/Python_stuff/deepof/deepof/data.py in run(self, verbose) 361 362 if self.angles: --> 363 angles = self.get_angles(tables, verbose) 364 365 if verbose:
~/Documents/Python_stuff/deepof/deepof/data.py in get_angles(self, tab_dict, verbose) 335 dat = pd.DataFrame( 336 deepof.utils.angle_trio( --> 337 np.array(tab[clique]).reshape([3, tab.shape[0], 2]) 338 ) 339 ).T
~/.local/lib/python3.7/site-packages/pandas/core/frame.py in getitem(self, key) 2804 if is_iterator(key): 2805 key = list(key) -> 2806 indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1] 2807 2808 # take() does not accept boolean indexers
~/.local/lib/python3.7/site-packages/pandas/core/indexing.py in _get_listlike_indexer(self, key, axis, raise_missing) 1534 # Have the index compute an indexer or return None 1535 # if it cannot handle: -> 1536 indexer, keyarr = ax._convert_listlike_indexer(key, kind=self.name) 1537 # We only act on all found values: 1538 if indexer is not None and (indexer != -1).all():
~/.local/lib/python3.7/site-packages/pandas/core/indexes/multi.py in _convert_listlike_indexer(self, keyarr, kind) 2324 mask = check == -1 2325 if mask.any(): -> 2326 raise KeyError(f"{keyarr[mask]} not in index") 2327 2328 return indexer, keyarr
KeyError: "['B_Right_fhip' 'B_Center' 'B_Spine_1'] not in index"