FaceX-Zoo icon indicating copy to clipboard operation
FaceX-Zoo copied to clipboard

In face_mask_adding, it made some noise on the image ,when using 'Speed Up' method.

Open luckycaicai opened this issue 3 years ago • 3 comments

original image: image

  1. add mask with "no speed up": image

  2. add mask with "speed up": image

luckycaicai avatar May 27 '21 06:05 luckycaicai

And the noise randomly occurred each time I ran, the follows the results of 4 experiments : image

luckycaicai avatar May 27 '21 06:05 luckycaicai

try using cdef numpy.ndarray[double, ndim=3, mode='c'] image = numpy.zeros((h, w, c), dtype=numpy.double)instead ofcdef numpy.ndarray[double, ndim=3, mode='c'] image = numpy.empty((h, w, c), dtype=numpy.double) at 57th line in FaceX-Zoo/addition_module/face_mask_adding/FMA-3D/utils/cython/render.pyx, then re-compile file

cbwces avatar May 27 '21 11:05 cbwces

try using cdef numpy.ndarray[double, ndim=3, mode='c'] image = numpy.zeros((h, w, c), dtype=numpy.double)instead ofcdef numpy.ndarray[double, ndim=3, mode='c'] image = numpy.empty((h, w, c), dtype=numpy.double) at 57th line in FaceX-Zoo/addition_module/face_mask_adding/FMA-3D/utils/cython/render.pyx, then re-compile file

Thank you very much for your answer, the problem has been solved

luckycaicai avatar May 31 '21 08:05 luckycaicai