Live data from Hacker News

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

chessvision.ai

31–40 of 51 posts

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

#31

Earlier quoted context omitted.

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.

Sounds like a blast! Are you restricted to to a single game piece set? This might be hugely easier if you can keep state between turn analyses. IE, if a white rook disappears from A5 and some unidentified white piece appears at C5, then it’s probably the rook.

We weren't given many constraints related to the chess piece recognition itself. The course instead asks us to implement a CV research paper, and we chose an existing research project which focused on chess piece recognition.

That lack of constraints led us into running face first into issues of generalisation and variability within datasets. As in, exactly what you allude to with limiting the piece sets.

I think in my undergraduate naivety my aspirations were too high with what could reasonably be accomplished. I've spent a lot of time trying to improve an aspect of the project that really didn't need to be improved, which prevented meaningful progress.

Now finals are coming up and I feel terribly stressed. Having trouble functioning. Brain fog, etc. I feel so sad right now.

EDIT: I keep forgetting my password so apparently I have multiple throwaway now. Sorry.

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

#32
post #29
post #26

Earlier quoted context omitted.

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.

I wonder how much easier it would be if you narrow down the likely set of pieces for each square. There are obviously some positions for some pieces that are invalid (bishop on the wrong colored square), but there are probably a lot of other positions that are so uncommon that they could be discounted.

Probably not much. How many are actually impossible if you factor in pawn promotion though? The only one that comes to mind immediately for any individual piece is pawns on their own first row and a board without two kings.

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

#33
post #29
post #26

Earlier quoted context omitted.

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.

I wonder how much easier it would be if you narrow down the likely set of pieces for each square. There are obviously some positions for some pieces that are invalid (bishop on the wrong colored square), but there are probably a lot of other positions that are so uncommon that they could be discounted.

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.

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

#35
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.

Standard object detection can't work here?

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

#37
post #29

Earlier quoted context omitted.

I wonder how much easier it would be if you narrow down the likely set of pieces for each square. There are obviously some positions for some pieces that are invalid (bishop on the wrong colored square), but there are probably a lot of other positions that are so uncommon that they could be discounted.

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.

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

#38
post #2

I thought they meant like in vivo in 3D, such as the scene in Independence Day

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 whole game is unambiguous using these assumptions).

It's all old-school computer vision with hand-written features, and I'm pretty confident there is tons of low-hanging fruit, but who has the time.

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

#39
post #26

Earlier quoted context omitted.

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.

Standard object detection can't work here?

Have to detect and accurately place them in space to map them to the board.

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

#40
post #39

Earlier quoted context omitted.

Standard object detection can't work here?

Have to detect and accurately place them in space to map them to the board.

They're on a grid though, why would this be hard?

Compared to all the other feats of machine learning that have blown my mind, parsing a photo of a limited set of a handful of different piece variants, in two colors, that located on a grid, doesn't seem too difficult.

Post reply on HN