patch-based-texture-synthesis icon indicating copy to clipboard operation
patch-based-texture-synthesis copied to clipboard

OOM errors with large example maps

Open sdtblck opened this issue 5 years ago • 0 comments

Hi,

is there a hard limit to the size of the example image?

Consistently getting Out of memory errors with example images larger than around 300 pixels when testing on google colab

Any help would be appreciated :)

Also getting the following error, not sure if it's the cause of the crash or an effect of it:

`modified output size: (2050, 2050, 3) number of patches: 34

/content/patch-based-texture-synthesis/patchBasedTextureSynthesis.py:237: RuntimeWarning: invalid value encountered in true_divide probabilities /= np.sum(probabilities) #normalize so they add up to one


ValueError Traceback (most recent call last)

in () 6 7 pbts = patchBasedTextureSynthesis(exampleMapPath, outputPath, outputSize, patchSize, overlapSize, in_windowStep = 5, in_mirror_hor = True, in_mirror_vert = True, in_shapshots = True) ----> 8 pbts.resolveAll()

1 frames

/content/patch-based-texture-synthesis/patchBasedTextureSynthesis.py in resolveNext(self) 79 #choose random valid patch 80 probabilities = self.distances2probability(dist, self.PARM_truncation, self.PARM_attenuation) ---> 81 chosenPatchId = np.random.choice(ind, 1, p=probabilities) 82 83 #update canvas

mtrand.pyx in numpy.random.mtrand.RandomState.choice()

ValueError: probabilities contain NaN`

sdtblck avatar Apr 22 '20 17:04 sdtblck