--- library_name: ultralytics pipeline_tag: object-detection tags: - yolo11 - pytorch - object-detection - keypoint-detection - chess - computer-vision license: agpl-3.0 language: - en base_model: - Ultralytics/YOLO11 metrics: - mAP datasets: - surawut/chessboard-dataset-yolo - surawut/chess-pieces-dataset-yolo --- # Chess Move Tracking Models (YOLO11) This repository contains fine-tuned models for a Chess Move Tracking pipeline. ## Models 1. **`models/yolo11s_pose_chessboard.pt`**: * **Architecture:** YOLO11s-pose * **Task:** Keypoint Detection (Chessboard Corner Localization). * **Classes:** 1 class (`chessboard`). * **Keypoints:** `a1`, `h1`, `a8`, `h8`. * **Input:** Raw video frame (rotated/occluded). 3. **`models/yolo11m_pieces.pt`**: * **Architecture:** YOLO11m * **Task:** Object Detection (Chess Pieces Detection). * **Classes:** 13 classes (`Hand`, `bB`, `bK`, `bN`, `bP`, `bQ`, `bR`, `wB`, `wK`, `wN`, `wP`, `wQ`, `wR`). * **Input:** Warped top-down chessboard image (640x640). ## Usage You can use these models directly with the [Ultralytics](https://github.com/ultralytics/ultralytics) library. ### 1. Installation First, install the required library: ```bash pip install -U ultralytics ``` ### 2. Using the Chessboard Corner Localization Model This model detects the 4 semantic corners of the chessboard (a1, h1, a8, h8) to help with perspective warping. ```python from ultralytics import YOLO # Load the model directly from Hugging Face model = YOLO("https://huggingface.co/surawut/chess-move-tracking-yolo11/resolve/main/models/yolo11s_pose_chessboard.pt") # Load an image (raw frame) image_path = "path/to/raw_frame.jpg" # Run inference results = model(image_path) ``` ### 3. Using the Chess Pieces Detection Model This model detects the 12 chess pieces + hand on a warped (640x640) top-down view of the board. ```python from ultralytics import YOLO # Load the model directly from Hugging Face model = YOLO("https://huggingface.co/surawut/chess-move-tracking-yolo11/resolve/main/models/yolo11m_pieces.pt") # Load a chessboard image warped_image_path = "path/to/warped_board.jpg" # Run inference results = model(warped_image_path)