METHOD FOR TRANSFER OF A STYLE OF A REFERENCE VISUAL OBJECT TO ANOTHER VISUAL OBJECT, AND CORRESPONDING ELECTRONIC DEVICE, COMPUTER READABLE PROGRAM PRODUCTS AND COMPUTER READABLE STORAGE MEDIUM
The disclosure relates to a method for transferring a style of a reference visual object to an input visual object. According to an embodiment, the method includes finding a correspondence map assigning to a point in the input visual objet a corresponding point in the reference visual object, the finding of a correspondence map comprising spatially adaptive partitioning of the input visual object into a plurality of regions, the partitioning depending on the reference and input visual objects. The disclosure also relates to corresponding electronic device, computer readable program product and computer readable storage medium.
1 . A method for transferring a style of a reference visual object (E) to an input visual object (I), wherein the method comprises finding a correspondence map ϕ assigning to at least one pixel x in the input visual object a corresponding pixel ϕ(x) in the reference visual object, said finding of a correspondence map ϕ comprising:
quadtree splitting of said input visual object (I) into a plurality of regions Ri, delivering, for at least one region Ri, a set of K candidate labels Li, representing region correspondences between said input visual object (I) and said reference visual object (E); and
obtaining a reduced set of K candidate labels ̂L by using an inference model of Markov Random fields (MRF) type, wherein said MRF inference model is solved by approximating a Maximum a Posteriori using a loopy belief propagation type method, delivering the approximate marginal probabilities for at least one variable of the MRF model.
2 . (canceled)
3 . The method of claim 1 , wherein the stopping criteria for said quadtree splitting depends on a region similarity between the input and reference visual objects.
4 . (canceled)
5 . The method of claim 3 , wherein said region similarity is computed according to a distance between vector representation of a region in the input visual object and vector representation of a region in the reference visual object.
6 . The method of claim 3 , wherein, for a region Ri for which the stopping criteria is verified, a set of candidate labels is selected by computing the K-nearest neighbors of a region in said reference visual object E corresponding to said region Ri.
7 . (canceled)
8 . The method of claim 1 , wherein finding a correspondence map ϕ comprises replacing at least one region Ri of the input visual object by an corresponding region of said reference visual object, delivering at least one replaced quadtree region Ri.
9 . The method of claim 1 , wherein finding a correspondence map ϕ comprises applying a bilinear blending on at least one of said replaced quadtree region.
10 . The method of claim 9 , wherein bilinear blending comprises, for a replaced quadtree region:
obtaining an overlapping quadtree by increasing the size of said replaced quadtree region by an overlap ratio;
computing a blended pixel u′(x) in the output visual object as a linear combination of at least two overlapping intensities at x.
11 . The method of claim 1 , wherein finding a correspondence map ϕ comprises, for at least one region Ri, selecting ( 532 ) corresponding region of said reference visual object, wherein said selecting ( 532 ) takes into account the size, the color and/or the shape of said region Ri of said input visual object and/or the size, the color and/or the shape of the corresponding region of said reference visual object.
12 . The method of claim 1 , wherein a visual object corresponds to an image or a part of an image or a video or a part of a video.
13 . An electronic device comprising at least one memory and one or several processors configured for collectively transferring a style of a reference visual object to an input visual object, wherein said one or several processors are configured for collectively:
finding a correspondence map ϕ assigning to at least one pixel x in the input visual objet a corresponding pixel ϕ(x) in the reference visual object, said finding of a correspondence map ϕ comprising:
quadtree splitting of said input visual object (I) into a plurality of regions Ri, delivering, for at least one region Ri, a set of K candidate labels Li, representing region correspondences between said input visual object (I) and said reference visual object (E); and
obtaining a reduced set of K candidate labels AL by using an inference model of Markov Random fields (MRF) type, wherein said MRF inference model is solved by approximating a Maximum a Posteriori using a loopy belief propagation type method, delivering the approximate marginal probabilities for at least one variable of the MRF model.
14 . A non-transitory computer readable program product, comprising program code instructions for performing, when said non-transitory software program is executed by a computer, a method for transferring a style of a reference visual object (E) to an input visual object (I), wherein the method comprises finding a correspondence map ϕ assigning to at least one paint pixel x in the input visual object a corresponding pixel ϕ(x) in the reference visual object, said finding of a correspondence map ϕ comprising:
obtaining a reduced set of K candidate labels ̂L by using an inference model of Markov Random fields (MRF) type, wherein said MRF inference model is solved by approximating a Maximum a Posteriori using a loopy belief propagation type method, delivering the approximate marginal probabilities for at least one variable of the MRF model.
15 . A computer readable storage medium carrying a software program comprising program code instructions for performing, when said non-transitory software program is executed by a computer, a method according to claim 1 .
16 . The electronic device of claim 13 , wherein the stopping criteria for said quadtree splitting depends on a region similarity between the input and reference visual objects.
17 . The electronic device of claim 16 , wherein said region similarity is computed according to a distance between vector representation of a region in the input visual object and vector representation of a region in the reference visual object.
18 . The electronic device of claim 16 , wherein, for a region Ri for which the stopping criteria is verified, a set of candidate labels is selected by computing the K-nearest neighbors of a region in said reference visual object E corresponding to said region Ri.
19 . The electronic device of claim 13 , wherein finding a correspondence map ϕ comprises replacing at least one region Ri of the input visual object by a corresponding region of said reference visual object, delivering at least one replaced quadtree region Ri.
20 . The electronic device of claim 13 , wherein finding a correspondence map ϕ comprises applying a bilinear blending on at least one of said replaced quadtree region.
21 . The electronic device of claim 13 wherein bilinear blending comprises, for a replaced quadtree region:
obtaining an overlapping quadtree by increasing the size of said replaced quadtree region by an overlap ratio;
computing a blended pixel u′(x) in the output visual object as a linear combination of at least two overlapping intensities at x.
22 . The electronic device of claim 13 , wherein finding a correspondence map ϕ comprises, for at least one region Ri, selecting a corresponding region of said reference visual object, wherein said selecting takes into account the size, the color and/or the shape of said region Ri of said input visual object and/or the size, the color and/or the shape of the corresponding region of said reference visual object.
23 . The electronic device of claim 13 wherein a visual object corresponds to an image or a part of an image or a video or a part of a video.