linrock / chessboard-recognizer Goto Github PK
View Code? Open in Web Editor NEWUses neural networks to extract chess positions from images
License: MIT License
Uses neural networks to extract chess positions from images
License: MIT License
Can't recognize FEN from the image:
./recognize.py in2.png
Tensorflow 2.1.0
Predicting chessboard in2.png
Traceback (most recent call last):
File "./recognize.py", line 139, in <module>
print(predict_chessboard(chessboard_image_path, args))
File "./recognize.py", line 91, in predict_chessboard
(fen_char, probability) = predict_tile(tile_img_data)
File "./recognize.py", line 115, in predict_tile
probabilities = list(model.predict(np.array([tile_img_data]))[0])
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 1013, in predict
use_multiprocessing=use_multiprocessing)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 498, in predict
workers=workers, use_multiprocessing=use_multiprocessing, **kwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 426, in _model_iteration
use_multiprocessing=use_multiprocessing)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 646, in _process_inputs
x, y, sample_weight=sample_weights)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 2383, in _standardize_user_data
batch_size=batch_size)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 2410, in _standardize_tensors
exception_prefix='input')
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_utils.py", line 582, in standardize_input_data
str(data_shape))
ValueError: Error when checking input: expected conv2d_input to have shape (32, 32, 3) but got array with shape (32, 32, 1)
Hello, the chessboards won't get recognized correctly or the tiles cannot be created, when I used screenshot. I checked the created tiles, the program detects chessboard wrong for example with the edges or asymmetrical. That's why It cannot recognize the chessboards from screenshots that I cut manually.
Maybe could you upgrade the program? ChessVisionBot from kochsebastian has a good chess recognition function, you can check it for an example.
Greetings
Ercan
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.