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

Problem appending ROI features to body parts #394

Open Monica9577 opened 4 days ago

Monica9577 commented 4 days ago

When trying append the ROI data to the body parts, it pops up an error saying no ROIs founded. But I now it's not possible, because I applied directly the same ROI to all videos.

I already have extracted succesfully the features, and I skiped the Outlier correction movement as I always do in my projects.

I'm attaching a .txt with the error in the main console

Desktop (please complete the following information):

sronilsson commented 4 days ago

Hi @Monica9577 thanks for reporting.

When SimBA appends ROI features, SimBA loops over all your CSV files inside the project_folder/csv/outlier_corrected_movement_location, appends your ROI features to these files, and saves the results in project_folder/csv/features_extracted. If a file in project_folder/csv/outlier_corrected_movement_location do not have ROIs drawn, you can encounter this error.

Before I dig, just to confirm: if you open the ROI interface and click the DRAW button for the video ENCODING FEXMP.P 10.mp4 (or any of the other reported missing data files), do you see your drawings?

Monica9577 commented 4 days ago

Yes, the drawings are there for all of them

sronilsson commented 4 days ago

Thanks for checking. Can you send me a screenshot of the ROI interface and with the video with drawings to see if I can sleuth something out?

One thing that occur to me as I type: the errors that you are seeing, are they all happening exclusively for videos that have two . fullstop characters in the name, while it works for files that have a single fullstop in the filename separating the file type from the video name?

.. ps I was caught in the hurricane in south east US. I don't have electricity or a computer. I can't run or test Simba myself. It will be a little slowler to troubleshoot.

Monica9577 commented 4 days ago

I don't think is problem of the video name, as I can see names like "NOR RETRIEVAL MExMPP 4.csv" in the error message. Captura de pantalla 2024-10-02 224032 Captura de pantalla 2024-10-02 224010 Captura de pantalla 2024-10-02 223924

PS: Don't worry about that, I hope everyone is safe.

Monica9577 commented 4 days ago

I just tried to resave some ROI drawings to check if that's the problem, and although SIMBA says it is saved, those videos appear again in the problem list. Captura de pantalla 2024-10-02 225153 Captura de pantalla 2024-10-02 225133 ROI_definitions.zip

sronilsson commented 4 days ago

Thanks for that super helpful - I can't open the ROI_definitions on my phone, but two question:

1) Has it been working previously in an older version of SimBA, and this error started occuring recently?

2) If you delete the ROI definitions file, and draw some of the ROIs again, save, and run it, do you still get the same error?

Monica9577 commented 2 days ago

Hi I just tried on another project and it works perfectly !

Also I tried to do what you suggested and it did worked. I tried to copy again the full file of ROI definitions, and it gave me problems again, so I guess that file got corrupted for some reason.

Thanks for your help and your effort !!

sronilsson commented 2 days ago

Thanks for letting me know @Monica9577! I'm going to find the cause and insert a fix when I get the electricity back.