Giter Club home page Giter Club logo

chessvisionbot's Introduction

ChessVisionBot

The ChessVisionBot uses computer vision to detect a 2D chessboard on the screen. It detects played moves by the opponent and calculates the best response given a certain time to calculate. The ChessVisionBot is then able to move the mouse and execute the calculated move.
Thanks to the Stockfish-Engine it is able to play at a very high rating with quick movetimes.
Do not use this chessbot to play against a real human!

Playing Chess

ChessVisionBot vs Victoria on Chess24
(3 minute time control, ~1700 rating)
ChessVisionBot vs. Chess.com Computer Level 10
(unlimited time, ~2600 rating)
Computer Vision based Chess-Bot wins against Victoria on Chess24 Computer Vision based Chess-Bot wins against Chess.com Computer Level 10 (~2600 rating)
https://www.youtube.com/watch?v=z9LSJM55Tng https://www.youtube.com/watch?v=1aTEesXdODc

Solving Tactics

ChessVisionBot solves unknown Tactics on Chess.com
Computer Vision based Chess-Bot solves 25 random Chess-Tactics in a row
https://youtu.be/L6hSxr5kzo4

How to set-up and use

I won't publish a how to install instructions because I want to prevent non programmers to just use this project to cheat on chess websites. My intend with that project is combine computer vision and machine learning with chess and to learn something about every of these aspects.
For a programmer who has the same intentions installation and setting up the environment isn't that hard even though I provide no instructions. The project is only tested on a Mac environment so there may be some compablility problems but I guess nothing impossible to fix.
Feel free to edit the code as you like. If you want to contribute your changes I happily await your Pull Request.

Notice

Tensorflow has moved on from Tensorflow 1.0 and has exciting new functionalities with Tensorflow 2.0. Unfortunately, the current Tensorflow code is not compatible with Tensorflow 2.0 and unfortunately I lack the time to convert the code to the current Tensorflow syntax. I'm looking forward to a Pull Request from the community to update the old Tensorflow code, maybe even migrate the code to PyTorch.

chessvisionbot's People

Contributors

kochsebastian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chessvisionbot's Issues

Windows Stockfish load error

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args)
File "C:/Users/LiveL/Desktop/ChessVisionBot-master/code/main.py", line 56, in start_playing
game_state = Game_state()
File "C:\Users\LiveL\Desktop\ChessVisionBot-master\code\game_state_classes.py", line 47, in init
self.engine = chess.engine.SimpleEngine.popen_uci("engine/stockfish-11-64")
File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 2440, in popen_uci
return cls.popen(UciProtocol, command, timeout=timeout, debug=debug, setpgrp=setpgrp, **popen_args)
File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 2432, in popen return run_in_background(background, name=f"{cls.__name__} (command={command!r})", debug=debug) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 217, in run_in_background return future.result() File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\concurrent\futures\_base.py", line 435, in result return self.__get_result() File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 211, in background _run(coroutine(future)) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 43, in run return loop.run_until_complete(main) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 587, in run_until_complete return future.result() File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 2420, in background transport, protocol = await Protocol.popen(command, setpgrp=setpgrp, **popen_args) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\site-packages\chess\engine.py", line 912, in popen return await _get_running_loop().subprocess_exec(cls, *command, **popen_args) # type: ignore File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 1544, in subprocess_exec bufsize, **kwargs) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_events.py", line 372, in _make_subprocess_transport **kwargs) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\base_subprocess.py", line 37, in __init__ stderr=stderr, bufsize=bufsize, **kwargs) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_events.py", line 819, in _start bufsize=bufsize, **kwargs) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_utils.py", line 155, in __init__ stderr=stderr_wfd, **kwds) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 800, in __init__ restore_signals, start_new_session) File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1207, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

Failing to identify chess boards

Hi Sebastian,

I want to start by saying that I really am enjoying working with this project!

I've managed to get the program to run on Win64, but it is really struggling to find chessboards. With mss 4.0.3 I get an error:

Exception in Tkinter callback
Traceback (most recent call last):
File "F:\ProgramData\Anaconda3\lib\tkinter_init_.py", line 1705, in call
return self.func(*args)
File "F:\ChessVisionBot\code\main.py", line 77, in start_playing
resized_chessboard = chessboard_detection.get_chessboard(game_state)
File "F:\ChessVisionBot\code\chessboard_detection.py", line 113, in get_chessboard
img = np.array(sct.grab(monitor))
File "F:\ProgramData\Anaconda3\Lib\site-packages\mss\base.py", line 88, in grab
return self._grab_impl(monitor)
File "F:\ProgramData\Anaconda3\Lib\site-packages\mss\windows.py", line 262, in _grab_impl
self._bmi.bmiHeader.biWidth = width
TypeError: int expected instead of float

