Liveness Detection

 


The embedded Liveness Detection component of our security system ensures that only living entities, such as people and animals, are detected, enhancing reliability for real-time monitoring. Here’s how we built it, step by step, integrating it with our existing object detection framework.

Hardware Layer (Sensors & Processing)

The system relies on hardware to capture and process images for liveness detection.

Sensors

Raspberry Pi Camera (Picamera2): Captures video frames for real-time detection of living entities. It provides high-resolution images that feed into the processing pipeline.

    Processing Unit

    Raspberry Pi: Runs the core software, including OpenCV for image processing and the SSD MobileNet V3 model for object detection. It also handles liveness verification and email notifications.

      Software Layer (Liveness Detection Implementation)

      Liveness Detection is integrated into the object detection pipeline, which uses SSD MobileNet V3 to identify living objects like people, birds, cats, and dogs.

      Object Detection for Liveness

      How It Works: The SSD MobileNet V3 model detects objects with a confidence threshold of 0.7 and NMS threshold of 0.2, filtering for living entities (e.g., "person," "bird," "cat," "dog"). This ensures that only living objects trigger alerts, distinguishing them from static images or non-living objects.
      Purpose: Enhances security by focusing on living entities, critical for applications like surveillance or intrusion detection.

        Image Preprocessing

        How It Works: Images are preprocessed to handle noise from lighting variations or camera vibrations. Techniques like color space conversion (RGB to BGR) ensure compatibility with the detection model.
        Purpose: Ensures accurate detection of living objects, even in challenging environmental conditions.

          Alert Integration

          How It Works: When a living object is detected, the system generates an email alert with the object type (e.g., "person" or "dog"), timestamp, and compressed image filename, using the existing send_email_with_image function.
          Purpose: Provides real-time notifications for security monitoring, ensuring users are alerted only to living entities.

            Implementation Details

            Object Filtering: The system is configured to detect only living objects ("person", "bird", "cat", "dog") from the COCO dataset, ensuring liveness focus.
            Memory Management: Images are compressed before emailing and deleted afterward using existing functions to optimize storage.
            Real-Time Processing: Liveness detection operates within the main loop, with a 10-second cooldown to prevent redundant alerts for the same object.
            AutoSense Guardian
            Embedded Work
             Design of Our models