faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

discard frames not containinf faces not working

Open fetchlister opened this issue 8 years ago • 5 comments

I am trying to lean out my deepfake creation time by killing off the frames that don't have faces during the convert, but from everything I've read I seem to be doing it corrently (I assume) but I'm getting no results - all frames are output.

heres a sample command: python faceswap.py convert -b 15 -e 10 -i ~/Desktop/VLC/ -o '/home/luke/Desktop/VLC2' -fr 0001-10758 -d -v -m '/home/luke/Videosdeepfakes/MODEL'

Any Ideas?

fetchlister avatar May 14 '18 01:05 fetchlister

Hey,

The -d option discards frames not within the range given by -fr.

Do you mean that it outputs more frames than 0001-10758? i.e. do you have more frames in the input folder and it copies all of them to the output folder?

AbysmalBiscuit avatar May 14 '18 07:05 AbysmalBiscuit

No I'm saying it isn't discarding anything at all. i want it to discard all frames with no faces from the entirety of the source folder - ie the whole clip. What command should i use to output only those frame with faces?

fetchlister avatar May 15 '18 08:05 fetchlister

There's no such option. If no faces are found in a frame, it's just copied as-is. If you don't want them, remove them from the source.

Kirin-kun avatar May 15 '18 17:05 Kirin-kun

You can, but I've never really seen the point (nor used it, so can't be sure if it works correctly).

Frames that don't have faces will not be converted anyway, assuming that you have an alignments.json, so they are just copied 'as is', so really shouldn't slow the process down.

In terms of the -fr and -d option. The above code: -fr 0001-10758 -d

Means that you want to process all frames in the range 0001-10758. I assume that this is your entire dataset, so that will have no effect. You are effectively telling it to process the entire range.

Let's say you just wanted to process frames 100-300, you would put: -fr 0100-0300

This would faceswap on those faces and frames 0001 to 0099 and 0301-10758 would be written out as is. If you added in the -d flag then the frames outside of the range that you have specified would just be skipped altogether.

As @Kirin-kun says, if you're going to identify frames without faces for passing into the command line, then you might as well just remove them from source.

torzdf avatar May 15 '18 17:05 torzdf

It would be possible to identify frames without faces by parsing the alignments.json file. There is no tool to do that, currently, although I started working on one that did various actions based on the content of the file. When I've finished my GUI revamp, I may revisit it.

torzdf avatar May 15 '18 17:05 torzdf