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:
-
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.
-
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.
-
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.
-
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.
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.
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.
This project requires Python 3.6 or later and the following Python libraries:
- NumPy
- OpenCV
- scikit-learn
- TensorFlow
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.
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.
This project is free for everyone to use.





