Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cast error - line 219 in align_warp_back_multiple_dlib.py, using Python 3.10.12 #291

@robtow

Description

@robtow

Fresh install of the repo, and using a venv with Python 3.10.12:

Running Stage 4: Blending
Traceback (most recent call last):
  File "/home/rob/Bringing-Old-Photos-Back-to-Life/Bringing-Old-Photos-Back-to-Life/Face_Detection/align_warp_back_multiple_dlib.py", line 428, in <module>
    blended = blur_blending_cv2(warped_back, blended, backward_mask)
  File "/home/rob/Bringing-Old-Photos-Back-to-Life/Bringing-Old-Photos-Back-to-Life/Face_Detection/align_warp_back_multiple_dlib.py", line 219, in blur_blending_cv2
    mask *= 255.0
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'

Fix at line 219 in align_warp_back_multiple_dlib.py

    #mask *= 255.0
    mask = mask * 255.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions