Live data from Hacker News

Chessvision.ai – Analyze chess position from websites, images or video

chessvision.ai

41–50 of 51 posts

Re: Chessvision.ai – Analyze chess position from websites, images or video

#41
post #38

Earlier quoted context omitted.

That would rock for chess tournaments. Webcam next to the board and run analysis for the audience...

We built a barely working version of that during a hackathon a while back: https://github.com/chesseye/chesseye (README has a link to a video). It takes a lot of shortcuts, works with just the right lightning, etc., but worked great as a proof-of-concept :) We got away with not identifying the pieces by just detecting the color, assuming the game started from the initial position, and assuming only legal moves (the w…

If I understand correctly (watched the video) you start from the initial position and track moves that are made in order to update the position to reflect the move, is this correct?

Re: Chessvision.ai – Analyze chess position from websites, images or video

#42
post #37

Earlier quoted context omitted.

What would make it easier IMHO is to make it a top-down version only. Take a photo from the top, then the program breaks down the board into 8x8 squares, feeds each square into a classification algorithm that you will train on a bunch of hand labeled images. Fine tune the model as you gather more data.

The pieces look more similar from the top, though. With bad enough contrast everything is just a circle. So you need some kind of angle.

> With bad enough contrast everything is just a circle.

Yes but does real world photos ever have that poor contrast? IMO, top down photo is worth exploring.

Re: Chessvision.ai – Analyze chess position from websites, images or video

#43
post #38

Earlier quoted context omitted.

We built a barely working version of that during a hackathon a while back: https://github.com/chesseye/chesseye (README has a link to a video). It takes a lot of shortcuts, works with just the right lightning, etc., but worked great as a proof-of-concept :) We got away with not identifying the pieces by just detecting the color, assuming the game started from the initial position, and assuming only legal moves (the w…

If I understand correctly (watched the video) you start from the initial position and track moves that are made in order to update the position to reflect the move, is this correct?

That's correct. If you're curious about the architecture: the vision part detects a chessboard, then corrects the perspective and restricts the image to just the square of the board, then looks at each square and has some simple thresholds to decide if it's occupied by a piece, and of what color. From there, the camera is treated as a black box sensor that continuously streams two 64-bit masks, for where it thinks it sees white and black pieces. There is a second program (controller) that turns that stream into a stream of chess positions (and a Unix pipe in between). The sensor is faulty of course and the controller has logic for ignoring bits from the mask where there cannot possibly be pieces etc.

Re: Chessvision.ai – Analyze chess position from websites, images or video

#44

Seems cool. Does it use a server or it does all the calculations in the browser?

Server side

This is kind of a bummer for privacy reasons. Sending your application screenshots of my browser feels not-great.

To be honest, I trust you, even as a random stranger on hacker news. But I don't trust that you'll never sell this, and I don't trust whoever you you might sell it to.

Re: Chessvision.ai – Analyze chess position from websites, images or video

#45
post #38

Earlier quoted context omitted.

That would rock for chess tournaments. Webcam next to the board and run analysis for the audience...

We built a barely working version of that during a hackathon a while back: https://github.com/chesseye/chesseye (README has a link to a video). It takes a lot of shortcuts, works with just the right lightning, etc., but worked great as a proof-of-concept :) We got away with not identifying the pieces by just detecting the color, assuming the game started from the initial position, and assuming only legal moves (the w…

That’s very cool, thanks for sharing!

Re: Chessvision.ai – Analyze chess position from websites, images or video

#46

Earlier quoted context omitted.

That would rock for chess tournaments. Webcam next to the board and run analysis for the audience...

Hey! I'm working on exactly this same problem for an undergraduate Computer Vision course right now. It's not going well! Chess piece recognition is hard. I definitely think the electronics approach described in the other comment is a much more reliable way to go.

What challenges are you running into? What sort of data augmentation are you doing?

Re: Chessvision.ai – Analyze chess position from websites, images or video

#47

Earlier quoted context omitted.

Server side

This is kind of a bummer for privacy reasons. Sending your application screenshots of my browser feels not-great. To be honest, I trust you, even as a random stranger on hacker news. But I don't trust that you'll never sell this, and I don't trust whoever you you might sell it to.

