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

questions about behaviour labeling #215

Open colinyong opened 1 year ago

colinyong commented 1 year ago

hello, I'm a newbie and use simba for the first time.

1) I'm curious when labeling the behavior, do I need to label all the frames of interest or just need to label part of them?For example, I want to classify the freezing behaviror. For a full video, maybe there are one hundred of this behavior, do i need to label all of them? if labeling 10 of this behavior, does it can work?

2) I only foucs on freezing behavior, so in addition to freezing behavior, do i need to creat another classifier named non-freezing behavior and then label it?

sronilsson commented 1 year ago

Hi @colinyong!

(1) The classifier needs annotation examples what freezing looks like, what what freezing doesn't look like, from a variable set of videos. Ideally the annotations should contain examples of edge-cases and: as in "a naive observer might have difficulties with this one". It's difficult to say how many annotations you need, as it depends on how good your tracking is and the complexity of your behavior. There are some example annotations count in the SImBA priprent table 2: https://www.biorxiv.org/content/10.1101/2020.04.19.049452v2.full.pdf.

If you only annotate parts of the videos (and skip annotating some frames) - there are a few annotations methods in SimBA that differ in the way they handle those un-annotated frames - e.g., should the un-annotated frames be assumed not containing the behavior, or should we skip using them in the classifier. You can read more about it here: https://github.com/sgoldenlab/simba/blob/master/docs/label_behavior.md

  1. All classifiers are binary, so you only need one per behavior. You get a probability score ranging from 0-1 of the behavior is present in every frame. You can think of it as the same as annotating in pose-estimation tools. When you place your marker for where the body-parts are, you are also telling the models where the body-part isn't