{"id":22646088,"url":"https://github.com/aakashjhawar/solvesudoku","last_synced_at":"2025-08-29T05:12:53.522Z","repository":{"id":100859514,"uuid":"162448860","full_name":"aakashjhawar/SolveSudoku","owner":"aakashjhawar","description":"Extract and solve sudoku from an image using Computer Vision and Deep Learning","archived":false,"fork":false,"pushed_at":"2020-10-01T12:28:24.000Z","size":1219,"stargazers_count":59,"open_issues_count":1,"forks_count":30,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T07:13:12.688Z","etag":null,"topics":["cnn","cnn-classification","cnn-tensorflow","convolutional-neural-networks","cv2","deep-learning","digital-image-processing","handwritten-digit-recognition","image-processing","image-segmentation","machine-learning","neural-network","opencv","opencv-python","python","sudoku","sudoku-grabber","sudoku-scanner","sudoku-solution-finder","sudoku-solver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aakashjhawar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-19T14:28:13.000Z","updated_at":"2025-03-31T10:55:19.000Z","dependencies_parsed_at":"2023-06-02T05:00:08.530Z","dependency_job_id":null,"html_url":"https://github.com/aakashjhawar/SolveSudoku","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aakashjhawar/SolveSudoku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashjhawar%2FSolveSudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashjhawar%2FSolveSudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashjhawar%2FSolveSudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashjhawar%2FSolveSudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aakashjhawar","download_url":"https://codeload.github.com/aakashjhawar/SolveSudoku/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aakashjhawar%2FSolveSudoku/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272632463,"owners_count":24967261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","cnn-classification","cnn-tensorflow","convolutional-neural-networks","cv2","deep-learning","digital-image-processing","handwritten-digit-recognition","image-processing","image-segmentation","machine-learning","neural-network","opencv","opencv-python","python","sudoku","sudoku-grabber","sudoku-scanner","sudoku-solution-finder","sudoku-solver"],"created_at":"2024-12-09T06:08:47.833Z","updated_at":"2025-08-29T05:12:53.517Z","avatar_url":"https://github.com/aakashjhawar.png","language":"Python","readme":"[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)\n\n\n# SolveSudoku\nSolveSudoku extract and solve sudoku from image. It uses a collection of image processing techniques and Convolution Neural Network for training and recognition of characters.\nCNN is trained on MNIST dataset to detect digits.\n\n## Blog\nCheckout the **articles on SolveSudoku** on Medium.com \n\n[Sudoku Solver using OpenCV and DL — Part 1](https://medium.com/@aakashjhawar/sudoku-solver-using-opencv-and-dl-part-1-490f08701179)\n\n[Sudoku Solver using OpenCV and DL — Part 2](https://medium.com/@aakashjhawar/sudoku-solver-using-opencv-and-dl-part-2-bbe0e6ac87c5)\n\n## Getting Started\n\nHow to use\n```    \ngit clone https://github.com/aakashjhawar/SolveSudoku.git\ncd SolveSudoku\npython3 sudoku.py \u003cpath/to/input_image\u003e\n```\n \n## Prerequisites\n\n- Python 3.5\n- OpenCV\n```\nsudo apt-get install python-opencv\n```\n## Procedure\n \u003e 1. Image preprocessing (Thresholding).\n \u003e 2. Find the largest contour (sudoku square).\n \u003e 3. Get the cordinates of **largest contour**.\n \u003e 4. Crop the image.\n \u003e 5. Perform **Warp perspective** on image\n \u003e 5. Extract each cells from the image by slicing the sudoku grid.\n \u003e 6. Extract the **largest component** in the sudoku image (number).\n \u003e 7. Remove noise in block.\n \u003e 8. Send the number to pre trained Digit Recogition model.\n \u003e 9. Send the grid to Sudoku Solver to perform the final step.\n## Working \n\n#### Input image of Sudoku-\n![Input image of sudoku](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/sudoku.jpg)\n\n#### Image of Sudoku after thresholding-\n![Threshold image of sudoku](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/threshold.jpg)\n\n#### Contour corners of Sudoku-\n![Contour of sudoku](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/contour.jpg)\n\n#### Warp Image-\n![Warp of sudoku](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/warp.jpg)\n\n#### Final output of ExtractSudoku-\n![Final image of sudoku](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/final.jpg)\n\n\n#### Extracted grid-\n![extracted grid](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/extracted_grid.png)\n\n#### Solved grid-\n![Solved grid](https://github.com/aakashjhawar/SolveSudoku/blob/master/images/solved_grid.png)\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashjhawar%2Fsolvesudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faakashjhawar%2Fsolvesudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faakashjhawar%2Fsolvesudoku/lists"}