PatchMatch icon indicating copy to clipboard operation
PatchMatch copied to clipboard

fix propagation and speed up using numba

Open gdussert opened this issue 5 years ago • 4 comments

Hey,

I think the implementation of the propagation is wrong. I fixed it and I used numba to speed up the script.

It works better and it is much faster now. You can still use it without numba if you remove all "@jit(nopython=True)"

Hope it helps

gdussert avatar Jan 26 '21 19:01 gdussert

@Gasp34 can you explain what you found to be wrong? also I get an error for even p_size although it is used in the paper.

eyaler avatar Jan 04 '22 21:01 eyaler

I don't remember exactly but if you read the original PatchMatch paper and look at the implementation of the propagation in this repo you will see that it is not done correctly.

One good way to see that there is a problem is to test an image again itself and you will see that the offset map is not 0...

Have you tried with my fix ?

gdussert avatar Jan 05 '22 12:01 gdussert

i tried both. i can confirm the even p_size happens also without your fix. I didn't do sanity testing but I can confirm I get similar results with your method but considerably faster. thanks!

eyaler avatar Jan 05 '22 16:01 eyaler

I think you'll need to make a lot of modification and testing to make it work with even p_size

gdussert avatar Jan 05 '22 16:01 gdussert