deepOF issueshttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues2023-07-05T15:29:12Zhttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/19KeyError: 'Are there multiple animals in your single-animal DLC video? Make s...2023-07-05T15:29:12ZSilvia RizzoKeyError: 'Are there multiple animals in your single-animal DLC video? Make sure to set the animal_ids parameter in deepof.data.Project'Hi,
I'm facing an issue with a multi-animals dlc output. This is my first approach to the program so maybe I'm doing something wrong.
I'm working on jupyterlab and I've got this error message after the manual detection of a square arena,...Hi,
I'm facing an issue with a multi-animals dlc output. This is my first approach to the program so maybe I'm doing something wrong.
I'm working on jupyterlab and I've got this error message after the manual detection of a square arena, specifically after the computing distances and angles:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~\.conda\envs\deepof\lib\site-packages\deepof\data.py:555, in Project.get_angles(self, tab_dict, verbose)
552 for clique in bridges:
553 dat = pd.DataFrame(
554 deepof.utils.angle(
--> 555 np.array(tab[clique]).reshape([3, tab.shape[0], 2])
556 ).T
557 )
559 dat.columns = [tuple(clique)]
File ~\.conda\envs\deepof\lib\site-packages\pandas\core\frame.py:3813, in DataFrame.__getitem__(self, key)
3812 key = list(key)
-> 3813 indexer = self.columns._get_indexer_strict(key, "columns")[1]
3815 # take() does not accept boolean indexers
File ~\.conda\envs\deepof\lib\site-packages\pandas\core\indexes\multi.py:2623, in MultiIndex._get_indexer_strict(self, key, axis_name)
2621 indexer = self._get_indexer_level_0(keyarr)
-> 2623 self._raise_if_missing(key, indexer, axis_name)
2624 return self[indexer], indexer
File ~\.conda\envs\deepof\lib\site-packages\pandas\core\indexes\multi.py:2641, in MultiIndex._raise_if_missing(self, key, indexer, axis_name)
2640 if cmask.any():
-> 2641 raise KeyError(f"{keyarr[cmask]} not in index")
2642 # We get here when levels still contain values which are not
2643 # actually in Index anymore
KeyError: "['mouse1_Left_ear' 'mouse1_Nose' 'mouse1_Right_ear'] not in index"
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
Cell In[4], line 1
----> 1 my_deepof_project = my_deepof_project.create(verbose=True)
File ~\.conda\envs\deepof\lib\site-packages\deepof\data.py:670, in Project.create(self, verbose, force)
667 distances = self.get_distances(tables, verbose)
669 if self.angles:
--> 670 angles = self.get_angles(tables, verbose)
672 if self.areas:
673 areas = self.get_areas(tables, verbose)
File ~\.conda\envs\deepof\lib\site-packages\deepof\data.py:566, in Project.get_angles(self, tab_dict, verbose)
564 angle_dict[key] = dats
565 except KeyError:
--> 566 raise KeyError(
567 "Are there multiple animals in your single-animal DLC video? Make sure to set the animal_ids parameter"
568 " in deepof.data.Project"
569 )
571 # Restore original index
572 for key in angle_dict.keys():
KeyError: 'Are there multiple animals in your single-animal DLC video? Make sure to set the animal_ids parameter in deepof.data.Project'
However, I set the animals_ids respectively with 'mouse1' and 'mouse2' individuals, as I did on dlc.
Thank you so much.
Best,
Silviahttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/18Error message during .supervised_annotation() fucntion2022-08-10T08:17:10ZJoeri BordesError message during .supervised_annotation() fucntionHi Lucas,
We are running into the following error message with the newest gitlab version of DeepOF (a452c208).
We are training "B" and "W" animals, in a automated detection arena. And everything runs smoothly until:
rule_based_annot...Hi Lucas,
We are running into the following error message with the newest gitlab version of DeepOF (a452c208).
We are training "B" and "W" animals, in a automated detection arena. And everything runs smoothly until:
rule_based_annot_SI1 = my_project_SI1.supervised_annotation()
0%| | 0/10 [00:03<?, ?it/s]
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [6], in <cell line: 4>()
1 #rule_based_annot_SI1 = my_project_SI1.supervised_annotation(video_output="all", frame_limit=150, debug=True)
2
3 #rule_based_annot_SI2 = my_project_SI2.supervised_annotation(video_output="all", frame_limit=150, debug=True)
----> 4 rule_based_annot_SI1 = my_project_SI1.supervised_annotation()
5 rule_based_annot_SI2 = my_project_SI2.supervised_annotation()
File ~\deepof\deepof\data.py:1125, in Coordinates.supervised_annotation(self, params, video_output, frame_limit, debug, n_jobs, propagate_labels)
1121 for key in tqdm(self._tables.keys()):
1122 # Remove indices and add at the very end, to avoid conflicts if
1123 # frame_rate is specified in project
1124 tag_index = raw_coords[key].index
-> 1125 supervised_tags = deepof.supervised_utils.supervised_tagging(
1126 self,
1127 raw_coords=raw_coords,
1128 coords=coords,
1129 dists=dists,
1130 angs=angs,
1131 speeds=speeds,
1132 video=[vid for vid in self._videos if key + "DLC" in vid][0],
1133 trained_model_path=self._trained_model_path,
1134 params=params,
1135 )
1136 supervised_tags.index = tag_index
1137 tag_dict[key] = supervised_tags
File ~\deepof\deepof\supervised_utils.py:713, in supervised_tagging(coord_object, raw_coords, coords, dists, angs, speeds, video, trained_model_path, params)
691 tag_dict[_id + undercond + "climbing"] = deepof.utils.smooth_boolean_array(
692 climb_wall(
693 arena_type,
(...)
698 )
699 )
700 tag_dict[_id + undercond + "sniffing"] = deepof.utils.smooth_boolean_array(
701 sniff_object(
702 speeds,
(...)
711 )
712 )
--> 713 tag_dict[_id + undercond + "huddle"] = huddle(
714 coords.loc[ # Filter coordinates to keep only the current animal
715 :,
716 [
717 col
718 for col in coords.columns
719 if col in deepof.utils.filter_columns(coords.columns, _id)
720 ],
721 ],
722 speeds.loc[ # Filter speeds to keep only the current animal
723 :,
724 [
725 col
726 for col in speeds.columns
727 if col in deepof.utils.filter_columns(speeds.columns, _id)
728 ],
729 ],
730 huddle_estimator,
731 )
732 tag_dict[_id + undercond + "dig"] = dig(
733 coords.loc[ # Filter coordinates to keep only the current animal
734 :,
(...)
749 dig_estimator,
750 )
751 tag_dict[_id + undercond + "lookaround"] = deepof.utils.smooth_boolean_array(
752 look_around(
753 speeds,
(...)
758 )
759 )
File ~\deepof\deepof\supervised_utils.py:305, in huddle(pos_dframe, speed_dframe, huddle_estimator)
303 # Concatenate all relevant data frames and predict using the pre-trained estimator
304 X_huddle = pd.concat([pos_dframe, speed_dframe], axis=1).to_numpy()
--> 305 y_huddle = huddle_estimator.predict(X_huddle)
307 return y_huddle
File ~\.conda\envs\deepof\lib\site-packages\sklearn\pipeline.py:458, in Pipeline.predict(self, X, **predict_params)
456 for _, name, transform in self._iter(with_final=False):
457 Xt = transform.transform(Xt)
--> 458 return self.steps[-1][1].predict(Xt, **predict_params)
File ~\.conda\envs\deepof\lib\site-packages\sklearn\ensemble\_gb.py:1449, in GradientBoostingClassifier.predict(self, X)
1434 def predict(self, X):
1435 """Predict class for X.
1436
1437 Parameters
(...)
1447 The predicted values.
1448 """
-> 1449 raw_predictions = self.decision_function(X)
1450 encoded_labels = self._loss._raw_prediction_to_decision(raw_predictions)
1451 return self.classes_.take(encoded_labels, axis=0)
File ~\.conda\envs\deepof\lib\site-packages\sklearn\ensemble\_gb.py:1405, in GradientBoostingClassifier.decision_function(self, X)
1384 """Compute the decision function of ``X``.
1385
1386 Parameters
(...)
1400 array of shape (n_samples,).
1401 """
1402 X = self._validate_data(
1403 X, dtype=DTYPE, order="C", accept_sparse="csr", reset=False
1404 )
-> 1405 raw_predictions = self._raw_predict(X)
1406 if raw_predictions.shape[1] == 1:
1407 return raw_predictions.ravel()
File ~\.conda\envs\deepof\lib\site-packages\sklearn\ensemble\_gb.py:817, in BaseGradientBoosting._raw_predict(self, X)
815 def _raw_predict(self, X):
816 """Return the sum of the trees raw predictions (+ init estimator)."""
--> 817 raw_predictions = self._raw_predict_init(X)
818 predict_stages(self.estimators_, X, self.learning_rate, raw_predictions)
819 return raw_predictions
File ~\.conda\envs\deepof\lib\site-packages\sklearn\ensemble\_gb.py:810, in BaseGradientBoosting._raw_predict_init(self, X)
806 raw_predictions = np.zeros(
807 shape=(X.shape[0], self._loss.K), dtype=np.float64
808 )
809 else:
--> 810 raw_predictions = self._loss.get_init_raw_predictions(X, self.init_).astype(
811 np.float64
812 )
813 return raw_predictions
AttributeError: 'GradientBoostingClassifier' object has no attribute '_loss'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/17polygonal-manual training2022-07-04T07:46:03ZJoeri Bordespolygonal-manual trainingHi Lucas,
I managed to install the DeepOF version + dependencies to utilize the polygonal-manual arena. I then select the arena and then hit the "q" to finish (?)
However if I continue to the next step I run into the following error, d...Hi Lucas,
I managed to install the DeepOF version + dependencies to utilize the polygonal-manual arena. I then select the arena and then hit the "q" to finish (?)
However if I continue to the next step I run into the following error, do I need to specificy anything?:
rule_based_annot = my_project.supervised_annotation()
NotImplementedError: Supported values for arena_type are ['polygonal-manual', 'circular-autodetect']https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/16Trying DeepOF with fear conditioning video2022-04-19T21:08:53ZJoeri BordesTrying DeepOF with fear conditioning videoHi Lucas,
I was just trying to run deepof on my fear condititioning trial video and it seems the DeepOF starts to complain that the arena can not be detected. Is there maybe an easy fix to even by pass the whole arena detection and stil...Hi Lucas,
I was just trying to run deepof on my fear condititioning trial video and it seems the DeepOF starts to complain that the arena can not be detected. Is there maybe an easy fix to even by pass the whole arena detection and still be able to get some of the parameters out that are not relying on the arena size?
It looks the following:
import deepof
import deepof.data
my_project_JB07 = deepof.data.Project(path=r'C:\Users\joeri_bordes\Desktop\DeeplabCut_project_Bordes\JB011_FC_training\TRIAL\JB07_DLC_output', smooth_alpha=1, arena_dims=380)
my_project_JB07 = my_project_JB07.run(verbose=True)
Then the output looks like this:
Loading trajectories...
Smoothing trajectories...
Interpolating outliers...
Iterative imputation of ocluded bodyparts...
And the it breaks:
error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\shapedescr.cpp:360: error: (-201:Incorrect size of input array) There should be at least 5 points to fit the ellipse in function 'cv::fitEllipseNoDirect'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/15Error while running my_project.supervised_annotation() in newly updated deepo...2021-12-18T11:28:55ZJoeri BordesError while running my_project.supervised_annotation() in newly updated deepof versionHi Lucas,
I was updating DeepOF and then ran into the following error:
rule_based_annot = my_project.supervised_annotation()
AttributeError: 'GradientBoostingClassifier' object has no attribute 'n_features_'Hi Lucas,
I was updating DeepOF and then ran into the following error:
rule_based_annot = my_project.supervised_annotation()
AttributeError: 'GradientBoostingClassifier' object has no attribute 'n_features_'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/14Question for hiding warnings messages DeepOF2021-11-26T10:19:52ZJoeri BordesQuestion for hiding warnings messages DeepOFHi Lucas,
Could I hide these warnings messages? AS it is such a long list, it's getting annoying, but also not too big of a problem, but I thought maybe it would be easy!!
![Hidewarnings](/uploads/827ee1b32c3dbb236d86959d91e07c34/Hidew...Hi Lucas,
Could I hide these warnings messages? AS it is such a long list, it's getting annoying, but also not too big of a problem, but I thought maybe it would be easy!!
![Hidewarnings](/uploads/827ee1b32c3dbb236d86959d91e07c34/Hidewarnings.jpg)https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/13rule_based_annotation() issue2021-10-21T14:24:19ZJoeri Bordesrule_based_annotation() issueHi lucas,
I get an error message while running the rule_based_annotation() function. Do you have the same problem?
rule_based_annot = my_project_OF.rule_based_annotation()
--------------------------------------------------------------...Hi lucas,
I get an error message while running the rule_based_annotation() function. Do you have the same problem?
rule_based_annot = my_project_OF.rule_based_annotation()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-cc53223f42cf> in <module>
----> 1 rule_based_annot = my_project_OF.rule_based_annotation()
AttributeError: 'Coordinates' object has no attribute 'rule_based_annotation'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/12Problem with "Interpolating outliers" during .run()function2021-10-21T10:18:28ZJoeri BordesProblem with "Interpolating outliers" during .run()functionHi Lucas,
So everything was working smoothly when we are talking, but after you pushed this last extra update, I ran into problems again :(
So first I do this and it's working:
my_project = deepof.data.Project(path=r'C:\Users\joeri_bo...Hi Lucas,
So everything was working smoothly when we are talking, but after you pushed this last extra update, I ran into problems again :(
So first I do this and it's working:
my_project = deepof.data.Project(path=r'C:\Users\joeri_bordes\Desktop\DeeplabCut_project_Bordes\JB08\20210325_Data_for_deepof_SI\JB08_files_SI', smooth_alpha=1, arena_dims=380, animal_ids=['B','W'])
Then:
my_project = my_project.run(verbose=True)
It then keeps on running on the interpolating outliers step and does not go to the next task.
Any ideas?
Best, Joerihttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/11my_project = deepof.data.project() does not work anymore2021-10-08T12:01:21ZJoeri Bordesmy_project = deepof.data.project() does not work anymoreHi man, I just updated my version to check out the new implementations, but it gives me an error using the deepof.data.project code. Any ideas why?
my_project = deepof.data.project(path=r'C:\Users\joeri_bordes\Desktop\DeeplabCut_project...Hi man, I just updated my version to check out the new implementations, but it gives me an error using the deepof.data.project code. Any ideas why?
my_project = deepof.data.project(path=r'C:\Users\joeri_bordes\Desktop\DeeplabCut_project_Bordes\Sowmya\20211006_Sowmya_OF_deepof\DeepOF_OF_Sowmya', smooth_alpha=0.99, arena_dims=[380], animal_ids=['B','W'])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-bd1e01a12622> in <module>
----> 1 my_project = deepof.data.project(path=r'C:\Users\joeri_bordes\Desktop\DeeplabCut_project_Bordes\Sowmya\20211006_Sowmya_OF_deepof\DeepOF_OF_Sowmya',
2 smooth_alpha=0.99, arena_dims=[380], animal_ids=['B','W'])
AttributeError: module 'deepof.data' has no attribute 'project'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/10Issues with arena size2021-03-31T10:03:13ZJoeri BordesIssues with arena sizeHi Lucas!
I think there is still some problems with the arena recognition between video's. I am at the moment re-analyzing some old videos that I also gave you before, it is stress versus nonstressed Black_white network. But the size of...Hi Lucas!
I think there is still some problems with the arena recognition between video's. I am at the moment re-analyzing some old videos that I also gave you before, it is stress versus nonstressed Black_white network. But the size of the arena is not adjusted correctly, see figure.
Would it maybe a possibility to help deepof somehow with drawing the arena yourself or giving some standard values or so?
Let me know what you think!
Best, Joeri!
P.S. as you can see it also recognizes the climbing wrongly in these frames.
![Picture1](/uploads/ae74f844a25851bc27f58c9f49c5cbdd/Picture1.jpg)Lucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/9Rule based annotation gives wrong labels2021-03-31T11:36:04ZJoeri BordesRule based annotation gives wrong labelsHi Lucas!
I think there might be a bug somewhere after you added the nose2body parameters, since if I look in the video's. I is constantly flipping between nose2nose and nose2body in the entire length of the video, even though no contac...Hi Lucas!
I think there might be a bug somewhere after you added the nose2body parameters, since if I look in the video's. I is constantly flipping between nose2nose and nose2body in the entire length of the video, even though no contact is made (see picture for example).
Best, Joeri
![Untitled](/uploads/8506155f52d7088282a699391be4542b/Untitled.png)Lucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/8Installing deepof on new PC2021-02-24T11:31:24ZJoeri BordesInstalling deepof on new PCHi Lucas!
I am installing deepof on a new PC but it does not seem to work.
I copied the repository and installed the dependencies. But when I try to install the deepof module I get the following error message:
(deepof) PS C:\Users\j...Hi Lucas!
I am installing deepof on a new PC but it does not seem to work.
I copied the repository and installed the dependencies. But when I try to install the deepof module I get the following error message:
(deepof) PS C:\Users\joeri_bordes\deepof> pip install -e deepof/deepof
ERROR: deepof/deepof is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
Any idea why?
Thanks! JoeriLucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/7Speed parameters2021-12-17T15:54:47ZJoeri BordesSpeed parametersHi Lucas,
I do have another question though! I remember we talked about this before, but I would like to investigate the speed parameters a little more in the data. And previously you said this about that:
The current speed parameter i...Hi Lucas,
I do have another question though! I remember we talked about this before, but I would like to investigate the speed parameters a little more in the data. And previously you said this about that:
The current speed parameter is measuring (by default) the 10-frame average speed of the centre of the animal (in pixels over frames). The result is converted to millimeters per frame (a not-so-friendly measuring unit that can be easily changed to something more meaningful). The averaging is a way of handling small noise in the predicted position.
Does this still hold true for the measurements? So if I for instance have camera with 30fps, would this mean that if I would sum the values per 30 rows that I would get the total millimeters difference per second of the animal?
Best, Joerihttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/6Tensorflow issue2021-02-09T13:19:01ZJoeri BordesTensorflow issueHi Lucas,
I was working with deepof and everything was working perfectly fine, but then I updated with git pull just now. And all of a sudden I get this error:
Any ideas? Did you change something in the tesnorflow dependencies?
Best,...Hi Lucas,
I was working with deepof and everything was working perfectly fine, but then I updated with git pull just now. And all of a sudden I get this error:
Any ideas? Did you change something in the tesnorflow dependencies?
Best, Joeri
import deepof
import deepof.data
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-ada5c8872f7c> in <module>
1 import deepof
----> 2 import deepof.data
~\deepof\deepof\data.py in <module>
25 from sklearn.preprocessing import MinMaxScaler, StandardScaler, LabelEncoder
26 from tqdm import tqdm
---> 27 import deepof.models
28 import deepof.pose_utils
29 import deepof.utils
~\deepof\deepof\models.py in <module>
10
11 from typing import Any, Dict, Tuple
---> 12 from tensorflow.keras import Input, Model, Sequential
13 from tensorflow.keras.activations import softplus
14 from tensorflow.keras.callbacks import LambdaCallback
ModuleNotFoundError: No module named 'tensorflow'Lucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/5Changing the parameters of the annotation tools2021-02-03T11:09:09ZJoeri BordesChanging the parameters of the annotation toolsHi Lucas,
I was wondering if I can play around with the parameters that change the nose2nose interaction or other tools. I see that I get very little interaction times, and I think that the deepof tool is too strict on what to count as ...Hi Lucas,
I was wondering if I can play around with the parameters that change the nose2nose interaction or other tools. I see that I get very little interaction times, and I think that the deepof tool is too strict on what to count as an interaction. Are there specific ways to change this?
Best, JoeriLucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/4Huddling behavior not scored2021-02-10T14:51:15ZJoeri BordesHuddling behavior not scoredHi Lucas,
All the tools seem to be working perfectly fine, which is great! Thanks a lot for this. Only the huddling behavior does not seem to be working with the video file that I also provided you. For the entire video it says it's zer...Hi Lucas,
All the tools seem to be working perfectly fine, which is great! Thanks a lot for this. Only the huddling behavior does not seem to be working with the video file that I also provided you. For the entire video it says it's zero.
Any thoughts?
Best, JoeriLucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/3.tables function does not work?2021-01-19T13:32:40ZJoeri Bordes.tables function does not work?Hi Lucas!
I am now working from home so I am on my mac now haha ;) So I will check the other issue Tomorrow if I can solve it.
However, on my mac deepof is working (: Although there seems to be an issue with the .tables function. After...Hi Lucas!
I am now working from home so I am on my mac now haha ;) So I will check the other issue Tomorrow if I can solve it.
However, on my mac deepof is working (: Although there seems to be an issue with the .tables function. After I uploaded the data (social interaction multi). And I did the my_project.rule_based_annotation() step. I get all the tables loaded in, and I can see them then aswell. However using the .tables gives the following error.
Any idea? I hope I am not spamming you too much haha.
Best, Joeri
my_project.tables
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-08aae0dc2d21> in <module>
----> 1 my_project.tables
AttributeError: 'coordinates' object has no attribute 'tables'https://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/2Compatability problem with windows?2021-01-20T10:37:51ZJoeri BordesCompatability problem with windows?Hi!
I have a problem loading my data in the network that previously worked fine (but that was on my mac laptop).
Is it possible that somehow, the current package is not compatible with windows yet?
I get the following message:
import...Hi!
I have a problem loading my data in the network that previously worked fine (but that was on my mac laptop).
Is it possible that somehow, the current package is not compatible with windows yet?
I get the following message:
import deepof
import deepof.data
my_project = deepof.data.project(path="C:\Users\joeri_bordes\trial", smooth_alpha=0.99)
File "<ipython-input-47-0c102c072d08>", line 1
my_project = deepof.data.project(path="C:\Users\joeri_bordes\trial", smooth_alpha=0.99)
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escapeLucas Mirandalucas_miranda@psych.mpg.deLucas Mirandalucas_miranda@psych.mpg.dehttps://gitlab.mpcdf.mpg.de/lucasmir/deepof/-/issues/1Issues with recognizing the body parts2020-12-08T16:38:02ZJoeri BordesIssues with recognizing the body partsHi 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_pro...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)
<ipython-input-10-0fc6e51f912d> in <module>
----> 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"