I tried forcing x1, x2, y1, y2 to be int, but that causes the system to find invalid chessboards:

resized_chessboard

which then lead to bad FEN strings and cause the chess engine to crash.

I would really appreciate any help you can offer here! I'm hoping it might be something simple like a missing package, but I'm not sure where to look at this point.

Thank you.

ValueError: not enough values to unpack (expected 3, got 2)

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\LiveL\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args) File "C:/Users/LiveL/Desktop/ChessVisionBot-master/code/main.py", line 59, in start_playing found_chessboard, position = chessboard_detection.find_chessboard() File "C:\Users\LiveL\Desktop\ChessVisionBot-master\code\chessboard_detection.py", line 72, in find_chessboard is_found, current_chessboard_image,minX,minY,maxX,maxY,test_image = find_chessboard_from_image(img) File "C:\Users\LiveL\Desktop\ChessVisionBot-master\code\chessboard_detection.py", line 109, in find_chessboard_from_image bin, contours, _hierarchy = cv2.findContours(bin, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) ValueError: not enough values to unpack (expected 3, got 2)

Loading file issue

I am trying to run the python code but as it is shown up and clicked on start playing is showing this error:
pic

WARNING:TensorFlow: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Anaconda3\lib\tkinter_init_.py", line 1705, in call
return self.func(*args)
File "", line 55, in start_playing
game_state = Game_state()
File "C:\Users\rayan gostar\Desktop\ChessVisionBot-master\code\game_state_classes.py", line 47, in init
self.engine = chess.engine.SimpleEngine.popen_uci("./engine/stockfish-11-64")
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2452, in popen_uci
return cls.popen(UciProtocol, command, timeout=timeout, debug=debug, setpgrp=setpgrp, **popen_args)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2444, in popen
return run_in_background(background, name=f"{cls.name} (command={command!r})", debug=debug)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 217, in run_in_background
return future.result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 432, in result
return self.__get_result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 384, in __get_result
raise self._exception
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 211, in background
_run(coroutine(future))
File "C:\Anaconda3\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\Anaconda3\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2432, in background
transport, protocol = await Protocol.popen(command, setpgrp=setpgrp, **popen_args)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 912, in popen
return await _get_running_loop().subprocess_exec(cls, *command, **popen_args) # type: ignore
File "C:\Anaconda3\lib\asyncio\base_events.py", line 1533, in subprocess_exec
bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_events.py", line 372, in _make_subprocess_transport
**kwargs)
File "C:\Anaconda3\lib\asyncio\base_subprocess.py", line 37, in init
stderr=stderr, bufsize=bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_events.py", line 819, in _start
bufsize=bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_utils.py", line 155, in init
stderr=stderr_wfd, **kwds)
File "C:\Anaconda3\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

UPDATE:

after running these two lines I got this output.

import chess.engine
chess.engine.SimpleEngine.popen_uci("./engine/stockfish-11-64")

Traceback (most recent call last):
File "", line 1, in
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2452, in popen_uci
return cls.popen(UciProtocol, command, timeout=timeout, debug=debug, setpgrp=setpgrp, **popen_args)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2444, in popen
return run_in_background(background, name=f"{cls.name} (command={command!r})", debug=debug)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 217, in run_in_background
return future.result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 432, in result
return self.__get_result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 384, in __get_result
raise self._exception
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 211, in background
_run(coroutine(future))
File "C:\Anaconda3\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\Anaconda3\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 2432, in background
transport, protocol = await Protocol.popen(command, setpgrp=setpgrp, **popen_args)
File "C:\Anaconda3\lib\site-packages\chess\engine.py", line 912, in popen
return await _get_running_loop().subprocess_exec(cls, *command, **popen_args) # type: ignore
File "C:\Anaconda3\lib\asyncio\base_events.py", line 1533, in subprocess_exec
bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_events.py", line 372, in _make_subprocess_transport
**kwargs)
File "C:\Anaconda3\lib\asyncio\base_subprocess.py", line 37, in init
stderr=stderr, bufsize=bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_events.py", line 819, in _start
bufsize=bufsize, **kwargs)
File "C:\Anaconda3\lib\asyncio\windows_utils.py", line 155, in init
stderr=stderr_wfd, **kwds)
File "C:\Anaconda3\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
what is 1% in here?

Unable to load model

Describe your Problem:
Unable to load the model

Error report:
Traceback (most recent call last):
File "/ChessVisionBot/code/main.py", line 235, in
ml_model.init_binary()
File "/ChessVisionBot/code/ml_model.py", line 11, in init_binary
binary_model = load_model(model_path)
File "/miniforge3/envs/cv_chessbot/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/miniforge3/envs/cv_chessbot/lib/python3.10/site-packages/keras/utils/generic_utils.py", line 103, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)

Expected behavior:
This is happening due to an incompatible version of Python, @kochsebastian can you reupload the model after training in python 3.10

System:

  • OS: Mac Os M1
  • Interpreter: Python 3.10.12
  • Opencv Version: Opencv 4.7
  • Tensorflow Version: Tensorflow 2.11

How to install

Could you provide a HowToInstall document?
I can't install conda requirements

(/app) root@08bc4e638069:/app# conda install --file requirements.txt -c conda-forge -c defaults
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python-chess==0.30.0=pypi_0
  - libtiff==4.1.0=hcb84e12_0
  - ruamel_yaml==0.15.87=py37h1de35cc_0
  - tk==8.6.8=ha441bb4_0
  - libiconv==1.15=hdd342a3_7
  - libpng==1.6.37=ha441bb4_0
  - conda-package-handling==1.6.0=py37h0b31af3_1
  - grpcio==1.16.1=py37h044775b_1
  - ncurses==6.1=h0a44026_1
  - pcre==8.43=h0a44026_0
  - xz==5.2.4=h1de35cc_4
  - wrapt==1.11.2=py37h1de35cc_0
  - libprotobuf==3.11.2=hd9629dc_0
  - numpy-base==1.17.4=py37ha711998_0
  - tensorflow-base==1.15.0=mkl_py37h032239d_0
  - pyyaml==5.2=py37h1de35cc_0
  - expat==2.2.6=h0a44026_0
  - cairo==1.14.12=hc4e6be7_4
  - pyscreenshot==0.6=pypi_0
  - jpeg==9b=he5867d9_2
  - graphite2==1.3.13=h2098e52_0
  - pyobjc-framework-cocoa==5.2=py37_0
  - tornado==6.0.3=py37h1de35cc_0
  - pyobjc-framework-quartz==5.2=py37_0
  - zstd==1.3.7=h5bba6e5_0
  - libvpx==1.7.0=h378b8a2_0
  - fribidi==1.0.5=h1de35cc_0
  - mss==3.0.1=pypi_0
  - scipy==1.3.1=py37h1a1e112_0
  - matplotlib==3.1.1=py37h54f8f79_0
  - numpy==1.17.4=py37hfd23ef0_0
  - pycosat==0.6.3=py37h0b31af3_1002
  - py-opencv==3.4.2=py37h7c891bd_1
  - libopencv==3.4.2=h7c891bd_1
  - openssl==1.1.1d=h1de35cc_3
  - glib==2.63.1=hd977a24_0
  - pyobjc-core==5.2=py37_0
  - libffi==3.2.1=h475c297_4
  - freetype==2.9.1=hb4e5f40_0
  - cryptography==2.8=py37hafa8578_1
  - libgfortran==3.0.1=h93005f0_2
  - h5py==2.8.0=py37h878fce3_3
  - pyscreen==0.3=pypi_0
  - tensorflow==1.15.0=mkl_py37hb249377_0
  - harfbuzz==1.8.8=hb8d4a28_0
  - gettext==0.19.8.1=h15daf44_3
  - jasper==2.0.14=h636a363_1
  - libedit==3.1.20181209=hb402a30_0
  - readline==7.0=h1de35cc_5
  - libopus==1.3=h1de35cc_0
  - hdf5==1.10.2=hfa1e0ec_1
  - python==3.7.5=h359304d_0
  - pango==1.42.4=h060686c_0
  - bzip2==1.0.8=h1de35cc_0
  - libopenblas==0.3.6=hdc02c5d_2
  - yaml==0.1.7=hc338f04_2
  - sqlite==3.30.1=ha441bb4_0
  - cffi==1.13.2=py37h33e799b_0
  - fontconfig==2.13.0=h5d5b041_1
  - easyprocess==0.2.8=pypi_0
  - icu==58.2=h4b95b61_1
  - c-ares==1.15.0=h1de35cc_1001
  - protobuf==3.11.2=py37h0a44026_0
  - libcxx==4.0.1=hcfea43d_1
  - libxml2==2.9.9=hf6e021a_1
  - pillow==6.2.1=py37hb68e598_0
  - graphviz==2.40.1=hefbbd9a_2
  - libcxxabi==4.0.1=hcfea43d_1
  - zlib==1.2.11=h1de35cc_3
  - ffmpeg==4.0=h01ea3c9_0
  - kiwisolver==1.1.0=py37h0a44026_0
  - pixman==0.38.0=h1de35cc_0

Current channels:

  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.


(/app) root@08bc4e638069:/app# 

Absolute paths

all the links to files in the project are absolute paths, so one must manually change them all. fe: game_state_classes.py line 47

Solving environment fails on windows

Describe your Problem:

conda env create -f environment.yml fails on windows and results in several packages not being installed.

To Reproduce:

On windows 10 (lastest anaconda 1.10), conda env create -f environment.yml

Error report:
`(base) C:\Users\dell\Desktop\ChessVisionBot>conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:

  • libopencv==3.4.2=h7c891bd_1
  • libedit==3.1.20181209=hb402a30_0
  • libcxxabi==4.0.1=hcfea43d_1
  • libpng==1.6.37=ha441bb4_0
  • pixman==0.38.0=h1de35cc_0
  • grpcio==1.16.1=py37h044775b_1
  • libssh2==1.8.2=hcdc9a53_2
  • pyobjc-core==5.2=py37_0
  • yaml==0.1.7=hc338f04_2
  • freetype==2.9.1=hb4e5f40_0
  • jpeg==9b=he5867d9_2
  • pyproj==1.9.6=py37h01d97ff_1002
  • bcrypt==3.1.6=py37h01d97ff_1
  • bzip2==1.0.8=h1de35cc_0
  • pyobjc-framework-quartz==5.2=py37_0
  • zlib==1.2.11=h1de35cc_3
  • scipy==1.3.1=py37h1a1e112_0
  • libnetcdf==4.6.1=h5e45101_3
  • numpy-base==1.16.5=py37ha711998_0
  • tornado==6.0.3=py37h01d97ff_0
  • c-ares==1.15.0=h1de35cc_1001
  • libopenblas==0.3.6=hdc02c5d_1
  • matplotlib-base==3.0.2=py37hf043ca5_1002
  • mkl-service==2.0.2=py37h1de35cc_0
  • basemap==1.2.1=py37hd103db2_1
  • proj4==5.2.0=h6de7cb9_1005
  • tk==8.6.8=ha441bb4_0
  • mkl==2019.4=233
  • libvpx==1.7.0=h378b8a2_0
  • xz==5.2.4=h1de35cc_4
  • markupsafe==1.1.1=py37h1de35cc_0
  • opencv==3.4.2=py37h6fd60c2_1
  • libopus==1.3=h1de35cc_0
  • cairo==1.14.12=hc4e6be7_4
  • jasper==2.0.14=h636a363_1
  • glib==2.56.2=hd9629dc_0
  • libcurl==7.62.0=h051b688_0
  • harfbuzz==1.8.8=hb8d4a28_0
  • hdf5==1.10.2=hfa1e0ec_1
  • numpy==1.16.5=py37h926163e_0
  • gettext==0.19.8.1=h15daf44_3
  • hdf4==4.2.13=0
  • libtiff==4.0.10=hcb84e12_2
  • sqlite==3.29.0=ha441bb4_0
  • expat==2.2.6=h0a44026_0
  • qt==5.6.3=h1d42b2f_0
  • lxml==4.4.1=py37h08abf6f_0
  • cryptography==2.7=py37h212c5bf_0
  • graphite2==1.3.13=h2098e52_0
  • libffi==3.2.1=h475c297_4
  • libxslt==1.1.32=h1e79283_1003
  • openssl==1.1.1d=h1de35cc_3
  • fontconfig==2.13.0=h5d5b041_1
  • libgfortran==3.0.1=h93005f0_2
  • python==3.7.4=h359304d_1
  • libxml2==2.9.9=hf6e021a_1
  • libiconv==1.15=hdd342a3_7
  • sip==4.18.1=py37h0a44026_1000
  • curl==7.62.0=ha441bb4_0
  • fribidi==1.0.5=h1de35cc_0
  • cffi==1.12.3=py37hccf1714_0
  • py-opencv==3.4.2=py37h7c891bd_1
  • protobuf==3.8.0=py37h0a44026_0
  • tensorflow-base==1.14.0=mkl_py37h5a24fda_0
  • netcdf4==1.4.1=py37ha292673_200
  • pillow==5.4.1=py37hb68e598_0
  • pcre==8.43=h0a44026_0
  • tensorboard==1.14.0=py37h80053f4_0
  • libcxx==4.0.1=hcfea43d_1
  • astropy==3.2.1=py37h01d97ff_0
  • readline==7.0=h1de35cc_5
  • graphviz==2.40.1=hefbbd9a_2
  • zstd==1.3.7=h5bba6e5_0
  • geos==3.7.2=h6de7cb9_1
  • pyyaml==5.1.2=py37h1de35cc_0
  • wrapt==1.11.2=py37h1de35cc_0
  • libprotobuf==3.8.0=hd9629dc_0
  • pyobjc-framework-cocoa==5.2=py37_0
  • psutil==5.6.3=py37h01d97ff_0
  • kiwisolver==1.1.0=py37h770b8ee_0
  • h5py==2.8.0=py37h878fce3_3
  • tensorflow==1.14.0=mkl_py37h085be34_0
  • cftime==1.0.3.4=py37h1e5eb4f_1001
  • nomkl==3.0=0
  • intel-openmp==2019.4=233
  • ncurses==6.1=h0a44026_1
  • pynacl==1.3.0=py37h1de35cc_1000
  • icu==58.2=h4b95b61_1
  • pyqt==5.6.0=py37hc26a216_1008
  • pango==1.42.4=h060686c_0
  • ffmpeg==4.0=h01ea3c9_0`

Expected behavior:
I expected the env to solve and the package to install as usual

System:

  • OS: Windows 10
  • Interpreter: Python 3.9 (lastest)

Additional context:
The env file is made for OSX. Can that be the issue?

How do you detect the pieces?

I am asking this because I have been going thru your source code for a couple of hours and I am perplexed. How do you detect where are the pieces from the screenshot?

Thanks for answering.

Peter

No Sessions in Tensorflow 2.x

Describe your Problem:

Unclear, according to similar reports, Tensorflow v2 does not support Sesion anymore. However, defining and testing v1 and v2 result in "Error Report" or the defined Name " not having an attribute " related to it.

This is Conda and or Pip install

To Reproduce:

Error report:

AttributeError: module 'tensorflow' has no attribute 'Session'

AttributeError Traceback (most recent call last)

Expected behavior:

Tensorflow Interactive Session Starting

System:

  • OS: Ubuntu 20.04 64x
  • Interpreter: Python 3.9.4
  • Tensorflow Version: 2.5.0

Additional context:

Project Isn't Running in VS Code on Mac

Describe your Problem:
I had everything installed good on my laptop. Everything was working. Today when i wanted to work with this projects just everything suddenly gives an error on imports. My OS is updated to the most recent version, so I doubt this would be the problem. All I can think of is that some packages installed in VS Code could be 64bit and others 32bit. I'm not very experienced with Python, so thats why I'm wondering if anybody with more knowledge could help me with this.

Error report:

Screenshot 2022-11-22 at 11 57 35 am

Expected behavior:

Expected chess bot to run and be test-ready

System:

  • OS: Mac 13.0.1
  • Interpreter:
  • Opencv Version:
  • Tensorflow Version:

Additional context:
Any information would be helpful. I am an experienced programmer, however I don't work with Python IDE's and Python regularly. If it works better in another text editor, a recommendation would be helpful. Errors are generated from main.py file.

new update when?

Describe your Problem:

To Reproduce:

Error report:

Expected behavior:

System:

  • OS:
  • Interpreter:
  • Opencv Version:
  • Tensorflow Version:

Additional context:

Tensorflow SavedModel loading error

kTraceback (most recent call last):
File "main.py", line 272, in
ml_model.init_binary()
File "/home/kali/ChessVisionBot/code/ml_model.py", line 10, in init_binary
binary_model = load_model(model_path)
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/keras/saving/save.py", line 189, in load_model
loader_impl.parse_saved_model(filepath)
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/saved_model/loader_impl.py", line 110, in parse_saved_model
raise IOError("SavedModel file does not exist at: %s/{%s|%s}" %
OSError: SavedModel file does not exist at: /home/kali/ChessVisionBot/model_binary/binarymodel.h5/{saved_model.pbtxt|saved_model.pb}

while try to use in my kali vm it gives me this error , please help me to resolve this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.