Selenium with user interaction

I have a project in which selfie will automatically be clicked by detecting the face in the frame. There is no click button to take the selfie.
Now what i need to do is to automate the whole process using selenium(in python). So is there any way we can pass the data to that capture?

Or is there any other way i can achieve this?