Arxiv:1711.06769V1 [Cs.CV] 17 Nov 2017 Speech Descrambling [23], Archeology [2][13], Image Edit- Based Solver

Arxiv:1711.06769V1 [Cs.CV] 17 Nov 2017 Speech Descrambling [23], Archeology [2][13], Image Edit- Based Solver

Ref: IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1767–1774, Portland, OR, June 2013. A Genetic Algorithm-Based Solver for Very Large Jigsaw Puzzles Dror Sholomon Eli (Omid) David∗ Nathan S. Netanyahuy [email protected] [email protected] [email protected] Department of Computer Science, Bar-Ilan University, Ramat-Gan 52900, Israel Abstract In this paper we propose the first effective automated, ge- netic algorithm (GA)-based jigsaw puzzle solver. We intro- duce a novel procedure of merging two ”parent” solutions to an improved ”child” solution by detecting, extracting, (a) (b) and combining correctly assembled puzzle segments. The solver proposed exhibits state-of-the-art performance solv- ing previously attempted puzzles faster and far more ac- curately, and also puzzles of size never before attempted. Other contributions include the creation of a benchmark of large images, previously unavailable. We share the data sets and all of our results for future testing and compara- (c) (d) tive evaluation of jigsaw puzzle solvers. Figure 1: Jigsaw puzzles before and after reassembly us- ing our genetic algorithm-based solver. We believe these 1. Introduction puzzles, of 10,375 (a-b) and 22,834 pieces (c-d), to be the largest automatically solved to date. The problem domain of jigsaw puzzles is widely known to almost every human being from childhood. Given n dif- ferent non-overlapping pieces of an image, the player has handle up to nine-piece problems. Ever since then, the re- to reconstruct the original image, taking advantage of both search focus regarding the problem has shifted from shape- the shape and chromatic information of each piece. Al- based to merely color-based solvers of square-tile puzzles. though this popular game was proven to be an NP-complete In 2010 Cho et al.[4] presented a probabilistic puzzle solver problem [1][7], it has been played successfully by chil- that could handle up to 432 pieces, given some a priori dren worldwide. Solutions to this problem might benefit knowledge of the puzzle. Their results were improved a the fields of biology [14], chemistry [21], literature [16], year later by Yang et al.[22] who presented a particle filter- arXiv:1711.06769v1 [cs.CV] 17 Nov 2017 speech descrambling [23], archeology [2][13], image edit- based solver. Furthermore, Pomeranz et al.[17] introduced ing [5] and the recovery of shredded documents or pho- that year, for the first time, a fully automated square jig- tographs [3][15][12][6]. Besides, as Goldberg et al.[10] saw puzzle solver that could handle puzzles of up to 3,000 have noted, the jigsaw puzzle problem may and should be pieces. Gallagher [9] has advanced this even further by con- researched for the sole reason that it stirs pure interest. sidering a more general variant of the problem, where nei- Jigsaw puzzles were first produced around 1760 by John ther piece orientation nor puzzle dimensions are known. Spilsbury, a Londonian engraver and mapmaker. Neverthe- In its most basic form, every puzzle solver requires an es- less, the first attempt by the scientific community to com- timation function to evaluate the compatibility of adjacent putationally solve the problem is attributed to Freeman and pieces and a strategy for placing the pieces (as accurately as Garder [8] who in 1964 introduced a solver which could possible). Although much effort has been invested in per- ∗ fecting the compatibility functions, recent strategies tend to www.elidavid.com be greedy, which is known to be problematic when encoun- yNathan Netanyahu is also affiliated with the Center for Automation Research, University of Maryland, College Park, MD 20742 (e-mail: tering local optima. Thus, despite achieving very good (if [email protected]). not perfect) solutions for some puzzles, supplementary ma- 1 terials provided by Pomeranz et al.[18] indicate that there is called chromosomes, is randomly generated. Every chro- much room for improvement for many other puzzles. Com- mosome is a complete solution to the problem, e.g. a sug- parative studies conducted by Gallagher ([9], Table 4), re- gested arrangement of the puzzle’s pieces. Next, various garding the benchmark set of 432-piece images, reveal only biologically inspired operators such as selection, reproduc- a slight improvement in accuracy relatively to Pomeranz tion and mutation are applied. These operators gradually et al. (95.1% vs. 95.0%). To the best of our knowledge, improve the solutions in the population, eventually reach- no additional benchmark runs have been reported by Gal- ing the optimum solution (i.e. the correct image). lagher. We thus assume that his method’s performance on In order to imitate natural selection, a chromosome’s re- other benchmarks is comparable to that reported by Pomer- production rate, i.e. the number of times it is selected to anz et al. Interestingly, despite the availability of puzzle reproduce and hence the number of its offsprings, is set solvers for 3,000- and 9,000-piece puzzles, there exists no directly proportionate to its fitness. The fitness is a score image set, for the purpose of benchmark testing, containing obtained by a fitness function and it represents the quality puzzles with more then 805 pieces. Current state-of-the-art of a given solution. Thus, ”good” solutions will have rela- solvers were only run on very few large images. Further- tively more offsprings than other solutions. Moreover, good more, these images were admittedly considered ”easier” for chromosomes are more likely to reproduce with other good solving [9], containing an extreme variety of textures and chromosomes. The reproduction operator, called crossover, colors. We assume that similarly to the case of the smaller should allow the better traits from both parents to be passed images, the accuracy of current solvers on some large puz- on and be combined into the child solution, potentially cre- zles could be greatly increased by using more sophisticated ating an improved solution. algorithms. The success of a GA is mainly dependent on choosing In this paper we harness the powerful technique of ge- an appropriate chromosome representation, crossover oper- netic algorithms (GAs) [11] as a strategy for piece place- ator, and fitness function. The chromosome representation ment. The design of a GA-based solver has been attempted and crossover operator must allow the merge of two good by Toyama et al.[20], but its successful performance was solutions to an even better solution. The fitness function limited to 64-piece puzzles. We offer three major contribu- must correctly detect chromosomes containing promising tions. First and foremost, we present a significantly more solution parts to be passed on to the next generations. accurate solver of the original jigsaw variant with known piece orientation and puzzle dimensions. Our solver com- 3. GA-based puzzle solver promises neither speed nor size as it outperforms state-of- the-art solvers, successfully tackling up to 22,834-piece size A basic GA framework for solving the jigsaw puzzle puzzles (more than twice the number of pieces ever at- problem is given by the pseudocode of Algorithm1. As tempted/reported) within a reasonable time frame. (See Fig- previously noted, the GA contains a population of chro- ure1.) Secondly, we assemble a new benchmark, consisting mosomes, each of which represents a possible solution to of sets of larger images (with varying degrees of difficulty), the problem at hand. In our case, a chromosome is an ar- which we make public to the community [19]. Also, we rangement, or placement, of all the jigsaw puzzle pieces. share all of our results (on this benchmark and other public Specifically, our GA starts with 1,000 random placements. datasets) for future testing and comparative evaluation of In every generation the entire population is evaluated using jigsaw puzzle solvers. Finally, we provide for the first time a fitness function (described below), and a new population an effective GA-based puzzle solver, which should bene- is (re)produced by the selection of and crossover application fit research regarding the area of evolutionary computation to chromosome pairs. The selection method, called roulette (EC), in general, and the jigsaw puzzle problem, in particu- wheel selection, is very common. The probability of select- lar. From an EC perspective, our novel techniques could be ing a certain chromosome by the method is directly propor- used for solving additional problems with similar proper- tionate to the value of its fitness function, as required. ties. As to the jigsaw puzzle problem, our proposed frame- Having provided a framework overview, we now de- work could prove useful for solving more advanced vari- scribe in greater detail the various critical components of ants, such as puzzles with missing pieces, unknown piece the GA proposed, e.g. the chromosome representation, fit- orientation, and more. ness function, and crossover operator. 3.1. The fitness function 2. Genetic algorithms The fitness function (described below) is evaluated for all A GA is a search procedure inside a problem’s solution chromosomes for the purpose of selection. In our GA, each domain. Since examining all possible solutions of a spe- chromosome represents a complete solution to the jigsaw cific problem is usually considered infeasible, GAs offer an puzzle problem (see Subsection 3.2), i.e. a suggested place- optimization heuristic inspired by the theory of natural se- ment of all pieces. The problem variant at hand assumes no lection. knowledge whatsoever of the original image and thus, the First, an initial population of candidate solutions, also correctness of the absolute location of puzzle pieces cannot Algorithm 1 Pseudocode of GA framework pairwise compatibilities for all pieces (we only had to keep 1: population generate 1000 random chromosomes compatibilities of the right and up directions since left and 2: for generation number = 1 ! 100 do down can be easily deduced).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us