Vision module for the OpenMMLA platform.
Project description
OpenMMLA Vision
Video module of the mBox multimodal learning analytic system. For more details, please refer to mbox System design.
Uber Server Setup
Before setting up the video base, you need to set up a server hosting the InfluxDB, Redis, Mosquitto, and Nginx services. Please refer to mbox-uber module.
Video Base & Server Setup
Downloading and Setting up the mbox-video analysis system is accomplished in two steps:
(1) Clone the repository from GitHub to your local home directory.
(2) Install the required dependencies.
-
Clone the repository from GitHub
git clone https://github.com/ucph-ccs/mbox-video.git
-
Install the required dependencies with conda environment
-
Conda
# For Raspberry Pi wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" bash Miniforge3-$(uname)-$(uname -m).sh # For Mac and Linux wget "https://repo.anaconda.com/miniconda/Miniconda3-latest-$(uname)-$(uname -m).sh" bash Miniconda3-latest-$(uname)-$(uname -m).sh
-
Video Base
# For video base conda create -c conda-forge -n video-base python=3.10.12 -y conda activate video-base cd mbox-video pip install openmmla-vision
-
Usage
After setting up the uber server and installation of dependencies, you can run the real-time video analysis by following the instructions:
-
Stream video from your camera(s) to the server (e.g., Raspberry Pi, MacBook, etc.)
If you have multiple cameras and each wired to one machine, you can either run the video streaming on each machine or stream all cameras to a centralized RTMP server by following the guidelines in raspi_rtmp_streaming.md. -
Calibrate camera's intrinsic parameters
- Go to ./camera_calib/pattern, print out the chessboard image and stick it on a flat surface.
- Capture the chessboard image with your camera and calibrate the camera by running
./calib_camera.sh
bash script.
-
Synchronize multi-cameras' coordinate systems
If more than one camera is to be used at the same time, you need to calculate the transformation matrix between the main and the alternative camera. The transformation matrix is used to convert the alternative camera's coordinate system to the main camera's coordinate system.
- Centralized mode
If your cameras are streaming to a centralized RTMP server or serially wired to a single machine, then run# :param -d the number of cameras needed to sync, default to 2. # :param -s the number of camera sync manager, default to 1. # e.g. ./sync_camera.sh -d 2 -s 1
- Distributed Mode
If your cameras are not streamed to a centralized RTMP server and serially wired to a single machine, run camera detector on each your camera hosting machine, and camera sync manager on your synchronizing machine.# on camera hosting machine, e.g. Raspberry Pi ./sync_camera.sh -d 1 -s 0 # on synchronizing machine, e.g. MacBook ./sync_camera.sh -d 0 -s 1
- Centralized mode
-
Run real-time video analysis system
- Centralized mode
If your cameras are streaming to a centralized RTMP server or serially wired to a single machine, then run# :param -b the number of video base needed to run, default to 1. # :param -s the number of video base synchronizer needed to run, default to 1. # :param -v the number of visualizer need to run, default to 1. # :param -g whether to display the graphic window, default to true. # :param -r whether to record the video frames in image for clip baking, default to false. # :param -v whether to store the real time visualizations with visualizer, default to false. # e.g. ./run.sh
- Distributed Mode
If your cameras are not streamed to a centralized RTMP server and serially wired to a single machine, run video base on each camera hosting machine and run the synchronizer and visualizer on your synchronizing machine.# on camera hosting machine, e.g. Raspberry Pi ./run.sh -b 1 -s 0 -v 0 -g false # on synchronizing machine, e.g. MacBook ./run.sh -b 0 -s 1 -v 1
- Centralized mode
FAQ
Citation
If you use this code in your research, please cite the following paper:
@inproceedings{inproceedings,
author = {Li, Zaibei and Jensen, Martin and Nolte, Alexander and Spikol, Daniel},
year = {2024},
month = {03},
pages = {785-791},
title = {Field report for Platform mBox: Designing an Open MMLA Platform},
doi = {10.1145/3636555.3636872}
}
References
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openmmla-vision-0.1.0.tar.gz
.
File metadata
- Download URL: openmmla-vision-0.1.0.tar.gz
- Upload date:
- Size: 32.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5802d6608067d90bde8e240948490ef6cb04291a3f9ba09ef74d9ff663b5ee0a |
|
MD5 | 8d505cd93bf164fe4e75b396a276da13 |
|
BLAKE2b-256 | 521117791d2866b1649abb1a47f16913de8c75a87d60af3b4cc4f0825002658a |
File details
Details for the file openmmla_vision-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: openmmla_vision-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d3d8bf95ecf02c8dde53f173a548911690f8401706b7fefcd1b6820c0181d94 |
|
MD5 | c1e41500ebd6f8b58eb7082cca812f00 |
|
BLAKE2b-256 | b081b505b2ea0d0dab06ec7a9985da7d1291873c6678f784b2d39469c426771e |