Monday, February 15, 2016

Wed, Feb 17 - PatchMatch

PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing. Connelly Barnes, Eli Shechtman, Adam Finkelstein, and Dan B Goldman. Siggraph 2009.

project page

21 comments:

  1. Nearest Neighbour searches have commonly been used to augment the functionality of image editing software, particularly functions predicated on finding similar patches between two images, but the high computational cost of these kinds of searches precluded their use in an interactive setting. The algorithm introduced in this paper aims to address this by using approximate nearest neighbours, where candidate matching patches are found via first random patch sampling of the target image, then locally propagation via random searches within some radius, in an effort to use the structure in the target image to lead to the best match candidates. To facilitate user control on the synthesis process, a system of imposing local constraints on search space (user drawn curves spanning missing patches) and allowable deformation (to provide straight line preservation or handle user-defined hard constraints within the resultant image) is also discussed.


    Discussion/Questions :
    1)how many samples are generated?
    2) isn't the efficacy of the distance function predicated on either the patches themselves being relatively small, or the distance function having some notion of the structure within the patch being measured? Is ssd a sufficient metric for this on large patches?

    ReplyDelete
  2. This paper presents a novel approximate nearest neighbor search algorithm for image patches between images. Nearest neighbor algorithms are used in many high level image editing tools. The proposed algorithm decreases computation costs by an order of magnitude. Two of the observations that were important when creating the algorithm were that in natural images, nearest neighbor patches of contiguous image patches are often close to one another, and that while a single random guess is unlikely to be good, a large amount of random guesses will likely have multiple good guesses. The algorithm works by first initializing all patch matches randomly. Next, two steps are repeated. Propagation causes patches to search areas around patches that are nearby in the source image for better matches. Randomized searches then occur for each patch. As the number of iterations increases, the search radius of the random search decreases.

    Discussion

    1) I'm not clear on what the bottom half of figure 3 is showing.

    ReplyDelete
  3. Summary:

    The paper represents a new randomized algorithm that approximates the nearest neighbor batch correspondence between two regions in images. It consists of two phases: firsts, it starts with a random initial seed for the batch correspondence, then iterates to improve the result, the iterations consists of propagating the new improved matches for the NN and subsampling from the surrounding area to find better matches. The paper demonstrates the algorithm’s efficiency by implementing an interactive editing tool that accepts high level constrains from the users for image retargeting, reshuffling, and completion. Experiments show that the algorithm much faster than the state-of-the-art.


    The algorithm was tested on small images Caltech-256. I wonder how well it preforms on editing full-resolution images.

    ReplyDelete
  4. Abstract:

    The paper presents a new efficient algorithm for nearest neighbor field search that helps in building an interactive tool for image reshuffling, retargeting and completion. In most of the previous works the NNF has been solved via searching over all the possible patch space and improvements were done by using kd trees for fast nearest neighbor search and PCA for dimensionality reduction. However these methods were still too slow to design an interactive tool. The proposed iterative algorithm, is based on two observations, 1) it uses natural structure of image for offset searching 2) It uses large random patch guesses for searching. Thus the algorithm iterates between these two steps and finally finds a good NNF within reasonable time. The algorithm is simple enough to let the user provide some extra constraints that would be followed in the target image. The author thus presents a complete interactive tool for various image editing operations.

    Discussion:

    1) Why do most of the approaches have tried the pixel representation of patch. Has anyone tried representing patch as extracting features and then comparing features? Doing feature extraction should work better than PCA over raw pixels.

    2) Can you please explain the EM algorithm mentioned in the 4th section and is it used with NNF algorithm earlier mentioned or is it for some other image editing operation?

    ReplyDelete
  5. Hole filling in an image can be a complicated task, even for humans. This paper presents nearest-neighbor field search to assist people with image reshuffling and completion. The proposed technique leverages a large number of random patch guesses to search for potential patches off of which to base the completion of an image, presenting a guess quickly enough for use in a human guided system.

    Questions:

    1) The paper puts forward a novel user-interactive system for guided image completion. Have there been any attempts at training agents to learn how to guide an image completion using this style of interface? (For example, training a deep net on how to select and remove glare/lens flare/ scratches on a digitized image by presenting examples of artists using this interface)

    ReplyDelete
  6. This paper gives an approximation to NN search that helps validate correspondence between two regions in images. It relies on the insight that nearby pixels are correlated and that lots of random guesses are much more likely to have good guesses?

    Q:
    Figure 3, bottom row? What is it showing?

    ReplyDelete
  7. In this paper, the authors propose an efficient, randomized algorithm to find approximate nearest neighbor patches that match a given patch, with focus on speed so as to enable interactive structural image editing applications. This is done by defining a function called Nearest Neighbor Fields which encodes the offsets of the centers of the patches from the source image to the target image. The Nearest Neighbor Fields are calculated using a 2 step iterative process involving 1. propagation of good matches to the right and below (and to the top and left in reverse scanline), thus taking advantage of coherence of regions, and 2. a random search in a region of weighted radius around the patch to again find good matches since correct matches exist close to approximate matches with a high probability. They provide both theoretical and empirical analysis of the efficiency of their algorithm. Finally they define the various constraints needed to adapt their algorithm to each of the type of structural image editing applications as well as implementation details.

    Discussion:
    1. The authors don't define the number of images they apply the Nearest Neighbor on. The datasets they use are simply pairs. How can the k in kNN affect their results?
    2. For inpainting, the authors say that the boundaries of the missing regions do not provide many or any constraints in most cases. How does this compare to Prof. Hays' work in data driven inpainting?

    ReplyDelete
  8. Summary:
    This paper improve efficiency and some of the results of several image processing tasks(Texture synthesis and completion, Image retargeting and reshuffling,etc) based on randomized algorithm with possible a few constrains. The key ideas are offsets in the 2-D space are faster and memory efficient to search; natural structure in images are important cue for synthesis algorithms to improve efficiency; The possibility of good match patches can be found with NNF iteratively with propagation on good results and keep random searching by multiple scales of random offsets. For better results search space constraints has to be set and to extend the application of the randomized algorithm, hard constraints(like define the location) has to be set.

    Questions:
    Can you go over step by step how randomized algorithm is used on different problems(completion, retargeting and reshuffling)?

    ReplyDelete
  9. This paper introduces a much faster patch search and match implementation and algorithm. The speed increase is significant enough to allow patch-matching techniques to be used in real time photo editing software. They have some neat videos online where users can do high-level photo manipulation (drag, drop recomposition, image completion, and image targeting). They use a random sampling technique (similar to genetic algorithms I think) to initialize “nearest neighbors” (in prior work nearest neighbors are established through search), and selectively resample based on how successful their original guesses were. They’ve added in constraint capabilities as well. The paper offers a probabilistic theory on max number of random iterations required to converge, which outlines why they achieve a speed increase. They speed increase they achieve is slower for smaller patch sizes.


    Discussion: I’m confused on the line constraint technique. I understand they use the lines to constrain where nearest neighbors for pixels can be drawn from, but I don’t understand how they understand which regions in the new image lie on that line. They mention RANSAC, but I’m not sure what they run it on.

    ReplyDelete
  10. The paper presents an interactive method for finding approximately nearest neighbor between image patches using randomized algorithm. Previous approaches in this field required brute forcing which incurred high computational cost. The basic methodology behind the approach is that random sampling can be used to find a similar patch and then natural coherence can be used to easily find the next similar patches. Computing the approximate nearest neighbor is based on dimensionality of offset, structure of image and ;large number of images.

    Question -
    Can you run through the exact steps of the algorithm for the problem.

    ReplyDelete
  11. PatchMatch
    This paper introduces us to a tool for interactive image editing. An interactive tool requires availability of multiple options for image editing and fast processing so that user can edit the images in real time with trial and error. Most of the image editing algorithms can satisfy only one of these. This paper proposes finding approximate Nearest Neighbor patches to a given patch with a randomized algorithm, which is fast. With this algorithm the tool can be used for image retargeting, image completion and image reshuffling.
    Randomized approximate Nearest Neighbour algo is implemented by choosing random offsets to the patch and then the patch with least "distance" is used to find more patches around it. 4-5 iterations are run instead of a stopping condition. This output along with user constraints can be used for image editing.

    Discussion:
    1. Patch definition: Is the whole patch chosen by user considered as one patch or is it divided into small cubes? If it is former, then is the random search patch also of exact same shape and size?
    2. One interesting question is what to do if one of the random patches is partially out of boundary. Should it be discarded or padded with boundary?

    ReplyDelete
  12. The paper presents a method to quickly find approximate nearest neighbor patches of an image and demonstrates its application in a number of interactive image editing tasks such as image reshuffling, image completion and image retargeting. The algorithm is based on 2 observations: given a random assignment of patches the probability that none of assignments is correct is negligible and that adjacent patches are likely to find adjacent matches in the test image.
    Questions:
    1. What distance metric D(v) is used to evaluate the distance between patches? While evaluating the similarity between the source and target image in Section 4, D(s,t) is defined as SSD in the L*a*b color space. What is the intuition behind using the L*a*b color space?
    2. Towards the end of the paper the authors mention using K nearest neighbors as an extension to their work. I am not clear as to how that might help improve the algorithm.

    ReplyDelete
  13. This paper presents an interactive image editing tool that allows users to do a mix of image recomposition (shuffling objects in an image around), image completion (in-painting), and image retargeting (chaining the image size without distorting the objects in the scene). An important improvement this interface makes to the state of the art is a user interface that allows a person to intuitively constrain the algorithm and correct for bad results. For example, a common issue with seam-carving is that straight lines in the original image can become warped and the image is compressed along one side. The interface allows users to add constraints such as this horizontal line must remain straight in the final results - thus giving the user more control over the output. Thus, the algorithms behind this work must be fast enough to be interactive while also offering the user a lot of control. This is made possible by a new fast patch-patch correspondence matching algorithm. This algorithm attempts to find patches in the same image with high correspondence using an approximate nearest neighbor algorithm. It starts with a random initialization (search), then iteratively improves within a local area (propagation). The algorithm continues to alternate between searching and propagation until convergence.

    Questions:
    1. How well would this work on messy/cluttered images?
    2. Could the interface be improved to assist users? For example, maybe an algorithm could learn from watching experts edit images and then suggest edits for a novice editor to do.

    ReplyDelete
  14. This paper is about nearest neighbour patch matching. It is built for real time strucutal image editing, which would help to do image retargeting and patch matching. They use a patch to patch comparison. Patches initially have random assignments. Then the patches, check the offsets at the previous time and use that to possibly determine new positions to match true. They also use random search which uses a fixed window for candidates whose likelihood exponentially decreases. They run many iterations of searching and propogation till the converge.

    Questions:
    1. All images in the paper seem rather iconic with one major object in the foreground. Was it tested on other images

    ReplyDelete
  15. This paper presents a randomized algorithm for finding approximating nearest neighbor matches for image patches. After initially filling a nearest-neighbor field with some random or predetermined value, the algorithm updates/improves the results through iterations of propagating good matches to the nearest neighbors and then randomly searches the surrounding area for the best match so far. The iterations halt after a fixed number of times which seems to be sufficient for the NNFs to have almost always converged.

    Can you explain the deformation constraints?

    ReplyDelete
  16. Summary
    This paper describes a method of finding approximate nearest neighbour field between two regions in two images. It is done using a randomized, approximation and iterative algorithm. The novelty of this algorithm lies in the fact that it not only provides various interactive tools for users to try while making the edit, but also lets the users see the results in no time making the editing process smoother. This algorithm can be used in variety of applications like image retargeting, image completion, and image reshuffling. The paper aims to explore the mentioned applications on video sequences as a part of future work.
    Questions
    1) I couldn’t understand how deformation constraints can be modelled as constraint optimization problems.

    ReplyDelete
  17. This paper explains a randomized correspondence algorithm for patch matching along with various novel applications. It compares with previously applied methods to the same applications using various data structures and explains how there implementation is more efficient both in terms of processing time and memory consumption. By taking into account that images have context based structural cues embedded, how randomly sampling image patches and searching within neighborhood can always guarantee convergence within a fixed number of iterations has been explained even for images of fairly large size. The paper goes on to explain how there method can be applied to image completion, image retargeting techniques with some user defined constraints.

    Questions-
    1. How many images are taken under consideration for comparison? Is it 2 images always?
    2. How this randomized algorithm works for different applications is still unclear to me.

    ReplyDelete
  18. This paper presents a method for interactively editing images by doing a fast nearest neighbor approximation and adding local structure constraints to it.

    The contributions of the paper are three fold:
    1. They describe a random sampling based approximation nearest neighbor patch matching algorithm.
    2. They allow realtime editing of images.
    3. They employ a deformable constraint model to retarget the image.

    They show results in comparison to other state of the art of the methods.

    Questions:

    Is there any empirical evaluation methodology??

    Could you explain how the initialization to propagation takes place. How do they prune the patches.

    Deformation models are employed with local strucuture using EM with several models. How are these models identified.

    ReplyDelete
  19. The paper describes a method off patch matching by finding an approximate nearest neighbour match for patches in an image. The approach is based on the methodology that random sampling can be used to find a similar patch, and then natural coherence can be exploited to find similar patches.

    Discussion:
    How well does this method respond to variance in rotation and scale between patches?

    Deformation constraints?

    ReplyDelete
  20. This aper talks about ways to achieve image editing through high-level image constraints for operations like image recomposition, targetting, etc. For image patching, they use Nearest Neighbour method to get good image patch correspondences from nearby image space. This method takes advantage of the observation that nearest neighbour patches of contiguous image patches are close in the image space. This means that it is possible to reach a local minima of an error surface by large number of random guesses. Such techniques reduce the computation cost required to perform this operation and then make it possible for this feature to be provided to the user in an interactive way.

    Questions:
    How does the EM algorithm help apply the deformation constraints on the searches? Does this approach work only to preserve straight lines as they talk about initially or can it be generalized to any desired shape?

    ReplyDelete
  21. This paper presents a novel randomized algorithm for matching image patches. By approximating nearest neighbor search with this new algorithm, significant performance gains are achieved. This allows for interactive image patch matching, which was perviously unrealistic due to poor performance.

    Question:
    Has this algorithm ever been adapted to make suggestions for users? For example, by preemptively suggesting improvements instead of acting as a tool for users.

    ReplyDelete