Skip to content

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.

License

Notifications You must be signed in to change notification settings

mkurc1/climbingcrux_model

Repository files navigation

Climbing Crux Model

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.

Generated climbing route preview

Generated climbing route preview

Climbing holds detection preview

Climbing holds detection preview

Starting position preview

Starting position preview

Setup

You can run the project locally or using Docker.

Local setup

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:

Install pyenv and Python 3.11

$ curl https://pyenv.run | bash
$ pyenv install 3.11.8

Turn on pyenv

$ pyenv shell 3.11.8

Install poetry and the required packages

$ python -m pip install poetry
$ poetry install

Turn on the virtual environment

$ poetry shell

Create env file by copying the example and update the model path

$ cp .env.dist .env
$ nano .env

Turn on the Jupyter Lab

$ jupyter-lab

Docker setup

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:

Create env file by copying the example and update the model path

$ cp .env.dist .env
$ nano .env

Build the Docker image

$ docker compose up -d --build

Swagger API documentation

$ http://localhost:8000/docs

Data

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.

Distance detection

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.

Distance detection preview

Metrics for object detection

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

Model

You can download the trained model from the link below.

Useful links

To do

  • 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

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages