GithubHelp home page GithubHelp logo

image2sgf's Introduction

Dependencies

python >= 3.6

PyTorch

torchvision

cv2

numpy

matplotlib

pillow

sgfmill

pyautogui

for GUI wxPython

Usage:

Download and extract pth files from https://github.com/noword/image2sgf/releases

usage: img2sgf.py [-h] [--sgf_name SGF_NAME] [--capture] [--save_images] [image_name]

positional arguments:
  image_name           input image file name

optional arguments:
  -h, --help           show this help message and exit
  --sgf_name SGF_NAME  output sgf file name
  --capture            capture the screenshot
  --save_images        save grid images

Examples:

img2sgf.py examples\goban.png

GUI

img2sgf_gui.pyw

image2sgf's People

Contributors

noword avatar

Stargazers

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

Watchers

 avatar

image2sgf's Issues

发现一个很有趣的问题

把一个棋谱照片quality-100.jpg,通过不同的压缩参数生成quality-30.jpg, quality-50.jpg, quality-60.jpg, quality-70.jpg, quality-80.jpg, quality-90.jpg。发现quality 70以上的可以正常转成相应的sgf,60及以下的都识别有错误的棋子,请noword研究一下如何在底quality下的jpg也可以被正确识别。

下载

Fails on image found in the wild

Using the image from a reddit post fails on step one and never completes step 2:
r_baduk-132db5c-g6q60h265rwa1-img2sgf
(status bar should be showing "step 2: perspective correct the board, then classify stones")

I cropped the image:
r_baduk-132db5c-g6q60h265rwa1-cropped

And tried again:
r_baduk-132db5c-g6q60h265rwa1-cropped-img2sgf

Apart from a few mistakes (that still leave a valid board), it appears to complete step 2, but then gives the error "Recognition failed" and the status bar reads "Error: Can't generate sgf."

error: board.pth is missing

Hi noword,

I get your stone.pth model. However, the board.pth is missing.
Can you let me know where to find the board.pth?

Bests,

can't find the imgs.py under /gui directory

Hi author of image2sgf,

This is very useful project. However, I'm looking for help to solve an issue when runing img2sgf.py.

from gui.main import *
import imgs
ModuleNotFoundError: No module named 'imgs'

I'm thinking there might be a imgs.py missing. Or do you have any idea why this is happening. I'm a newbie to python and would love help!

Bests,
Wendy

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.