Skip to content

Real-time Object Detection

Published:

Table of contents

Open Table of contents

Description

This project demonstrates a real-time object detection system using a C++ WebSocket server with YOLO model for object detection, and a React client with Webcam integration for capturing and sending video frames. The server uses OpenCV to process frames and the YOLO model for detecting objects in the video stream.
Source code can be found here.

Running Locally

Prerequisites

Steps

  1. Clone the repository

    git clone https://github.com/martishin/react-cpp-object-detection
    cd react-cpp-object-detection
  2. Install and configure vcpkg
    Navigate to the server folder and install vcpkg

     cd server
     git clone https://github.com/microsoft/vcpkg.git
     cd vcpkg
     ./bootstrap-vcpkg.sh
     cd ..
     export VCPKG_ROOT=$(pwd)/vcpkg
  3. Install server dependencies

     vcpkg install
  4. Build and run the WebSocket server (C++)

    make run-server
  5. Running the React client
    Navigate to the client folder and install dependencies:

    cd ../client
    npm install
    npm run dev

    The client will be running at http://localhost:5173/.

Technologies Used