Closed iperov closed 6 years ago
I making one file FaceLandmarksExtractor.py @Clorr is normally to include 95mb model file inside py (and mmod_human_face_detector.dat) and save it to os.getcwd() if not exists, and use it?
Thanks for this initiative ;-)
I'll check how we can download the h5 model file automatically, maybe with something like face-recognition-models
@Clorr nevermind about models, they can be in lib\FaceLandmarksExtractor\ dir inside this repo
super problem ! When Keras model loaded, I cannot use dlib_cnn_face_detector OOM error:
>>>dlib_cnn_face_detector(image,1)
Traceback (most recent call last):
File "<console>", line 1, in <module>
RuntimeError: Error while calling cudaMalloc(&data, new_size*sizeof(float)) in file D:\FaceSwapTorrent\FaceSwap\_internal\bin\dlib\dlib\dnn\gpu_data.cpp:195. code: 2, reason: out of memory
but fixed :)
also Keras implementation of face_alignment x1.5 - x2 times faster
Be sure that you merge with @oatssss changes. He changed the format of alignment file. https://github.com/deepfakes/faceswap/issues/208#issuecomment-368715218
Why ? I fork current commit.
He added a feature. If user deletes a false-positive face, it's entry alignment.json gets skipped during convert. For it to work he did some changes which will be merged with master soon
Maybe it doesn't conflict with your work but it's better to check.
@Apollo122 welcome to test https://github.com/deepfakes/faceswap/pull/228
Closing this as it is merged
I made port main network, not all program yet. 2DFAN-4.h5 - 95mb Output almost equal , average element-wise diff 3e-09
Problem is only loading model takes 23.6sec
predict times: predict takes = 2.329133sec (first long) predict takes = 0.074004sec predict takes = 0.080004sec
model.summary() :