taming-transformers icon indicating copy to clipboard operation
taming-transformers copied to clipboard

[Question] How to detect and grab a grid from an image

Open yozachar opened this issue 3 years ago • 7 comments

Hi, I'm new to this field, so as part of my studies I'm trying to detect and return a Sudoku grid from and image. I know I can use the Hough lines transform but it gets messy:

image

It possible to detect grid more cleanly and efficiently?

yozachar avatar May 18 '21 03:05 yozachar

I'm been trying figure out how to do image2image translation with this repo for the past few days. I think I figured it out. I'll write a guide on how to do this once I actually successfully trained a model. My issue #51.

adeptflax avatar May 29 '21 03:05 adeptflax

@joe733 you could probably do this with pix2pixHD. Maybe CNN to lstm would be better for your use case. Though I dunno.

adeptflax avatar Jun 01 '21 03:06 adeptflax

I did on that issue how to do it a few days ago #51.

adeptflax avatar Jun 18 '21 14:06 adeptflax

Nice, I'll go through it.

yozachar avatar Jun 19 '21 06:06 yozachar

I realized I didn't do it correctly. I explained more on the issue thread. Pix2pixHD is better than the way I did it.

adeptflax avatar Jun 20 '21 16:06 adeptflax

You would have to train a vqgan model on Sudoku images and train another vqgan model on Sudoku line patterns. You would then train a transformer that would convert different the 2 images.

adeptflax avatar Jun 20 '21 16:06 adeptflax

Hi, I'm still a beginner, so figuring things slowly. Thank you so much for the pointers!

yozachar avatar Jun 20 '21 17:06 yozachar