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
298 stars 143 forks source link

Movie filename mismatch in csv files: a bug and a fix #15

Closed bmi-lsym closed 4 years ago

bmi-lsym commented 4 years ago

Hi again,

I am using the new version 1.1 of the SimBA environment, and came over a small glitch, I think related rather to my particular way of using it.

So, the bug:

after the "Outlier Correction" step I proceeded directly to "Extract Features" step, but got an error message in the main SimBA GUI window: "Error: make sure all the videos that are going to be analyzed are represented in the project_folder/logs/video_info.csv file". The step thus has failed.

Possible reason and working empiric fix:

The postures were analysed separately using DeepLabCut (not via SimBA pipeline), and then the .csv files with coordinates from DeepLabCut were loaded into the the resulting .csv files. Thus, the names of those files (something like "Dec0419_Trial1DLC_resnet50_resident_intruder_optogeneticsFeb14shuffle1_600000.csv") were not the same as the names of the movies loaded into the project ("Dec0419_Trial1.mp4"). The former names were listed in the log files project_folder\log\Outliers_location_nnnnnnn.csv and project_folder\log\Outliers_movement_nnnnnnnnnn.csv, but the latter (simpler) movie names were listed in the file project_folder\log\videoinfo.csv The issue was resolved by pasting the values of the movie names from Outliers*.csv log files into the video_info.csv log file.

Sincerely, Olexiy.

sgoldenlab commented 4 years ago

Hi @bmi-lsym. Thanks Olexiy! This may also be related to an error that was highlighted and resolved this morning - related to DeepLabCut changing their CSV output file names in their newer versions: https://github.com/sgoldenlab/simba/issues/13. If you download SimBA again this error has been fixed.

As you say, in the video_info.csv - make sure all the videos meta data and correct video file names are stored before proceeding through outlier correction and feature extraction steps. These are set in the [Video parameters] tab in SimBA. The video_config.csv may look like this, where the video column names corresponds to the names of your tracking/video files.

image

Thanks again