Skip to content

OmarMusayev/puzzlesolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

AI for Jigsaw Puzzles

Project Details

This project is about creating an AI system that can solve jigsaw puzzles. The AI uses a blend of image processing methods and machine learning algorithms to spot individual puzzle pieces, figure out their correct orientation, and place them in the right position to complete the puzzle.

The project has several phases:

  1. Image Processing: The AI begins by processing the puzzle image to spot individual pieces. This involves methods like edge detection, contour identification, and image division.

  2. Piece Sorting: After the pieces are spotted, the AI uses a machine learning model to sort the pieces based on their shape and whether they're edge or corner pieces.

  3. Piece Orientation: The AI then determines the correct orientation of each piece. This is done by comparing the edges of the pieces to each other and finding the best match.

  4. Puzzle Completion: Finally, the AI places the pieces in the correct position to complete the puzzle. This is done by comparing the images on the pieces and finding the best match.

Repository Contents

This repository includes:

  • Source code for the AI system.
  • A set of sample jigsaw puzzles for testing.
  • Guides on how to operate the system and understand the results.

Sample Puzzles and Solutions

van-gogh

van-gogh

craies_32

craies_32

puzzle

af28d739-405e-42f4-b93c-879cd82c1009

How to Operate

To operate the system, simply run the main script with the puzzle image as an argument. The system will then process the image, spot the pieces, sort them, determine their orientation, and complete the puzzle.

Requirements

This project requires Python 3.6 or later and the following Python libraries:

  • NumPy
  • OpenCV
  • scikit-learn
  • TensorFlow

Future Plans

Future plans for this project will focus on improving the accuracy of the piece sorting and orientation determination stages, as well as optimizing the puzzle completion algorithm for speed.

How to Contribute

Contributions to this project are welcome. If you have a feature request, bug report, or want to contribute code, please open an issue or pull request.

License

This project is free for everyone to use.

Video

https://www.youtube.com/watch?v=FK3mwMWRR2I

About

Puzzle Solver using AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages