sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
297 stars 143 forks source link

Issue when extracting features #42

Closed 2909ft closed 4 years ago

2909ft commented 4 years ago

Hello everybody!

I am attempting to extract the features, but I run into this error message image

I created an environment containing only python 3.6.0, then (inside the environment) I pip install simba-uw-no-tf, then conda install shapely, and conda install h5py. SimBA launches, and all the steps went fine until the extract features bit, where I get that error message. Any idea how to solve this? I am using the 1 animal 8bp config

sronilsson commented 4 years ago

Hi @2909ft !

Typically this error happens when your pose-estimation tool, like Deeplabcut, has placed all the body-parts in the image on a single x-y coordinate. When SimBA then tried to calculate features that requires 2d (like the millimeter area of the animal), this error happens, as we can't calculate the area when the coordinates fall on one dimension.

I wrote a FAQ that mentions this error but I forgot to link to it on the main page:

https://github.com/sgoldenlab/simba/blob/SimBA_no_TF/docs/FAQ.md

There may also be some relevant info how to solve it on the gitter page if you search for 'qhull'.

The typical reason is that your first image in your video does not contain an animal, or the animal is covered by the experimenter hand or similar, and the pose tool has placed all the body-parts, for example, in the top left corner of the image. You can solve this by cutting those early parts of the video out before anslysis. If that's not the case, it may be that something has gone wrong in the outlier correction step, and you may want to make your outlier criteria less strongest (increase the criteria values).

Let me know if that fixes it or not!

2909ft commented 4 years ago

Indeed, I was less stringent with the outlier correction step and now it seems to be fine :) thank you for the reply!