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

Using action_gif #1

Closed
Tsugua5 opened this issue Sep 30, 2019 · 3 comments
Closed

Using action_gif #1

Tsugua5 opened this issue Sep 30, 2019 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Tsugua5
Copy link

Tsugua5 commented Sep 30, 2019

First of all, thank you for the release. I am sure that it will help alot of people doing behaviour classification in open fields.

I have adapted the code to work on 8 features derived from 7 DLC markers on a top-down video.
Our original goal was to train a supervised classifier (grooming yes/no) on dimensionality reduced data. Now shifting strategy to adapt your code, a very crucial step will be to subjectively judge the action in each of the classes that the gmm and svm works with.

My questions are regarding the action_gif function to output small videos.

Is it possible to run the function on multiple subjects automatically, or do I need to parse the action_gif videos and group_labels for each subject separately?

Another thing. While testing the function on a single video, I got a warning from line 51 of action_gif.

grp_1 = grp_fill(1:fps/20:end);

My fps is 30, so here the grp_1 is downsampled in a ambigous way... Any thoughts on this?

Again, thanks alot for the upload.

Sincerely, Peter

@runninghsus
Copy link
Collaborator

Hi Peter,

Thank you for your issue, action_gif currently is buggy and I am in the process of replacing it with non-matlab command lines to convert videos into individual images. I used ffmpeg to extract the frames and a matlab command to create short videos for subjectively naming the groups (rear, groom, etc.). I will reply to this thread once it the instructions are up - should be done by the end of today.

As for understanding what the downsampling does in action_gif, the step (fps/20) is wrong, as it should match the downsampled frame-rate for labels (10fps). If you're sampling frequency is 30fps, it should just grab every 3 frames. But I would rely on ffmpeg for that too. Again, instructions to be updated.

As for running the functions on multiple subjects automatically, that is a good idea and I will create a loop for that.

Thank you so much for your input!

Alex Hsu

@Tsugua5
Copy link
Author

Tsugua5 commented Sep 30, 2019

Thank you for the reply, and good to hear that you are ahead of this. Will look forward to future updates :)

Peter

@runninghsus
Copy link
Collaborator

Hi Peter,

I have updated the action_gif to action_gif2. The instructions are in the README.
Parse the video into 10fps frames using the FFmpeg command (instructions and command have been posted).
Once you added action_gif2.m to MATLAB path, run the function.
Let me know if you have any more questions.

Best,

Alex

@runninghsus runninghsus self-assigned this Oct 7, 2019
@runninghsus runninghsus added the good first issue Good for newcomers label Oct 7, 2019
@runninghsus runninghsus pinned this issue Oct 7, 2019
@runninghsus runninghsus added the bug Something isn't working label Apr 8, 2020
runninghsus added a commit that referenced this issue Dec 19, 2020
requirements.txt for streamlit share
runninghsus added a commit that referenced this issue Dec 19, 2020
Merge pull request #1 from YttriLab/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants