@elduvelle_neuro Why not deeplabcut? Otherwise, I would start by defining an roi that includes the pupil and a bit of the sclera, then fit a 2d gaussian to the negative of the brightness signal within the roi, and get the pupil diameter as the diameter of the Gaussian's 2-sigma contour

@dimokaramanlis apparently because DLC requires training and in their experimental design you would need to retrain it for each session which is not convenient.

You would do that in python? The ROI definition would probably have to be manual no? I think the OP wanted something that’s as automatized as possible..

Follow

@elduvelle_neuro
Yes, ROI definition is manual, but not sure if "automated" solutions
not based on neural networks generalize well across diverse filming conditions. You can train a DLC model from sessions representative of all those conditions, and the network should generalize well if the pupil is visible.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.