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

Directionality for ROIs #396

Open
bancroftg opened this issue Oct 9, 2024 · 14 comments
Open

Directionality for ROIs #396

bancroftg opened this issue Oct 9, 2024 · 14 comments

Comments

@bancroftg
Copy link

Unable to determine directionality (in respect to ROIs):

When I go to "Aggregate Boolean Conditional Statistics" I do not have any conditional rule behavior options "facing" the ROIs, only options where the animal is "in zone". This is after successfully drawing ROIs, analyzing ROI data aggregates, and extracting features. After extracting features, I appended ROI features by body part.

When I initially created this project, I did not use a SimBA suggested animal body-part config, but instead produced my own. It is 4 points with a center point instead of the tail. Am I required to use a SimBA body-part config in order to compute directionality?

Please let me know and thank you!

@sronilsson
Copy link
Collaborator

sronilsson commented Oct 9, 2024

Hi @bancroftg!

In order to compute where the animal is facing in relation to ROIs and other animals in SimBA GUI, it requires body-parts for the left ear, nose, and right ear. It's done like the image below.

However, if SimBA cannot find a body part name that contains the two words left and ear, and another body part containing the two words right and ear, and a third body-part with the word nose, it doesn't know which body-part is which and direction/facing will not be computed.

What are the names of your 4 body-parts you are tracking and what body-parts are they? (PS. its possible to use the nape of the neck as well if you don't have the ears tracked but it would have to be done programmatically and not in GUI.

image

@bancroftg
Copy link
Author

I have left ear, right ear, nose, and center. When I append the features do they need to be in any specific order?

@sronilsson
Copy link
Collaborator

No, no specific order required - can you send me an example CSV file from the project_folder/csv/features_extracted directory?

Do you know if you have columns in those files with the _facing suffix?

@bancroftg
Copy link
Author

5218_dSLR_test_A1.csv

Not seeing _facing suffux

@sronilsson
Copy link
Collaborator

Cheers, let me check the code to remind myself what could be happening.

@sronilsson
Copy link
Collaborator

sronilsson commented Oct 9, 2024

Ah yeah I can see.. you use a space in the bodypart name, while the code tries to split the bodypart name exlusively by _ .... so left_ear or ear_left works while ear left or left ear doesn't work. Let me improve that code.

@bancroftg
Copy link
Author

Thank you!

@sronilsson
Copy link
Collaborator

sronilsson commented Oct 9, 2024

I inserted a fix that also works on your body-parts as you named them. Just got to take the dog for her walk she is growling at me lol, I will push the update when I get back and let you know.

@sronilsson
Copy link
Collaborator

If you update Simba with pip install simba-uw-tf-dev upgrade, how does it look on your end if you try to run the ROI feature extraction again followed by the conditional booleans?

@bancroftg
Copy link
Author

I ran the Simba update as pip install simba-uw-tf-dev --upgrade and ran feature extraction again. This gave me the directionality info perfectly! Thank you!

@sronilsson
Copy link
Collaborator

@bancroftg cool - one question: I just ran this boolean conditional analysis, and it just outputted a single aggregate count of when the behaviors happened (or not happened) at the same time. I didn't get any values for the exact time period bouts when they happened at the same time. Do you think that would be useful to add?

@bancroftg
Copy link
Author

Oh Definitely! And the features extracted csv's give a frame-by-frame analysis, correct?

@bancroftg
Copy link
Author

I have another small issue actually: When I now go to "Visualize ROI features" with the following settings, I'm running into an error:
image
image

@sronilsson
Copy link
Collaborator

Ah yeah, let me fix that too - while I do: how does it look if you tick the Multi-process checkbox, doe sit run then?

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