Skip to content

SE4CPS/AniLarm-Offline-AI-for-Small-Animal-Detection-Under-Cars-Using-Thermal-Camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AniLarm: Offline AI for Small Animal Detection Under Cars Using Thermal Camera

Introduction

AniLarm is an innovative solution designed to detect small animals hiding under vehicles using thermal imaging and machine learning. The system leverages the power of the Seek Thermal Camera and the Raspberry Pi to provide accurate and reliable detection results. By integrating an offline GUI application and an online Flask-based web application, AniLarm offers flexibility and accessibility for various use cases, ensuring urban safety and animal welfare.


Features

Offline Application

  • Runs entirely on the Raspberry Pi without requiring internet connectivity.
  • GUI-based interface for real-time detection results.
  • Provides auditory alerts using a Bluetooth speaker.
  • Ensures secure data handling with AES-256 encryption for thermal images.

Online Flask Application

  • Web-based interface accessible via a browser on the same local network.
  • Allows users to trigger image capture and view detection results.
  • Supports multiple image processing in a single session.

Setup

For Offline Application (finap.py)

  1. Prerequisites:

    • Raspberry Pi 4 Model B with Raspbian OS installed.
    • Seek Thermal Camera.
    • Python 3.11 or later.
    • Install required dependencies:
      pip install tensorflow pycryptodome opencv-python pillow espeak
  2. Steps:

    • Clone the repository:
      git clone https://github.com/SE4CPS/AniLarm-Offline-AI-for-Small-Animal-Detection-Under-Cars-Using-Thermal-Camera.git
      cd AniLarm-Offline-AI-for-Small-Animal-Detection-Under-Cars-Using-Thermal-Camera/offline
    • Run the application:
      python3 finap.py

For Online Flask Application (web_trigger.py and detect.py)

  1. Prerequisites:

    • Flask installed on the Raspberry Pi:
      pip install flask tensorflow opencv-python pillow
  2. Steps:

    • Navigate to the online directory:
      cd AniLarm-Offline-AI-for-Small-Animal-Detection-Under-Cars-Using-Thermal-Camera/online
    • Start the Flask server:
      python3 web_trigger.py
    • Access the web interface from any device on the same network:
      http://<raspberry_pi_ip>:5000
      

How It Works

  1. Capture Images:

    • The Seek Thermal Camera captures thermal images of the area under a vehicle.
  2. Image Encryption (Offline Application):

    • Images are encrypted using AES-256 for secure storage and decrypted only during inference.
  3. Model Inference:

    • The EfficientNet model processes images to classify them as containing an animal or not.
  4. Result Display:

    • Offline: Results are displayed on the GUI and announced via a Bluetooth speaker.
    • Online: Results are displayed on the web interface with processed images.

Architecture Diagram(workflow)

Architecture Diagram


Technologies Used

  • Python: Core programming language for the application.
  • TensorFlow: Deep learning framework used for EfficientNet model inference.
  • AES Encryption: Ensures secure storage and processing of thermal images.
  • Flask: Web framework for the online application.
  • Raspberry Pi: Hardware platform for deployment.
  • Seek Thermal Camera: Captures thermal images for animal detection.

Future Enhancements

  • Improved Dataset: Add more diversity to the dataset for better generalization.
  • Automated Updates: Incorporate cryptographic hash verification for firmware updates.
  • Extended Applications: Adapt the system for wildlife monitoring and industrial safety.

For more details, refer to the Documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages