Instructions to use honi05/ChessBoardDetector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use honi05/ChessBoardDetector with ultralytics:
from ultralytics import YOLOvv11 model = YOLOvv11.from_pretrained("honi05/ChessBoardDetector") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- computer-vision
|
| 5 |
+
- object-detection
|
| 6 |
+
- chess
|
| 7 |
+
- yolov11
|
| 8 |
+
- ultralytics
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# ChessBoardDetector
|
| 12 |
+
|
| 13 |
+
Two-model YOLOv11 pipeline that converts a chessboard photograph into a FEN string.
|
| 14 |
+
|
| 15 |
+
## Models
|
| 16 |
+
|
| 17 |
+
| File | Architecture | Task |
|
| 18 |
+
|------|-------------|------|
|
| 19 |
+
| `board_detector.pt` | YOLOv11n | Locate the chessboard bounding box |
|
| 20 |
+
| `piece_detector.pt` | YOLOv11s | Identify all 12 piece types on a 512×512 rectified board |
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from src.pipeline import run_pipeline
|
| 26 |
+
import cv2
|
| 27 |
+
|
| 28 |
+
image = cv2.imread("photo.jpg")
|
| 29 |
+
fen, annotated = run_pipeline(
|
| 30 |
+
image,
|
| 31 |
+
board_model_path="board_detector.pt",
|
| 32 |
+
piece_model_path="piece_detector.pt",
|
| 33 |
+
)
|
| 34 |
+
print(fen)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Source
|
| 38 |
+
|
| 39 |
+
[GitHub — honi05/ChessBoardDetector](https://github.com/Honi05/ChessBoardDetector)
|