This package helps to take photos by detecting whether it is a person or a photo.


Save the picture and show it. Results are people or figures Score Yaw Pitch Roll

Getting started

Shoot with the user facing the camera and clear. Once verified, it will automatically save.


Can be used for identity verification. can be used to check between people or images

<!--//#1 Define Permission Camera in AndroidManifest.xml-->
<uses-permission android:name="android.permission.CAMERA" />
//#2 Define MLLivenessCapture and information to be displayed
late MLLivenessCapture _capture;
Image? image;
bool? isLive;
dynamic score;

void initState() {
  _capture = MLLivenessCapture();

//#3 Create a function to press a button and display the result.
void _startRecognition() async {
  MLLivenessCaptureResult? result =
  await startRecognition(context, _capture);
  if (result != null) {
    setState(() {
      isLive = result.isLive;
      score = result.score;
      image = Image.memory(
        fit: BoxFit.cover,

//#4 Create a button to take a photo.
Widget build(BuildContext context) {
  return Scaffold(
    body: ElevatedButton(
      style: buttonStyle(),
      onPressed: _startRecognition,
      child: const Text('Capture'),

Additional information

Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.