This project converts a chessboard photo into a FEN (Forsyth–Edwards Notation) string using a CNN tile classifier.
Photo → Board Crop → Tile Extraction → CNN Classifier → FEN Generation
- inference/ → Run prediction on a board image
- training/ → Train CNN tile classifier
- pipeline/ → Full automation pipeline
- scripts/ → Image preprocessing utilities
- models/ → Trained model + class indices
python inference/run_full_board.pyThe project uses a CNN classifier trained on chessboard tile images.
Classes predicted:
- wP, wR, wN, wB, wQ, wK
- bP, bR, bN, bB, bQ, bK
- empty
The system reconstructs the board and produces a FEN string describing the full chess position.
Example output:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
- Improve board detection robustness
- Support different board orientations
- Integrate with chess engines for move suggestions