Face Detection
![face detection](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/face_detection-1fdc3c4a90174d5cb2b0da4a5640a071.png)
Use Facial Detection to detect faces of people using this effect. To detect more than one face, assign a Face Detection node to each face in the scene. It can detect up to five faces. Facial Detection is in the Head & Face category.
Input
Name | Data Type | Description |
---|---|---|
Which Face | String | The face to apply the effect to. Face 0 represents the first face appearing in the scene, Face 4 represents the fifth face appearing in the scene. |
Output
Name | Data Type | Description |
---|---|---|
Begin | Exec | Execute the next node when the face is detected. |
Stay | Exec | Keep executing the next node when the face stays in the scene. |
End | Exec | Execute the next node when the face disappears. |
None | Exec Array | Keep executing the next node when the face is not detected. |
Face Count | Number | The number of faces in the scene. The max is 5 faces. |
Example
![face detection example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/face_detection_example-eee47cf4f90c9fa32225bebc6cd2f4a0.gif)
This example triggers the appearance of a cube when one face is detected and triggers the appearance of both the cube and the sphere when two faces are detected in the view.
![face detection node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/face_detection_node-62c3194e9f8787d1d461fced73b856ca.png)