ROI detectors
Utilities for ROI (region of interest) detection and manipulation.
yarPPG comes with a number of ROI detectors, which find the face in the input frame and provide a mask with the relevant region(s). The following detectors are currently implemented:
FaceMeshDetector
(default) - uses MediaPipe's FaceMesh landmarker.SelfieDetector
- uses MediaPipe's SelfieSegmenter solution. Selfie segmentation is slower than FaceMesh and may not work in a real-time application.
Detectors return a RegionOfInterest
container
that stores the original image, the ROI mask and an optional background mask.