Kifu-Snap: automatic go-board image recognition for Android

For discussing go computing, software announcements, etc.
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Kifu-Snap: automatic go-board image recognition for Android

Post by Rémi »

Hi,

I have just put this on my web page, if some of you are interested:

http://remi.coulom.free.fr/kifu-snap/

Kifu-Snap is an experimental tool to recognize a go board from a picture. On this web page you can download a free demo of the current Android prototype. You might find this prototype useful already, as it should let you score a finished game much faster than manual scoring. Still the recognition rate is far from perfect. The purpose of releasing this prototype is that the app will let you email your board pictures to me if you wish to do so. I need to collect a large database of varied board samples in order to train the machine-learning algorithms of kifu-snap better. So I'd appreciate your help. In exchange for this data, the next version of Kifu-Snap is likely to recognize your board better.

Rémi
User avatar
quantumf
Lives in sente
Posts: 844
Joined: Tue Apr 20, 2010 11:36 pm
Rank: 3d
GD Posts: 422
KGS: komi
Has thanked: 180 times
Been thanked: 151 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by quantumf »

For those with android phones:

Image
jokkebk
Dies in gote
Posts: 44
Joined: Tue Feb 01, 2011 4:47 am
Rank: EGF 1 kyu
GD Posts: 0
KGS: finity
Has thanked: 2 times
Been thanked: 14 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by jokkebk »

Sounds like an excellent project. I was actually contemplating on writing very similar software, but will likely now just wait and see if this does the job.

My idea was simply to have the user specify corners and dimensions for the grid in picture, so the only algorithm would need to do is to recognize whether there's a black/white stone or empty intersection in given point. This would work nice for club game kibitz, so if there's an interesting board situation you wouldn't need to copy or memorize it for playing out a variation.

I'll have to try the app out later this week when I have a go board at hand. Good luck in the project!
User avatar
quantumf
Lives in sente
Posts: 844
Joined: Tue Apr 20, 2010 11:36 pm
Rank: 3d
GD Posts: 422
KGS: komi
Has thanked: 180 times
Been thanked: 151 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by quantumf »

As a perhaps silly experiment, I took a picture of a goban in SmartGo. It did pretty well, as you'd expect, but it had the peculiar side effect of placing lots of white stones on the edge. Not sure why, as the on-screen board has the brown area extending well beyond the grid lines.
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

quantumf wrote:As a perhaps silly experiment, I took a picture of a goban in SmartGo. It did pretty well, as you'd expect, but it had the peculiar side effect of placing lots of white stones on the edge. Not sure why, as the on-screen board has the brown area extending well beyond the grid lines.


Please send the pic.

Rémi
User avatar
quantumf
Lives in sente
Posts: 844
Joined: Tue Apr 20, 2010 11:36 pm
Rank: 3d
GD Posts: 422
KGS: komi
Has thanked: 180 times
Been thanked: 151 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by quantumf »

Rémi wrote:
quantumf wrote:As a perhaps silly experiment, I took a picture of a goban in SmartGo. It did pretty well, as you'd expect, but it had the peculiar side effect of placing lots of white stones on the edge. Not sure why, as the on-screen board has the brown area extending well beyond the grid lines.


Please send the pic.

Rémi


How? I can find the share button, which attaches the pic to an email. But I don't know what your email address? Is there a one touch way to share it directly with you?

Edit: I see its the "share all" menu item. I tried it with a real board, and it was struggled severely with the board which had both a bright light shining on it (turning a lot of squares white) and a severe shadow (turning all the squares black). You'll see what I mean I'm sure.
Last edited by quantumf on Thu May 30, 2013 2:29 pm, edited 1 time in total.
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

quantumf wrote:
Rémi wrote:
quantumf wrote:As a perhaps silly experiment, I took a picture of a goban in SmartGo. It did pretty well, as you'd expect, but it had the peculiar side effect of placing lots of white stones on the edge. Not sure why, as the on-screen board has the brown area extending well beyond the grid lines.


Please send the pic.

Rémi


How? I can find the share button, which attaches the pic to an email. But I don't know what your email address? Is there a one touch way to share it directly with you?


Next to "Share" you should find "Send All Files":
Image
foeZ
Dies in gote
Posts: 38
Joined: Tue May 28, 2013 7:14 am
Rank: Relinquished
GD Posts: 0
KGS: foeZ
Has thanked: 2 times
Been thanked: 4 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by foeZ »

I downloaded it and was quite impressed that it worked so well. Good job!
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

http://remi.coulom.free.fr/kifu-snap/

A new version is available now. It supports automatic grid recognition (19x19 only). That was much more complicated to do than what I originally thought. Stone recognition was not improved, it is exactly the same as before.

I am sorry I changed the package signature, so you'll have to uninstall the previous version in order to be able to install the new one.

This new version will work until October 1st. I am sorry if you were hit by the limit of the previous version. I thought I would release an upgrade earlier.

I thank all the users who sent photos. I don't really need more, but feel free to continue sending them to me.

Have fun, and please let me know if you have any comment or suggestion.

Rémi
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

I updated the web site today. A new version with minor fixes (you can actually disable anti-slip) + a new collection of links on the web site.
jokkebk
Dies in gote
Posts: 44
Joined: Tue Feb 01, 2011 4:47 am
Rank: EGF 1 kyu
GD Posts: 0
KGS: finity
Has thanked: 2 times
Been thanked: 14 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by jokkebk »

Just a quick thumbs up for this software. I tried it in a bar and the recognition rate was amazingly good, bravo! I had originally thought to write exactly similar application but seems I don't need to anymore. Just don't make it much over 2 € when it's finished!

A couple of improvement ideas:

* Some way to fine-tune grid corners (zoom in functionality, if it exists, alternate idea is a user manual :)
* Editing recognized board should maybe happen zoomed in with an overlay of image and smaller black/white circles in middle of the stones, it seems to work visually quite well

I would mostly be using the software to kibitz about club games, it's easier to silently show interesting variation or tesuji from phone without disturbing players. So a possible additional feature would be to recognize a part of the board, and let the user tap additional stones of alternating color in there, with automatic capture. (UI-wise you could maybe have buttons to restart from "official" board with black/white stone, and possibly simple variation controls (although back button would probably suffice).
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

jokkebk wrote:Just a quick thumbs up for this software. I tried it in a bar and the recognition rate was amazingly good, bravo! I had originally thought to write exactly similar application but seems I don't need to anymore. Just don't make it much over 2 € when it's finished!

A couple of improvement ideas:

* Some way to fine-tune grid corners (zoom in functionality, if it exists, alternate idea is a user manual :)
* Editing recognized board should maybe happen zoomed in with an overlay of image and smaller black/white circles in middle of the stones, it seems to work visually quite well

I would mostly be using the software to kibitz about club games, it's easier to silently show interesting variation or tesuji from phone without disturbing players. So a possible additional feature would be to recognize a part of the board, and let the user tap additional stones of alternating color in there, with automatic capture. (UI-wise you could maybe have buttons to restart from "official" board with black/white stone, and possibly simple variation controls (although back button would probably suffice).


Thanks for your nice feedback.

Note that you can zoom in/out by double-tapping the picture (double-tap inside a corner circle to zoom into that corner). There is some online help that explains it. A dialog should show up the first time you use the application. You can get this dialog again by choosing "help" in the menu. You can also read some usage help on the kifu-snap web site. Maybe I'll make a video to demonstrate the features.

Double-tap does not work for editing the board. I know that editing the board is not convenient on small screens. I will improve it. Maybe you did not notice: with a long press, a cross appears. If you wait even longer, half of the cross will lock. That may help a bit, although it is a bit complicated to use. I will find a better way.

Also, on some devices, the anti-slip option that you can find in the preferences may help (it will ignore finger movements made right before lifting the finger).

Next version will have a significantly better recognition rate, automatic dead-stone detection, and also analysis of unfinished games by Crazy Stone (score histogram + move recommendation). That should make it a good tool for kibitzers.

Regarding price, my idea is to make it free with an annoying 15s delay before showing the score, and you'll be able to remove the delay with an in-app purchase. This way users will be able to test all the features before deciding to buy.

Thanks again for your feedback.

Rémi
User avatar
LocoRon
Lives with ko
Posts: 292
Joined: Tue Aug 10, 2010 1:04 pm
Rank: 1 kyu
GD Posts: 0
KGS: LocoRon
Has thanked: 92 times
Been thanked: 80 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by LocoRon »

Rémi wrote:Regarding price, my idea is to make it free with an annoying 15s delay before showing the score, and you'll be able to remove the delay with an in-app purchase.


The "freemium" scheme seems pretty reasonable, but if you could go with a separate "unlock key" on the Play store (rather than strictly in-app purchase) I would greatly appreciate it. :)

(I am always wary of in-app purchases.)
Rémi
Lives with ko
Posts: 170
Joined: Sat Jan 14, 2012 4:11 pm
Rank: KGS 4 kyu
GD Posts: 0
Has thanked: 32 times
Been thanked: 119 times
Contact:

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by Rémi »

LocoRon wrote:
Rémi wrote:Regarding price, my idea is to make it free with an annoying 15s delay before showing the score, and you'll be able to remove the delay with an in-app purchase.


The "freemium" scheme seems pretty reasonable, but if you could go with a separate "unlock key" on the Play store (rather than strictly in-app purchase) I would greatly appreciate it. :)

(I am always wary of in-app purchases.)


I don't really understand why it makes a difference. With a so-called "managed" in-app purchase, you'll be able keep the purchase forever and share it with all your devices. So it should be virtually identical to buying a paid app.

Maybe the best solution would be to have two apps anyway: one free with an in-app purchase to remove the delay, and one paid (the same price as the in-app purchase) without any delay.

Rémi
User avatar
fireproof
Lives with ko
Posts: 172
Joined: Sat Apr 20, 2013 8:22 am
GD Posts: 0
Universal go server handle: fireproof
Location: Santa Barbara, CA
Has thanked: 235 times
Been thanked: 77 times

Re: Kifu-Snap: automatic go-board image recognition for Andr

Post by fireproof »

Do you expect to release another beta any time soon - I have an android using friend interested in trying your app!
Post Reply