79222065

Date: 2024-11-25 07:42:17
Score: 0.5
Natty:
Report link

Thanks to Christoph Rackwitz's hint, and by adding this line of code to the read_image_for_rectify function

img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

mediapipe gives the same result like the first case.

def read_image_for_rectify(address: str) -> Dict:
    face_object = dict()
    img = cv2.imread(address)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    _, buffer = cv2.imencode(".jpg", img)
    img = base64.b64encode(buffer).decode()
    face_object["image"] = img
    face_object["address"] = address
    return face_object

But yet could not detect landmarks for some images like

7

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: BarzanHayati