Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about CSV files #381

Open
fidelDLC opened this issue Aug 22, 2024 · 6 comments
Open

Question about CSV files #381

fidelDLC opened this issue Aug 22, 2024 · 6 comments

Comments

@fidelDLC
Copy link

Hello,
I am using SimBA v.1.93.9 and I want to analyze locomotor activity on a single rat video and I would like to know whether it is posible to use a single CVS file to analyse several videos. I read the hypothetical scenarios and in all of them it is necesary to have a CSV file of every video I want to analyze. In this case, I understand that I will need to make the labelling process with clusters in DLC and then continue with SimBa. So, I was wondering if it is posible the .cvs file that I used to train the network to analyze the rest of the videos and skip the long DLC step.

Thank you.

@sronilsson
Copy link
Collaborator

sronilsson commented Aug 22, 2024

I would like to know whether it is posible to use a single CVS file to analyse several videos

Hi @fidelDLC! I interpret this as asking if you can calculate locomotor activity in SimBA without performing pose-estimation first, is that correct? Can you please develop a little bit so I understand? It seems like you have a CSV with pose-estimation data for a single video, but you want to use that tracking data for a different video?

PS:

SimBA have some background removal tools that are not well advertised. This is how many commercial tools track movement. They work well for single animals, as long as (i) the animal isn't sitting still in the whole recording and (ii) there are no other changes beyond the position of the animal in the video. Just have to track e.g. center of the colored blob.

I could try to show you have to do that, if you only want to track locomotion in one rat and you don't want to go through pose-estimation-DLC as you only need the videos.

@fidelDLC
Copy link
Author

Hi, I used SimBa to trained a model that recognize different rat behavior, groomig, rearing, etc. Then, I wanted to perform a analysis with another video to see if the trained network worked. I follow this guide and I realized that in every case I need the respective .csv file for each video I wanted to analyze. This .csv file is generated with DLC and it takes too much time. I do not understand how transfer learning works here, not in SimBa but in DLC to use the pretrained network to generate a .csv file of every single video. I know that you are not DLC but maybe you have a hint or something.

Thank you.

@sronilsson
Copy link
Collaborator

How much time does it take to analyze a video in DLC? How long are the videos, their resolution and FPS?

Typically, it should be relatively quick, once you've build a pose-estimation model and apply it to new videos. I've seen people having these difficulties, but it happens when they have have say recordings that are >100 hours.

@fidelDLC
Copy link
Author

My videos aren´t too long, 10 min per video and it takes more than 5 hours to finish the training and obtain the .cvs file, without taking into consideration the time that I spend labelling the parts of the rat of every frame, this may not take that long. I´m trying to figure out how to use the pose-estimation model that I have already built or the checkpoints that are stored in a file. But honestly, I don´t know how I can make this process faster.

@sronilsson
Copy link
Collaborator

The labelling, and building the model should only be done once and is slow. Applying the model to new videos is much faster.

If training is slow, make sure that it is using your GPU and that tensorflow isn't running through your CPU.

But there should be plenty of documentation for how to get it running on new videos on the DLC pages.

@fidelDLC
Copy link
Author

Ok, I´m gonna continue reading.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants