An open API service indexing awesome lists of open source software.

https://github.com/stipecmv/watchforge

WatchForge is a self-hosted, AI-powered video surveillance system built in Go. It detects people, animals, and insects in video feeds using YOLOv4-tiny and GoCV, with a native UI for mobile and desktop via Fyne.
https://github.com/stipecmv/watchforge

ai camerasystem fyne go movols opencv

Last synced: 2 months ago
JSON representation

WatchForge is a self-hosted, AI-powered video surveillance system built in Go. It detects people, animals, and insects in video feeds using YOLOv4-tiny and GoCV, with a native UI for mobile and desktop via Fyne.

Awesome Lists containing this project

README

          


WatchForge Logo

# WatchForge

WatchForge is a self-hosted video processing for NVR (Network Video Recorder) system to enhance pixel precision motion detection.

## Project Structure

```
watchforge/
├── WatchForge.slnx # Main .NET solution file
├── testapps/ # Test applications
│ └── nvr-client/ # DVRIP file downloader for Xiongmai/Sofia NVR
│ └── src/
│ ├── WatchForge.NVR.Client.TestApp/
│ └── WatchForge.NVR.Client.TestApp.Tests/
├── client/ # Frontend client application
├── db/
│ └── queries/ # Database schema and queries
└── server/ # Dotnet-based server components
└── MotionSentinel/ # Linux Worker Service — OpenCV motion detection
├── WatchForge.MotionSentinel.Server.Core/
├── WatchForge.MotionSentinel.Server.Core.Tests/
├── WatchForge.MotionSentinel.Server.Service/
└── WatchForge.MotionSentinel.Server.Service.Tests/
```

## ✨ Features

### MotionSentinel (.NET · Linux)
- 🎯 Farneback Dense Optical Flow — per-frame motion region detection using OpenCV
- 📁 Local filesystem — watches NVR recordings folder, writes JSON detection results
- ⚡ FileSystemWatcher + backfill — picks up files written while the service was down
- 🔌 Headless Worker Service — runs as a systemd unit, no UI required
- 🧪 test coverage via TUnit + Moq

See [server/MotionSentinel/README.md](server/MotionSentinel/README.md) for full docs.

### NVR Client (.NET · Linux)
- 📡 DVRIP protocol — native Xiongmai/Sofia TCP protocol (port 34567)
- 🔐 Sofia MD5 login, file listing, best-effort H.264 file download
- 🖥️ .NET 10, Linux (x64, arm64)
- 🧪 test coverage via TUnit + Moq
See [testapps/nvr-client/README.md](testapps/nvr-client/README.md) for full docs.

## 🛠️ Tech Stack

### .NET Components
- **Framework**: .NET 10
- **NVR protocol**: DVRIP (raw TCP, Xiongmai/Sofia firmware)
- **Motion detection**: OpenCV (Farneback optical flow) via OpenCvSharp4
- **Platform**: Linux (x64);
- **Testing**: TUnit + Moq with code coverage

## 👨‍💻 Getting Started

### Prerequisites

#### For .NET Components
- .NET 10 SDK
- Any .NET 10 runtime platform (Linux x64)

### Clone the Repository

```bash
git clone https://github.com/StipecMV/watchforge
cd watchforge
```

## �📝 License

WatchForge is an open-source project. See the [LICENSE](LICENSE) file for details.