elucidation / chessboardfentensorflowjs Goto Github PK
View Code? Open in Web Editor NEWFind chessboard FEN from a screenshot using TensorflowJs
Home Page: http://www.tetralark.com/ChessboardFenTensorflowJs/
License: MIT License
Find chessboard FEN from a screenshot using TensorflowJs
Home Page: http://www.tetralark.com/ChessboardFenTensorflowJs/
License: MIT License
Chess symbols exist in unicode, build a chessboard div and use them.
Something like
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜
♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙
♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
Right now images must be centered, well-aligned, and fill up most of the image to be detected.
Tensorflow Chessbot is able to handle non-centered boards that are smaller portions of the image.
From this picture, Black pawns recognizes as Bishop : https://timkr.home.xs4all.nl/tour/fork27.GIF
And Black rook sometimes recognize as queen :(
Complete page with diagrams : https://timkr.home.xs4all.nl/tour/forks.htm
Make mobile-friendly, etc.
Since this page is served over HTTPS, now the fen-to-image url gets auto-upgraded to HTTPS (which does not work as of Feb 2024)
HTTPS: https://www.fen-to-image.com/image/32/rn1qkb1r/p4ppb/1pp1pn1p/4N3/2BP2P1/1QN1P2P/PP3P2/R1B2RK1.png
HTTP: http://www.fen-to-image.com/image/32/rn1qkb1r/p4ppb/1pp1pn1p/4N3/2BP2P1/1QN1P2P/PP3P2/R1B2RK1.png
Mixed Content: The page at 'https://www.tetralark.com/ChessboardFenTensorflowJs/' was loaded over HTTPS, but requested an insecure element 'http://www.fen-to-image.com/image/32/rn1qkb1r/p4ppb/1pp1pn1p/4N3/2BP2P1/1QN1P2P/PP3P2/R1B2RK1.png'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
Replace this with something else.
I am trying to find the FEN of https://i.redd.it/jafm8w43mzk31.jpg
I used the Live Demo of FENbot, and it gave me the correct FEN. However, when I do:
$ ./tensorflow_chessbot.py --url https://i.redd.it/jafm8w43mzk31.jpg
I get the incorrect FEN. Why does this difference happen?
TF model takes time to load but user can upload an image via button before that.
Am working on a Chess teacher
Chesspieces are from https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces/Maurizio_Monge
With extra dropshadows showing defense/attack
This is the 1997 Kasparov vs Deep Blue rematch game #1 (Deep Blue resigned after G7, but won the 6 game match)
Beta version at: https://chessly.github.io/?fen=4r3/8/2p2PPk/1p6/pP2p1R1/P1B5/2P2K2/3r4
Input is:
Wrong output is:
HTH
Implement the ChessboardDetect algorithm to find boards from images.
Hello! This is such an excellent project idea!
In case it's helpful, here's an image that wasn't parsed correctly:
What it came up with: R1PKQP1R/2P1PP1P/P1NP1N2/1P1p2K1/b3p3/2n2n2/ppp2ppp/1kr1q2r
As you will see, it messed up the bishops on the 8th rank, and misidentified one of the black bishops as an extra white king
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.