opendatacam

Development notes

Run in simulation mode

Simulation mode is useful to work on the UI and node.js feature deployment without having to run the neural network / the webcam.

Dependency: Mongodb installed (optional, only to record data) : see tutorial

# Clone repo
git clone https://github.com/opendatacam/opendatacam.git

or

git@github.com:opendatacam/opendatacam.git
# Install dependencies
npm i
# Run in dev mode
npm run dev
# Open browser on http://localhost:8080/

If you have an error while doing npm install it is probably a problem with node-gyp, you need to install additional dependencies depending on your platform: https://github.com/nodejs/node-gyp#on-unix

Simulation Mode

The new simulation mode allows to feed YOLO JSON detections into OpenDataCam. As for the video either pre-extracted frames or a video file where the frames will be extracted using ffmpeg.

The simulation can be customized in the OpenDataCam config by adding it as a new video source.

"VIDEO_INPUTS_PARAMS": {
  "simulation": "--yolo_json public/static/placeholder/alexeydetections30FPS.json --video_file_or_folder public/static/placeholder/frames --isLive true --jsonFps 20 --mjpgFps 0.2"
}

Whereas

The simulation JSON and MJPG streams can also be started without Opendatacam by invoking node scripts/YoloSimulation.js from the repository root folder.

Release checklist

Tags commands

# Tag latest commit
git tag v3.0.1

# Push tag
git push origin v3.0.1

# List tags
git tag --list

# Remove tag on remote
git push origin :v3.0.1

# Delete local tag
git tag --delete v3.0.1

# Push all tag
git push --tags

Markdown table of content generator

https://ecotrust-canada.github.io/markdown-toc/

List all cams

v4l2-ctl --list-devices

Technical architecture

Technical architecture

Code Style

Opendatacam uses the https://github.com/airbnb/javascript style. You can run npm run lint to check the whole code base. Or npx eslint yourfile.js to check only a single file.