This repository contains the source code for a project that analyzes indoor climbing videos using computer vision techniques. The project is designed to detect and track climbers as they ascend a climbing wall to output an analysis on the climber's beta. We provide a custom fine-tuned MaskRCNN model to detect climbing holds as well as the custom dataset used to train the model. The project leverages YOLOv7 for climber detection and pose estimation.
Clone the repository into your source directory:
git clone https://github.com/mcloses/smear-beta/
Clone the following implementation of the YOLOv7 paper into the same parent folder:
git clone https://github.com/WongKinYiu/yolov7
Configure the environment by installing the required packages:
cd smear-beta
conda create -n smear-beta python=3.9.7
conda activate smear-beta
pip install -r requirements.txt
Download the hold segmentation model from the latest release and place it in the models/instance_segmentation/detectron2/20230430
directory.
Download the latest YOLOv7 pose estimation weights from the YOLOv7 repository and place them in the models/pose_estimation/yolov7
directory.
To run the implementation a video with the following requirements is needed:
- The video must be recorded from a fixed position
- The video must contain only a single climber
- At least the first frame of the video must show all the holds belonging to the route
- The start and finishing frames must be provided manually
The video must be placed in the data/raw/vid/
directory. When run, the analysis pipeline will provide an interactive screen to select all the holds belonging to the route. An optional image of the route and climbing wall can be provided to assist in the selection process. If no image is provided, the first frame of the video will be used.
The video analysis pipeline is run using the main.ipynb
file.
The output of the analysis will be saved into data/output/runs/
.
You can find more details about the project and implementation in the thesis file.
If you would like to contribute to the project, please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with clear commit messages
- Push your changes to your fork
- Submit a pull request to the
dev
branch of the main repository
This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.