Skip to content

About

A smart video management system built with C# and WPF. It uses YOLOv8 to monitor IP cameras and detect fire or smoke in real time.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

🔥 PyroSentry AI - Autonomous Video Management System

.NET 9.0 C# WPF YOLOv8 EF Core 9

PyroSentry AI is an autonomous, AI-driven video analysis and management software that captures RTSP (Real-Time Streaming Protocol) streams via IP cameras. By processing concurrent video frames in the background, the system detects fire and smoke in real-time, significantly accelerating the decision-support processes of operators.

Main Operation Screen - Alarm Status

Built in accordance with modern software architecture principles, the project is a stable desktop solution featuring a Decoupled Architecture, centralized dependency management, and asynchronous data flows.


Architectural Infrastructure & System Components

  • Dependency Injection & Lifecycle Management: All data services, inference engines, media components, and view models are managed through a centralized Microsoft Extensions Dependency Injection container. Database operations are handled asynchronously via Entity Framework Core, and service lifetimes are highly optimized for efficient system resource utilization.
  • Hardware-Accelerated Inference: Through ONNX Runtime GPU library integration, YOLOv8 object detection operations are executed directly on the GPU with hardware acceleration. If compatible hardware is not found, the system automatically falls back to a multi-core CPU optimization mode.
  • Event-Driven Messaging Platform: To eliminate direct dependencies between view models and services, a reactive messaging infrastructure is implemented using the WeakReferenceMessenger from the CommunityToolkit.Mvvm library. Alarm states, dynamic hardware changes, and configuration updates are broadcasted seamlessly through this channel.
  • Multithreaded Frame Analysis: Regardless of the resolution of live video streams, analysis processes are executed asynchronously on background threads based on user-defined frame rates (FPS). This robust threading ensures the main user interface never freezes or encounters bottlenecks.

User Interface & Workflow

The system allows operators to manage all operational processes through dynamic sub-panels within a single main window, strictly adhering to the MVVM (Model-View-ViewModel) design pattern.

1. Authentication Panel

To ensure data security and operational authorization, the system welcomes users with an encrypted login interface.

Login Screen

2. Live Monitoring & Autonomous Threat Analysis

The main control center where live streams from all active IP cameras are monitored simultaneously. The system analyzes the stream from each camera instantly on independent threads. Upon detecting a threat, it autonomously switches to an alarm state; the system directs the operator straight to the relevant camera, presenting coordinate-based detection data with visual warning borders and dynamic status indicators.

Main Monitoring Screen - Routine

3. Configuration & Camera Management

The panel where the confidence threshold and analysis speed (FPS)—which directly affect the stability of AI analysis processes—are updated at runtime. Additionally, new RTSP cameras can be added to the system, or existing cameras can be dynamically toggled active/inactive.

Settings Screen


Dataset and Model Training

The YOLOv8 object detection model used in the system was trained with a custom dataset prepared specifically for the project's purpose. You can access the source dataset, which contains multi-scale fire and smoke images used for training the model, from the link below:

🔗 Kaggle Dataset: Multi-Scale Fire, Smoke and Flame Dataset


Installation & Configuration

Prerequisites

  • .NET 9.0 SDK
  • Visual Studio 2022
  • SQL Server
  • NVIDIA CUDA Toolkit (For hardware-accelerated analysis)

Steps

  1. Clone the Repository:
git clone https://github.com/Melihg0/PyroSentryAI-Fire-Smoke-Detector.git
cd PyroSentryAI-Fire-Smoke-Detector
  1. Configure the Database: Open the appsettings.json file in the root directory and update the Connection String according to your local SQL Server instance:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Server=YOUR_SERVER_NAME;Database=PyroSentryAI_DB;Trusted_Connection=True;TrustServerCertificate=True"
      }
    }

    Apply the database schema using the Package Manager Console (PMC) in Visual Studio:

    Update-Database
  2. Run the Application: To ensure maximum performance and stability during the AI analysis processes, it is highly recommended to build and run the project in the Release configuration.

About

A smart video management system built with C# and WPF. It uses YOLOv8 to monitor IP cameras and detect fire or smoke in real time.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages