metterklume / chessputzer Goto Github PK
View Code? Open in Web Editor NEWImage recognition for chess positions
Image recognition for chess positions
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/home/cesar/Chess/chessputzer/putzmain.py", line 11, in
import cv2
ModuleNotFoundError: No module named 'cv2'
I tried to use Chessputzer on the command line, but I got an error:
d:\chessputzer-master>putzmain.py -f board09.png
Traceback (most recent call last):
File "D:\chessputzer-master\putzmain.py", line 238, in
bd = Board(fname)
File "D:\chessputzer-master\putzmain.py", line 34, in init
self.squares = splitboardcontour(self.ima)
File "D:\chessputzer-master\putzlib.py", line 180, in splitboardcontour
bounds = contourbox(ima)
File "D:\chessputzer-master\putzlib.py", line 199, in contourbox
,contours, = cv2.findContours(ee, 1, 2)
ValueError: not enough values to unpack (expected 3, got 2)
When reading a diagram, especially for puzzle ones, one should always assume that castling is possible. I think the FEN should include the castling rights when possible.
The web interface fails to recognise a chess.com board screenshot at all which is surprising to me as I'd assume 99% of images submitted would be from chess.com or lichess.
Image submitted: https://i.imgur.com/1E5mePp.png
Web page result: https://i.imgur.com/v5UwV1u.png
Lichess board: https://i.imgur.com/WV1oNzD.png
The above image is processed as
https://lichess.org/editor/1K3BNR/PPPQ2PP/5P2/3q4/p3r3/5n2/1p3ppp/r1b3k1_w_HAha_-_0_1?color=white
Pieces are correctly placed but the board should be from 1-8 not 8-1(board flip issue)
In the file commandlinenn.md
there's file putznn.py
mentioned briefly.
I wonder, if you could put this file somewhere in the repository, please?
Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
File "<frozen runpy>", line 112, in _get_module_details
File "/home/user/programming/chess/putzmain.py", line 216, in <module>
alltemps = np.load('pbarrs.npz').items()[0][1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'ItemsView' object is not subscriptable
This error occurs simply when trying to run the script normally like so:
python3 -m putzmain.py -f board.png -o out.txt
while running putzmain.py, there is an error:
Traceback (most recent call last):
File "C:\Users\Owner\Desktop\putzmain.py", line 215, in
alltemps = np.load('pbarrs.npz').items()[0][1]
TypeError: 'ItemsView' object is not subscriptable
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.