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
286 stars 139 forks source link

SLEAP data import #146

Open jverpeut opened 2 years ago

jverpeut commented 2 years ago

I realize there are several threads about this problem, but even after updating and reading through all the documentation again, I still can't find a solution. In one thread there was a hint that the update would contain a fix, but I think I am updated to the latest version (I see the new GUI with ROI features) and I am still receiving the same here. In short, I am trying to import a SLEAP slp file, but I receive the error below. Have other users found a solution? Thank you in advance.

D:/SLEAP/VD/simbatest/project_folder/project_config.ini (['Ear_left', 'Ear_right', 'Nose', 'Tail_base'], ['No body parts']) Number of Frames: 54308 The CSV file could not be located at the following path: D:/SLEAP/VD/simbatest/project_folder\csv\features_extracted\2021_09_0110_00.csv . It may be that you missed a step in the analysis. Please generate the file before proceeding. Applying settings for classical tracking... D:/SLEAP/VD/simbatest/project_folder\csv\targets_inserted\2021_09_0110_00.csv The CSV file could not be located at the following path: D:/SLEAP/VD/simbatest/project_folder\csv\targets_inserted\2021_09_0110_00.csv . It may be that you missed a step in the analysis. Please generate the file before proceeding. Reading in 0 annotated files... Converting .slp into csv dataframes... Processing 2021_09_0110_00.slp... Warning: The video name could not be found in the .SLP meta-data table SimBA therefore gives the imported CSV the same name as the SLP file. To be sure that SimBAs slp import function works, make sure the .SLP file and the associated video file has the same file name - e.g., "Video1.mp4" and "Video1.slp" before importing the videos and SLP files to SimBA. 12 cannot set a row with mismatched columns Check that you have confirmed the number of animals and named your animals in the SimBA interface

Desktop (please complete the following information): I am using a windows 10 machine with a GPU. I am using anaconda and have updated SimBa within its own environment using command line.

sgoldenlab commented 2 years ago

Hi @jverpeut! The key part of the error messages is this one

Check that you have confirmed the number of animals and named your animals in the SimBA interface

SimBA expects a columns representing 4 body-parts in the SLP file, but for some reason finds more, or less, than 4, and throws the error. Could you send a screenshot of the error msg printed in the windows terminal when you try to import the SLP files? It is easier for me to understand and debug if needed.

jverpeut commented 2 years ago

I think one of my body parts is not labeled throughout. I am going to retrack and try again. Thank you!

catubc commented 2 years ago

Hi @jverpeut . I am also using Sleap, and I found a duplication bug that prevented me from running simba. I'm working on a more permanent fix. But for now here's some code: https://github.com/sgoldenlab/simba/issues/155

I'm also curious to know how you find simba+sleap, feel free to ping me.

jverpeut commented 2 years ago

Thank you @catubc! I will try this. I wonder too if we are limited to the classifiers already built into simba or if we can train a new classifier.