MarekKowalski / FaceSwap

3D face swapping implemented in Python
MIT License
732 stars 206 forks source link

Tracking breaks with multiple faces #10

Open samhains opened 6 years ago

samhains commented 6 years ago

Hey!

tracking breaks when attempting to track multiple faces on the stable/fast faceswap-DAN. To get multiple faces to work properly you have to recalculate every scene. (I'm attempting to swap a face.jpg with all of the faces in a scene)

Here is the modifications I made to get multiple faces working (and swapping), although it becomes extremely slow - definitely not realtime:

https://gist.github.com/samhains/648ec70aab3d5a47920c95c5e0960ee3

Anyone have ideas on fixing this in a more performant way?

MarekKowalski commented 6 years ago

Hi,

Sorry for taking a while to answer. I suspect your version is very slow because you run the face detection in every frame. If you want it to run quicker, I suggest you only perfom detection "once in a while" or in a background thread.

Marek