The climbing crux model is a machine-learning project that aims to recognize climbing holds and the distance between them from a photo and suggest routes that fit the user's climbing level.
The model recognizes climbing holds and volumes from a photo using the YOLOv9 object detection algorithm. The model is trained on a custom dataset containing photos of climbing walls and annotations in the YOLO format.
You can generate climbing routes through the FastAPI.
You can run the project locally or using Docker.
To run the project, you need to have Python 3.11 and the required packages installed. You can install the required packages using the following command:
$ curl https://pyenv.run | bash
$ pyenv install 3.11.8
$ pyenv shell 3.11.8
$ python -m pip install poetry
$ poetry install
$ poetry shell
$ cp .env.dist .env
$ nano .env
$ jupyter-lab
To run the project using Docker, you need to have Docker installed. You can build the Docker image and run the container using the following commands:
$ cp .env.dist .env
$ nano .env
$ docker compose up -d --build
$ http://localhost:8000/docs
To achieve the goal of this project, I will use photos from a private collection of climbing walls. You can download the dataset from the link below. It also contains photos and the annotations in the YOLO format.
The distance between climbing holds is calculated using the distance between the centers of the bounding boxes of the detected climbing holds. The distance is calculated in pixels and then converted to centimeters using the reference to aruco marker.
The model is evaluated using the following metrics:
mAP (mean Average Precision) - the average of the precision-recall curves at different IoU thresholds.
- map50-95 - 0.8216387037838236
- map50 - 0.9298378191260248
- map75 - 0.8925210764855455
You can download the trained model from the link below.
- Train Yolov8 object detection on a custom dataset
- Object Detection with YOLO v8 on Mac M1
- Online Annotation Platform
- Train the YOLOv9 object detection model
- detect climbing holds and volumes from a photo
- Calculate the distance between climbing holds
- Generate climbing routes
- Generate climbing routes using the Jupyter Notebook
- Generate climbing routes using the FastAPI
- Improve ground detection
- Generate climbing routes on different wall angles
This project is licensed under the MIT License - see the LICENSE file for details.