简体   繁体   中英

Facial Recognition Python with React Native

I'm working on an application that utilises the cameras of the smartphone for face recognition.

I have used the OpenCV, the face_recognition libs and a blink detection neural network in a Python script to detect and recognise live (real) faces.

What would be the best way to execute the facial recognition Python script with the input frames coming from the smartphone camera in realtime? (by an API call?)

PS I am using React-Native as my frontend.

Ideal thing would be like,

1.Capture the frame from device camera 2.Send it to your Python API 3.Process the image in API and return your response, Probably a Boolean flag (eg:

{ RightFace:true, Blinking: true }

4.Process the response in your application and trigger next actions based on your response

EG:

 CheckFace=()=>{ var Response = //your api call response.parseJson() if(response.rightFace == "true") { login() } if(response.Blinking == "true") { onBlink() } }

This is just an abstract example and has no meaning. But this is the way you need to do it.

Fell free to ask in case of any Query.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM