# On Premise IP Camera analysis

This document outlines the architecture for applications that use local IP camera input, process frames on-premises, and send selected data to the cloud for inference and alerting. This design is optimized for reliability, user control, and extensibility in real-world deployments.

<figure><img src="https://1956543008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2tRktyRCGgE1tPlAfT4h%2Fuploads%2FdW6KysfLuQtPnIUCPvk4%2FScreenshot%202025-06-18%20at%2010.17.43%E2%80%AFAM.png?alt=media&#x26;token=3949b9c0-78d4-4903-8dfd-278feddbb965" alt=""><figcaption></figcaption></figure>

### System Components

#### 1. IP Camera

* **Role**: Provides a real-time video feed.
* **Protocol Support**: RTSP or HTTP streams.
* **Deployment Note**: Can be any standard IP camera compatible with the network environment.

#### 2. \[On-Prem] App

A lightweight local application deployed on a local machine (e.g., embedded PC, NUC, or industrial gateway) with three primary modules:

**a. App Core**

* Manages communication between all subsystems.
* Handles application lifecycle, settings, and local network services.
* Serves as the bridge to cloud and notification layers.

**b. Frame Capture & Sampling Logic**

* Connects to the IP camera stream.
* Extracts frames at regular intervals or based on motion/logic triggers.
* Prepares images for secure transmission to the cloud.

**c. Local Dashboard**

* Web- or Electron-based UI accessible on the local network.
* Displays real-time camera feed (optionally), recent detections, logs, and configuration tools.
* Allows for manual review and flagging of archived images.

#### 3. \[Cloud] Inference via EyePop.ai API

* **Role**: Processes each sampled image using a selected EyePop.ai model.
* **Security**: Images are never stored server-side—processing is stateless.
* **Response**: Returns structured JSON with inference results (e.g., bounding boxes, classifications, tags).

#### 4. \[Cloud] Notification Service

* **Integration Options**: Twilio (SMS), SendGrid (email), Slack, Webhooks, or any third-party service.
* **Trigger**: Upon receiving actionable inference results (e.g., person detected after hours), the app sends alert payloads to cloud notification services.

#### 5. \[Optional] Local Image Archive

* Stores selected images locally for:
  * Regulatory compliance or auditing
  * Dataset refinement and future model training
  * Manual review by operators
* Integrated with the Local Dashboard for search, tagging, and export.

***

### Data Flow Summary

1. **Capture**: The IP camera sends a continuous stream to the local app.
2. **Sampling**: The app extracts and filters frames using internal logic.
3. **Inference**: Sampled frames are sent to EyePop.ai for analysis.
4. **Result Handling**: Inference results are used to trigger alerts and log events.
5. **User Interaction**: A dashboard provides visibility, settings control, and image review.
6. **Archiving**: Optionally, images are stored locally based on rules or user actions.

***

### Benefits

* **Low Latency Local Interface**: Dashboard and logic run on-site.
* **Cloud Offload**: Heavy inference is handled remotely with zero storage overhead.
* **Flexible Notification**: Pluggable alerting channels tailored to use case.
* **Audit Ready**: Image archive supports regulated environments or continuous learning loops.