I understand your concerns and would like to clarify any potential doubts. The client app (the extension itself) has only currentTab permission which means that it has access only the tab where user opened the extension and it takes a screenshot only when a user explicitly clicks Scan button. The source code of the extension is completely public - everyone can unpack it and verify that indeed it does exactly that. So this actually reduces to the same functionality as for example using any photo app with cloud processing - i.e. you take the photo/screenshot explicitly and no other information is sent to the server.

Re: Chessvision.ai – Analyze chess position from websites, images or video

#48
post #26

Earlier quoted context omitted.

I see. Well, one thing that may help is that 95% of chessboards (at least at the clubs I've visited) use the same piece set: https://www.amazon.com/WE-Games-Complete-Tournament-Chess/dp... Also, a 10% error rate wouldn't be a big deal as long as it was easy to correct the position within a few seconds.

That makes it vaguely possible yeah but going from a flat on 2D grid to a 3D set of pieces at an angle is a whole different set of problems.

Although it is more difficult in 3D, it is still a very solvable problem, that won't work always, but in 99% of cases if the camera angle is not very low.

Indeed, the checkerboard itself gives valuable information about the pose of the checkerboard, it is even used for calibration in multi-view geometry: https://en.wikipedia.org/wiki/Chessboard_detection

Re: Chessvision.ai – Analyze chess position from websites, images or video

#49

Hi, many thanks to innerspirit for posting this! I'm the author of the app and you can find discussions about it on reddit as well: r/MachineLearning : https://www.reddit.com/r/MachineLearning/comments/b8jdho/p_d... r/chess: https://www.reddit.com/r/chess/comments/b826h5/created_chess... If you have any opinions and suggestions I'd love to hear them!

Very cool! This'd be absolutely great for getting more value / use out of the pile of Everyman books that I [and, I'd hazard a guess, a solid chunk of chessplayers in general] have sitting on the shelf that don't get used as much as they should

What are the best three books for beginners?

Re: Chessvision.ai – Analyze chess position from websites, images or video

#50

Earlier quoted context omitted.

Very cool! This'd be absolutely great for getting more value / use out of the pile of Everyman books that I [and, I'd hazard a guess, a solid chunk of chessplayers in general] have sitting on the shelf that don't get used as much as they should

What are the best three books for beginners?

Great question! There are lots of great beginner books out there, but if I had to pick three:

1) "A First Book of Morphy" by del Rosario -- takes the very well-considered principles of GM Reuben Fine and illustrates them with [mostly] Paul Morphy's games. Of all the books I've ingested on the subject of chess, this one has stuck with me most. Even my kid loves it!

2) "Winning Chess Strategy for Kids" by Coakley -- it's not just for kids! And it's not just strategy! Covers fundamental tactical concerns such as pins, forks, etc in a straightforward way. Similar in some regards to Pandolfini's "Weapons of Chess" but pedagogically superior in my view.

3) "Silman's Complete Endgame Course" by Silman -- the old saw that one should study the endgame first is pretty true -- Silman is the best at teaching it -- man, if I had a dollar for every game I was winning in the middlegame and then lost in the endgame, I'd have... well, a lot of dollars

cheater extra: 3.5) "Bobby Fischer Teaches Chess" -- the old standby -- this is a tactics book first and foremost, and the main value of it is that it gives you puzzles of gradually increasing complexity so that you can really feel your comprehension improving and say to your self, "I'm getting it!" Truth is that getting discouraged is the thing that stalls or scares off many / most novice chessplayers

When you start getting up in the 1100-1300 range, pick up "My System" by Nimzowitsch and "How to Reassess your Chess" by Silman, "Soviet Middlegame Technique" by Romanovsky -- and after then, start learning openings in more detail. The biggest mistake most beginners make, including me, is building up a repertoire of openings before having a solid grasp of the fundamentals. Truth is, below 1300, most players are "off book" by the ~tenth move anyway, so learning the intricacies of the Nimzo-Indian isn't gonna do a person much good at that stage.

Post reply on HN