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
272 stars 137 forks source link

outliers correction #339

Open Maroca5 opened 4 months ago

Maroca5 commented 4 months ago

Hello, I'm using SLEAP H5 data for Simba, but when but when I run the outlier corrections it states is done but the document is empty

Screenshot

sronilsson commented 4 months ago

Hey @Maroca5! Thank you for reporting. Do you also have a screengrab of what is being printed out in the main SimBA terminal, and the Microsoft terminal, when this happens? It would help me to figure out what is going on.

Maroca5 commented 4 months ago

hello, I don't have it sorry but now I'm running into another issue, Simba was using Python 3.10, I uninstall Python 3.10 to see if it will run with 3.6 but is not, is giving me an error [Fatal error in launcher: Unable to create process using '"C:\Users\Venere\AppData\Local\Programs\Python\Python310\python.exe" "C:\Users\Venere\AppData\Local\Programs\Python\Python310\Scripts\simba.exe" ': The system cannot find the file specified.] how can I fix this?. thank you in advance.

sronilsson commented 4 months ago

Hi @Maroca5 - that looks a little odd, I don't know what simba.exe is. Did you install simba with pip install simba-uw-tf-dev ?

It seems to be still using python3.10. Conda is an alternative, there is some installation instructions HERE

Maroca5 commented 4 months ago

Yes I used pip install simba-uw-tf-dev

sronilsson commented 4 months ago

I'd recommend creating a new python environment in Conda, and installing simba in that environment. It may be that you have two python environments installed as base outside of conda, and it could be a little tricky to know which one is running.

Maroca5 commented 4 months ago

Hello again, so is installed with Anaconda, but is not finding ffmpeg [SimBA could not find a FFMPEG installation on computer (as evaluated by "ffmpeg" returning None). SimBA works best with FFMPEG and it is recommended to install it on your computer] but it is installed Screenshot (5)

sronilsson commented 4 months ago

Interesting just to check - to see if ffmpeg is installed, SimBA runs the command ffmpeg - do you see a similar print out when you run that command (i.e., just ffmpeg, not ffmpeg --version)

Maroca5 commented 4 months ago

yes, Screenshot (6)

Maroca5 commented 4 months ago

It runs it in the administrative and normal command prompt, but it doesn't on the anaconda terminal.

sronilsson commented 4 months ago

@Maroca5 - so I understand, you get the ffmpeg warning when you launch simba in the conda navigator terminal ?

Maroca5 commented 4 months ago

figured it out Thank you, I installed it with anaconda and it worked, Thank you I will try to run a project hopefully I don't have any issues

Maroca5 commented 4 months ago

Now when I'm trying to upload SLEAP files is giving me this error. SIMBA NO DATA ERROR: No files with ['.slp'] extensions found in C:/Users/Venere/Desktop/MP4 videos new folder/Behavior. I tried with .slp, H5 and CVS

sronilsson commented 4 months ago

What is the content of the C:/Users/Venere/Desktop/MP4 videos new folder/Behavior directory?

Does it have your SLEAP data in it?

Maroca5 commented 4 months ago

yes I moved all the SLEAP data there, when I first downloaded SIMBA with pip it will identify the files, only the H5, but now is not finding any of them.

sronilsson commented 4 months ago

What is the file extensions of the files in the C:/Users/Venere/Desktop/MP4 videos new folder/Behavior directory? Can you show me a screengrab from that folder?

Maroca5 commented 4 months ago

Screenshot (7)

sronilsson commented 4 months ago

Thanks @Maroca5 - that folder does not contain any tracking data, there are no files with h5, csv or slp extensions - I see 5 video MP4 files. That could be what SimBA is complaining about. If they are located in a sub-folder to C:/Users/Venere/Desktop/MP4 videos new folder/Behavior, e,g, :/Users/Venere/Desktop/MP4 videos new folder/Behavior/Behavior, then try pointing SimBA to that directory.

Maroca5 commented 4 months ago

I did and is still did work

sronilsson commented 4 months ago

And what are located in C:/Users/Venere/Desktop/MP4 videos new folder/Behavior/Behavior ?

Maroca5 commented 4 months ago

so I have Screenshot (8) all the H5 files here

Maroca5 commented 4 months ago

and I use this directory Screenshot (9)

sronilsson commented 4 months ago

And just to confirm, what error do you see then?

sronilsson commented 4 months ago

Note: I would avoid having the best_model.h5 in that folder, because that is not a data file, and you don't want to try to import that as a data file.

sronilsson commented 4 months ago

Another note: .. the data files begin with labels prefix and are only 12kb large - just to check, its not your hand annotations in sleap is it? Or do the files contain machine generated body-part predictions for all frames in the respective videos?

Maroca5 commented 4 months ago

so it started to run when I took out the best-model but then it gave me this error Screenshot (10)

sronilsson commented 4 months ago

SimBA needs a way to pair your SLEAP video files, to your SLEAP data files. SimBA does this by looking at the filenames, Video1.mp4 is paired with Video1.h5 etc. In your case, your sleap h5 files is e.g., named somethingveryverylong.h5. Then SimBA searches for somethingveryverylong.mp4 but can't find it, thats why you see this error:

image

Try renaming your sleap data to align with your video data file names.

Maroca5 commented 4 months ago

It worked, but now the body parts don't match I'll fix that and continue, thank you so much for your help.

Maroca5 commented 4 months ago

one last question, is there any way to do the analysis throughout simba, without having to use SLEAP or other software data? just doin everything with simba?

sronilsson commented 4 months ago

@Maroca5 you'd have to import it from another tool like SLEAP, or software that does pose estimation. I agree it would be good to have a basic pose estimation pipeline within simba but no plans for that at the moment