Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Serin

This repository is a work in progress 🚧

Bike fit analysis with a single RGB camera, without expensive infrared cameras or sensor rigs.

Things you need:

  • A bike
  • An indoor trainer
  • An RGB camera that can capture video (at least 30fps)

Record a video of yourself riding a bike on an indoor trainer. The drive-side of the bike should face the camera, meaning the rider looks into the right side of the image.

Tips to get the best results:

  • Make sure the camera is parallel to the bike. Don't place the camera too low on the ground or too high. This will increase the projective distortion which leads to inaccurate analysis. In the best case, the camera is aligned with the bottom bracket of the bike and at knee height.
  • Use a tripod
  • Make sure the capture is in a well-lit area and on a flat background (a wall is perfect). Make sure there is no other person in the video or the analysis will be skewed.
  • 30 seconds is usually enough to get meaningful results.

Requirements

  • python3
  • python3-tk system package for the GUI backend. Install with sudo apt install python3-tk
  • pip to install application packages. Install with sudo apt install python3-pip

Installation

It is recommended to create a virtual environment and install the dependencies there to avoid any conflicts with system packages.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Usage

Once you recorded your video, you are ready to feed it into the analysis pipeline.

python entrypoint.py --video /path/to/video.mp4 --backend mediapipe   # or --backend rtmlib
  • --video path to the video file to analyze.

  • --backend defaults to mediapipe if omitted.

    • The mediapipe backend must be run from the repo root — it loads the MediaPipe model via the relative path ./pose_landmarker.task.
    • The rtmlib backend has no such constraint: it auto-downloads and caches its ONNX weights (to ~/.cache/rtmlib) on first use, which requires internet access the first time it runs.

Press q in the video preview window to stop processing early; otherwise the loop runs until the video ends. Either way, the joint-angle plot window stays open afterward for inspection until you close it.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages