Hi amina123 ,
I would say the best approach would be to use hair semantic segmentation model and run it on the camera. It might be there are some pretrained AI models that do this already, and you could deploy them on the device (docs here).
Thoughts?
Thanks, Erik