deepfakes / faceswap-playground

User dedicated repo for the faceswap project
306 stars 194 forks source link

feature request: place actual name of extracted image in .png file #208

Closed kellurian closed 5 years ago

kellurian commented 6 years ago

Please forgive any ignorance, but this is something that deepfacelab does by placing the extracted name in the alpha channel so the "rename" portion of the sort tool can change the name of the file, yet it still retains its actual name embedded in the file for later conversion, or at least it is what is said as I haven't been able to really get deepfacelab to work to train. But it sorts great. Renaming the files is a lot easier than working with folders. Just a thought.

gessyoo commented 6 years ago

kellurian, iperov's DFL stores the facial landmarks in the alpha channel of each .png file, and so no .json file is needed. The issue was raised here: https://github.com/deepfakes/faceswap/issues/397 (closed). If I recall the discussion correctly, it was decided not to implement this feature because it would break compatibility for people using .jpg files, which can't store the facial landmarks in the same way that .png files can. I don't know if the coders will re-visit the issue at some point.

torzdf commented 6 years ago

The other issue with embedding is that you HAVE to keep the faces around for conversion. With an alignments file, the faces can be deleted once the alignments file is generated.

It is certainly something we may revisit, but it isn't something high up on the agenda. It may be simpler to look at logging sort tool changes, so that filenames can be changed back after review.

kilroythethird commented 6 years ago

As a fallback for jpgs saving it in the EXIF data might be a way to go. Ie:

torzdf commented 5 years ago

Alignment files now contain the hash of the image, so the faces can be renamed just fine, and the process will still find them.