shainisan / real-life-chess-vision

A computer vision application that identifies pieces on a chess board from real-life photos.
30 stars 7 forks source link

Pre-trained YOLO Model Not Accurately Detecting Chessboard Corners #3

Open RayGButler opened 11 months ago

RayGButler commented 11 months ago

Hello,

I've been working with your pre-trained YOLO model intended for detecting chessboard corners (sample image board3.jpg enclosed). However, I've encountered an issue where the model does not seem to detect all four corners accurately.

Development environment: Google Colab

Expected Behavior: The model should ideally return coordinates for all four corners of the chessboard.

Actual Behavior: The model is only returning coordinates for two opposing corners of the rectangle. The coordinates I'm currently receiving are:

[[653.55, 117.3], [1321.8, 119.77], [1321.8, 119.77], [653.55, 117.3]]

Screenshot_9

This behavior leads to inaccurate perspective transformations when I attempt to process the chessboard image further.

I have double-checked my input images, and they are of standard quality with clear visibility of the chessboard. I believe the issue might be with the model itself or how it was trained.

Any assistance or insights into this matter would be greatly appreciated. If you need more details or have any recommendations, please let me know.

Thank you for your time and efforts on this project.

Best regards, Ray board3

shainisan commented 10 months ago

Hi! You have to fine-tune the model on your dataset. It is trained on my chess boards. Good luck!

leason commented 10 months ago

I'm finding this to be the case for me as well. I was probably naive but the blog post made it sound like the models were more general purpose than it sounds like they are. I've tried several different board types from online images as well as my own boards and none of them detect successfully. Will try building my own model for now as well. Thanks for sharing the code to get us started at least!