umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
64 stars 5 forks source link

making categorizers for interactive advanced-one white mouse, one black #189

Closed meghanflanigan closed 2 weeks ago

meghanflanigan commented 1 month ago

Hi,

I just started using LabGym to quantify mouse behavior in a free social interaction test. I trained the detectors using two classes, one for each mouse, since they are different colors (one white mouse one black).

In terms of training the categorizers, do I need to separately train them for each mouse (class?)? Meaning, do I have to generate and sort behavioral examples for both? Then when I train, I would train two categorizers, one for each mouse from each set of prepared behavioral examples?

Thanks!

Meghan (MUSC)

yujiahu415 commented 1 month ago

Hi,

Generally speaking I don't think you need to sort the behaviors for different mice, like white mouse investigating and black mouse investigating. Instead, you can sort 'investigating', in which the 'main character' (which is in magenta-colored spotlight) is doing investigating, regardless of whether it's white or black. However, since the black and white color are very dominant markers, the Categorizer may associate the body color with the behavior during training. A way to prevent this is to have similar number of white mouse investigating and black mouse investigating in the same 'investigating' category. This can make the Categorizer insensitive to the body color. You can first try this and if it doesn't work well, you can divide each behavior category into two: white xxx and black xxx. Either way, you don't need to train two Categorizers. You can put all the behavior categories together and train one Categorizer.

Alternatively, you can train a Categorizer with Pattern Recognizer only, which only focuses on the 'pattern images' that do not have the information of body color.

meghanflanigan commented 2 weeks ago

Sorry for the delay in responding, but thank you so much for this info, it's very helpful. We will try these approaches and see.

yujiahu415 commented 2 weeks ago

Sure! Let me know if there's any issues.