{"action":"created","issue":{"url":"https://api.github.com/repos/deepfakes/faceswap/issues/228","repository_url":"https://api.github.com/repos/deepfakes/faceswap","labels_url":"https://api.github.com/repos/deepfakes/faceswap/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/deepfakes/faceswap/issues/228/comments","events_url":"https://api.github.com/repos/deepfakes/faceswap/issues/228/events","html_url":"https://github.com/deepfakes/faceswap/pull/228","id":300910396,"number":228,"title":"port 'face_alignment' from PyTorch to Keras.","user":{"login":"iperov","id":8076202,"avatar_url":"https://avatars1.githubusercontent.com/u/8076202?v=4","gravatar_id":"","url":"https://api.github.com/users/iperov","html_url":"https://github.com/iperov","followers_url":"https://api.github.com/users/iperov/followers","following_url":"https://api.github.com/users/iperov/following{/other_user}","gists_url":"https://api.github.com/users/iperov/gists{/gist_id}","starred_url":"https://api.github.com/users/iperov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iperov/subscriptions","organizations_url":"https://api.github.com/users/iperov/orgs","repos_url":"https://api.github.com/users/iperov/repos","events_url":"https://api.github.com/users/iperov/events{/privacy}","received_events_url":"https://api.github.com/users/iperov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-02-28T06:46:40Z","updated_at":"2018-03-03T15:36:02Z","closed_at":"2018-03-01T10:32:12Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/deepfakes/faceswap/pulls/228","html_url":"https://github.com/deepfakes/faceswap/pull/228","diff_url":"https://github.com/deepfakes/faceswap/pull/228.diff","patch_url":"https://github.com/deepfakes/faceswap/pull/228.patch"},"body":" It works x2 faster, but initialization takes 20secs.\r\n\r\n2DFAN-4.h5 and mmod_human_face_detector.dat included in lib\\FaceLandmarksExtractor\r\n\r\nfixed dlib vs tensorflow conflict: dlib must do op first, then load keras model, otherwise CUDA OOM error\r\n\r\nif face location not found by CNN, its try to find by HOG.\r\n\r\nremoved this:\r\n-        if face.landmarks == None:\r\n-            print(\"Warning! landmarks not found. Switching to crop!\")\r\n-            return cv2.resize(face.image, (size, size))\r\nbecause DetectedFace always has landmarks"},"comment":{"url":"https://api.github.com/repos/deepfakes/faceswap/issues/comments/370156282","html_url":"https://github.com/deepfakes/faceswap/pull/228#issuecomment-370156282","issue_url":"https://api.github.com/repos/deepfakes/faceswap/issues/228","id":370156282,"user":{"login":"qazasds","id":31149053,"avatar_url":"https://avatars2.githubusercontent.com/u/31149053?v=4","gravatar_id":"","url":"https://api.github.com/users/qazasds","html_url":"https://github.com/qazasds","followers_url":"https://api.github.com/users/qazasds/followers","following_url":"https://api.github.com/users/qazasds/following{/other_user}","gists_url":"https://api.github.com/users/qazasds/gists{/gist_id}","starred_url":"https://api.github.com/users/qazasds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qazasds/subscriptions","organizations_url":"https://api.github.com/users/qazasds/orgs","repos_url":"https://api.github.com/users/qazasds/repos","events_url":"https://api.github.com/users/qazasds/events{/privacy}","received_events_url":"https://api.github.com/users/qazasds/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T15:36:02Z","updated_at":"2018-03-03T15:36:02Z","author_association":"NONE","body":"Hello, I have two questions after this PR being merged:\r\n1. -D option seemed to be ignore, I specified faceswap convert -D hog but cnn still used.\r\n2. I tried to disable cnn for face detection because of the following error. It happened to convert but extract was good:\r\n\r\nFailed to convert image: /PATH/faceb/d004020.png. Reason: Error while calling cudnnCreate(&handles[new_device_id]) in file /home/xxxx/dlib/dlib/dnn/cudnn_dlibapi.cpp:104. code: 4, reason: A call to cuDNN failed\r\n^CTraceback (most recent call last):\r\n  File \"/home/xxxx/faceswap1/scripts/convert.py\", line 177, in convert\r\n    for idx, face in faces:\r\n  File \"/home/xxxx/faceswap1/lib/cli.py\", line 126, in get_faces\r\n    for face in faces:\r\n  File \"/home/xxxx/faceswap1/lib/faces_detect.py\", line 4, in detect_faces\r\n    fd = FaceLandmarksExtractor.extract (frame, True if model == \"cnn\" else False )\r\n  File \"/home/xxxx/faceswap1/lib/FaceLandmarksExtractor/FaceLandmarksExtractor.py\", line 138, in extract\r\n    initialize(scale_to)\r\n  File \"/home/xxxx/faceswap1/lib/FaceLandmarksExtractor/FaceLandmarksExtractor.py\", line 120, in initialize\r\n    dlib_cnn_face_detector ( np.zeros ( (scale_to, scale_to, 3), dtype=np.uint8), 0 ) \r\nRuntimeError: Error while calling cudnnCreate(&handles[new_device_id]) in file /home/xxxx/dlib/dlib/dnn/cudnn_dlibapi.cpp:104. code: 4, reason: A call to cuDNN failed\r\n"}}
{"actor":{"display_login":"qazasds"}}