Skip to content

Issue: Low FPS when running OpenCV inference through WebSockets in Electron #7

@johnraivenolazo

Description

@johnraivenolazo

What I tried

Initially, I sent the OpenCV camera frames and inference results from Python → FastAPI → Electron using WebSockets.

Problem

The FPS dropped massively (video feed was barely moving).

The stream had noticeable lag/delay, making real-time inference unusable.

It seems WebSockets added too much overhead for continuous high-frame-rate video data.

Logs and small data still work fine through WebSockets, but video frames choke the pipeline.

Decision / Workaround

To fix this, I’m switching the real-time OpenCV inference to run directly via a child_process (Electron spawning Python).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions