Open pyrator opened 2 years ago
yup have the same problem at step 4
Running Stage 4: Blending
Traceback (most recent call last):
File "/home/alex/github/Bringing-Old-Photos-Back-to-Life/Face_Detection/align_warp_back_multiple_dlib.py", line 428, in
same error, did anyone have any solution to this ?
Yeah check the last line of my original message. It says which line to change and what to change it to.
On Mon, 15 May 2023, 08:32 Anshu1882000, @.***> wrote:
same error, did anyone have any solution to this ?
— Reply to this email directly, view it on GitHub https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life/issues/231#issuecomment-1547333178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUZPLGG6Z3MRZPLLCI7E7TXGHLYPANCNFSM5WTLLGPQ . You are receiving this because you authored the thread.Message ID: @.*** com>
Running run.py with parameters --with_scratch --HR --GPU 0 on Windows 11, Python 3.9, numpy 1.22.4 gives Traceback (most recent call last): File "D:\Users\theke\python projects\BringingOldPicturesBackToLife\Bringing-Old-Photos-Back-to-Life\Face_Detection\align_warp_back_multiple_dlib_HR.py", line 428, in
blended = blur_blending_cv2(warped_back, blended, backward_mask)
File "D:\Users\theke\python projects\BringingOldPicturesBackToLife\Bringing-Old-Photos-Back-to-Life\Face_Detection\align_warp_back_multiple_dlib_HR.py", line 219, in blur_blending_cv2
mask *= 255.0
numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'
Fix is to change line 219 in def blur_blending_cv2(im1, im2, mask): from mask = 255.0 to mask = (mask 255.0)