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
279 stars 138 forks source link

Importing 0 multi-animal DLC h5 files in Ubuntu #172

Closed jmaicas closed 2 years ago

jmaicas commented 2 years ago

Hi,

just new using SimBA. I have a 2 animal project in Deeplabcut that I want to analyse.

I checked #150 and two other previous questions related but their solutions do not seem to solve what is happening to me.

I created a new pose configuration with 2x7 bps which seems to work fine. I successfully imported two videos, which have the same name and are in the same folder than their .h5 files, but when I try to import the .h5 files it says

"Importing 0 multi-animal DLC h5 files to the current project"

I installed simba in a conda environment and the version is: simba-uw-tf 1.3.12

Thanks in advance!

jmaicas commented 2 years ago

My videos and .h5 files end in _el. However, it seems that SimBA looks only for box or skeleton ones when the .h5 comes from a multianimal DLC project.

So I changed the end of the names of the videos and .h5 files.

Now it gives me this error:

Importing 2 multi-animal DLC h5 files to the current project
Cannot locate video out2021_02_26_habdishab_exp_rat1_crop2_trim1DLC_dlcrnetms5_NewProjectExtraLabelMar9shuffle1_100000_bx.h5 in mp4 or avi format

However, out2021_02_26_habdishab_exp_rat1_crop2_trim1DLC_dlcrnetms5_NewProjectExtraLabelMar9shuffle1_100000_bx.mp4 was correctly imported to the project_folder/videos folder

sgoldenlab commented 2 years ago

Hello @jmaicas!

The simba-uw-tf isn't being supported so try the follwoing:

(i) uninstall simba-uw-tf with pip uninstall simba-uw-tf (ii) install simba-uw-tf-dev with pip install simba-uw-tf-dev (iii) run simba and let me know if that fixes it.

jmaicas commented 2 years ago

Thanks for the quick response, @sgoldenlab!

That worked, thank you!

However, when I import the h5 files, it says:

Importing 2 multi-animal DLC h5 files to the current project Length mismatch: Expected axis has 42 elements, new values have 39 elements The number of body-parts in the input files do not match the number of body-parts in your SimBA project. Make sure you have specified the correct number of animals and body-parts in your project.

I have a project with 2 rats and 7 pbs per rat.

I am reading than in older versions, it could get confused with the _1 and _2 for different animals but that seems to be solved with your new interface that forces to introduce the ID in a new column.

sgoldenlab commented 2 years ago

Yes- if you navigate to project_folder\logs\measures\pose_configs\bp_names, open that CSV and send me a screenshot. That file stores all the body-parts, and which animal it belongs to, in your project, If one body-part is missing in that file, that could explain this error.

jmaicas commented 2 years ago

I see! There are 14 of them but the last one is missing the _2. I'll redo it and I will let you know. Thanks! bp_names

jmaicas commented 2 years ago

it worked! Thank you very much!

sgoldenlab commented 2 years ago

Great!