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
272 stars 137 forks source link

SHAP visualization failed #359

Closed AndyWeasley2004 closed 1 month ago

AndyWeasley2004 commented 1 month ago

I have run Simba with videos of a single animal and a single behavior to classify.

And I have created three model settings saved in configs folder and I clicked the run all specific models. After SHAP score is calculated, the error says the SHAP visualizations/aggregate stats failed. My python is 3.6 and the computer is using Ubuntu 22.04.3.

The error message is here: IMG_0930

AndyWeasley2004 commented 1 month ago

In case it's also important: we have created a customed 6 body parts for this project.

sronilsson commented 1 month ago

Hi @AndyWeasley2004 - many thanks for reporting 👍🏻 one question before I dig: which version of simba are you running and you see when running pip show simba-uw-tf-dev?

AndyWeasley2004 commented 1 month ago

Hi, thank you for your help in advance. I'm using 1.88.6 of Simba.

sronilsson commented 1 month ago

Yes cheers, I will see if I can recreate. it should just be a warning msg telling you that you cannot create graphics showing aggregate binned SHAP values (which is reserved for non-custom body-parts), but but seems to be a bug in the warning msg.

sronilsson commented 1 month ago

@AndyWeasley2004 - if you upgrade to latest version of SimBA with pip install simba-uw-tf-dev --upgrade and try it again, how does it look on your end?

AndyWeasley2004 commented 1 month ago

Sorry for the late response. I have use a toy example to quickly get the result, and the model can successfully save and just the visualization is still skipped, but I think it solve my issue already! Thank you for your help IMG_0944

sronilsson commented 1 month ago

That's it, thank you for letting me know @AndyWeasley2004 ! The visualization is meant to be a plot like THIS ONE. However, if you have a user-defined pose-estimation schema, we don't make any assumptions even about which species you have, so it's not possible to bucket the features easily into categories, so that part is skipped.