desk-guard-public

🛡️ Computer Security Monitoring System

Real-time computer security monitoring system using GLM-4V vision AI with Gradio web interface. Features live camera monitoring, distance-based threat assessment, and Discord notifications.

✨ Key Features

🔍 How It Works

Distance-Based Security Model

The system establishes a security baseline using a reference image:

  1. Reference Image: Shows normal, safe computer use distance and positioning
  2. Current Monitoring: Live camera feed analyzed for security threats
  3. Distance Comparison: AI compares current distance to reference baseline
  4. Threat Assessment: Proximity and behavior determine threat level

Smart Image Processing

🚨 Enhanced Security Conditions

🔴 HIGH THREAT (70-100%)

🟡 MODERATE THREAT (30-69%)

🟢 LOW THREAT (0-29%)

🔔 Discord Integration

Setup Instructions

  1. Go to your Discord server
  2. Right-click the channel for alerts → “Edit Channel” → “Integrations”
  3. Click “Create Webhook” and copy the webhook URL
  4. Paste URL into the application’s Discord settings
  5. High threats (70%+) automatically send alerts with images

Alert Format

🚨 HIGH SECURITY ALERT - Threat Level: 85%

[Embedded Message]
🚨 COMPUTER SECURITY ALERT
Threat Level: 85%
Status: 🚨 HIGH ALERT  
Time: 2024-01-15 14:30:25

[Attached Image: security_alert.png]

📋 Prerequisites

🔧 Installation

  1. Install uv: ```bash

    On macOS and Linux

    curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows

powershell -c “irm https://astral.sh/uv/install.ps1 | iex”


2. **Clone and run the project:**
```bash
# Install dependencies and run the application
uv run app.py
  1. Alternative: Install dependencies first:
    uv sync
    uv run app.py
    

🚀 Usage

uv run app.py

Then open your browser to: http://127.0.0.1:7860

🖥️ GUI Interface Guide

1. Configuration Panel

2. Camera & Reference Setup

3. Security Monitoring

⚡ Performance Optimizations

Speed Enhancements

Example Fast Response

THREAT LEVEL: 85%
STATUS: 🚨 HIGH ALERT

🎯 Monitoring Configuration

GLM-4V API Limits

📸 Camera Requirements

🔒 Security & Privacy

Data Handling

Network Requirements

🛠️ Technical Architecture

Components

File Structure

desk-guard-public/
├── app.py              # Main application with web GUI
├── pyproject.toml      # Project dependencies
└── README.md           # This documentation

📊 Example Threat Scenarios

Scenario 1: Normal Use ✅

Scenario 2: Approaching Threat ⚠️

Scenario 3: High Alert 🚨

Scenario 4: Camera Issue 🚨

⚠️ Troubleshooting

Common Issues

🔸 “API client not initialized”

🔸 “Owner reference image not captured”

🔸 Discord alerts not working

🔸 Camera feed not showing

🔸 Colors inverted in Discord images

Performance Issues

📚 API References

🤝 Contributing

Feel free to submit issues, feature requests, or pull requests to improve the system.

📄 License

Apache 2.0 License - See LICENSE file for details.