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
289 stars 141 forks source link

"Create path plot" tool not working #280

Closed alisabak closed 1 year ago

alisabak commented 1 year ago

Hi,

the "Create path plot" tool does not read .csv files well for me. It throws this error in the SimBa window:

SIMBA DATA HEADER ERROR: Body-part nose is not present in the data file. The body-parts available are: ['scor', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_200000.', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_2000', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_200000'] 🚨

And this error in the terminal:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Alisa\anaconda3\envs\simba\lib\tkinter\__init__.py", line 1705, in __call__
    return self.func(*args)
  File "C:\Users\Alisa\anaconda3\envs\simba\lib\site-packages\simba\ui\pop_ups\make_path_plot_pop_up.py", line 32, in <lambda>
    circle_size=circle_size.getChoices()))
  File "C:\Users\Alisa\anaconda3\envs\simba\lib\site-packages\simba\plotting\ez_lineplot.py", line 53, in __init__
    raise DataHeaderError(msg=f'Body-part {body_part} is not present in the data file. The body-parts available are: {body_parts_available}')
simba.utils.errors.DataHeaderError: Body-part nose is not present in the data file. The body-parts available are: ['scor', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_200000.', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_2000', 'DLC_resnet50_bottom_camera_FFEJun19shuffle1_200000']

Here is the csv file: Test 1_FDbottom.csv

Thank you in advance!

Desktop:

sronilsson commented 1 year ago

Hi @alisabak many thanks for reporting this! Can you check if it is working on your end if you update simba with pip install simba-uw-tf-dev --upgrade and try it again?

Just a note: This function is slow. I created the path video of your 36k frames, looks good, but took a while. The code is meant for creating path plots without having to import data into SimBA projects and the function is not parallelized. If you want more control over how path plots are created, and speed up the creation of the path plots significantly, import the data into SimBA and use this function as documented HERE. I will also insert the option to multiprocess the path plots in this current function later in the week or next.

alisabak commented 1 year ago

Hi @sronilsson thank you, it works now. Visualisation functions are faster indeed, will use it instead, thank you for the tip.