Mask Detection

ErrorCode Trueface::SDK::detectMask(const TFImage &tfImage, const FaceBoxAndLandmarks &faceBoxAndLandmarks, MaskLabel &result)

Detect whether the face in the image is wearing a mask or not.

Parameters
Returns

error code, see ErrorCode.

ErrorCode Trueface::SDK::detectMasks(const std::vector<TFFacechip> &chips, std::vector<MaskLabel> &results)

Detect whether the faces are wearing a mask or not. This batch processing method increases throughput when using GPU inference.

Parameters
  • chips[in] A vector of TFFacechip on which to run mask detection.

  • results[out] The predicted MaskLabel for the input face chips.

Returns

error code, see ErrorCode.

enum Trueface::MaskLabel

Results from mask detection.

Values:

enumerator MASK

There is a mask on the face.

enumerator NO_MASK

There is no mask on the face.