Diagram image to SGF: experimental software

For discussing go computing, software announcements, etc.
Post Reply
xela
Lives in gote
Posts: 652
Joined: Sun Feb 09, 2014 4:46 am
Rank: Australian 3 dan
GD Posts: 200
Location: Adelaide, South Australia
Has thanked: 219 times
Been thanked: 281 times

Diagram image to SGF: experimental software

Post by xela »

I made this largely for my own amusement/education, but others may find it useful:

https://github.com/hanysz/img2sgf

It's specifically for converting diagrams to SGF so that I can scan pages from printed books on my shelf and load them up into Lizzie+KataGo more quickly than I can input all the moves by hand. It's not great with photos (can't handle perspective distortion) or coloured images, although I've found that it can handle screenshots from some YouTube videos. I wanted something that's not put off by stone numbers or labels on the diagrams, which Imago seems to have trouble with.

Sorry that installing it is such a hassle. I don't have the chance to try it out on a range of computers. So if you manage to make it work, and find it useful, please post your tips here!
Ferran
Lives in gote
Posts: 664
Joined: Mon Apr 22, 2019 1:04 am
Rank: OGS ddk
GD Posts: 0
KGS: Ferran
IGS: Ferran
OGS: Ferran
Has thanked: 177 times
Been thanked: 121 times

Re: Diagram image to SGF: experimental software

Post by Ferran »

xela wrote:It's specifically for converting diagrams to SGF so that I can scan pages from printed books on my shelf and load them up[...]
Great! And thanks a lot. I'll try it. Have you considered (or tried) against old Chinese numbering? There are lots of games that would become available. But I imagine it might be "a tad" harder.

Take care.
一碁一会
xela
Lives in gote
Posts: 652
Joined: Sun Feb 09, 2014 4:46 am
Rank: Australian 3 dan
GD Posts: 200
Location: Adelaide, South Australia
Has thanked: 219 times
Been thanked: 281 times

Re: Diagram image to SGF: experimental software

Post by xela »

At this stage I'm ignoring move numbers. The output is just a static board position. You get the final position of the diagram, not the sequence of moves.

The reason is that I can tell the difference between black and white stones using "old school" image recognition technology. But to recognise numbers, I'd have to train a neural net, which means I need to collect and label a bunch of training data. Technically speaking, it's shouldn't be that hard, but it would eat up more time than I want to put into it. Chinese numbers shouldn't be any harder than Arabic numbers.
Ferran
Lives in gote
Posts: 664
Joined: Mon Apr 22, 2019 1:04 am
Rank: OGS ddk
GD Posts: 0
KGS: Ferran
IGS: Ferran
OGS: Ferran
Has thanked: 177 times
Been thanked: 121 times

Re: Diagram image to SGF: experimental software

Post by Ferran »

xela wrote:Chinese numbers shouldn't be any harder than Arabic numbers.
Well, the ones I've found are in older books, ie. not as easy to read or clearly printed.

Take care. Thanks for the effort.
一碁一会
ebaoe
Beginner
Posts: 1
Joined: Wed Mar 24, 2021 10:55 pm
Rank: 2 dan
GD Posts: 0

Re: Diagram image to SGF: experimental software

Post by ebaoe »

Great, thanks a lot
Post Reply