Log in

View Full Version : face detection and blur


hydra3333
15th March 2016, 10:43
Hello. A school video was shot and compiled and then a mum unfortunately withdrew permission for a child to be filmed. The video was all ready to go :(

Is there a way to detect and blur a specific face ? It is in a number of scenes and moves around a bit during a few of them.

Suggestions welcomed.

(Source clips were compiled/edited using Nero Video 2015, so even suggestions/links on how to do it in that would be very welcome ... time pressure).

StainlessS
16th March 2016, 00:23
Mobile:
What you want is very advanced and unlikely to get any kind of good +ve response that actually works.
Perhaps one of the Adobe things has something that allows manual identification,but any kind of auto solution is I am betting well beyond avisynth, because it is so specialised and more in the forensic arena.

EDIT: 20 years from now it would be commonplace, right now it is probably only in the domain of TV networks.
For years speech recognition and face recogniton were something that could only be dreamed of, well they
seem to have gotten better at both but I bettin its gonnna cost ya if you too want it.

I would love to be proved wrong on above, if you know of 'summick' (something) that does any of the above, please tell.

EDIT: Auto language translation was also a wild dream, but they seem to have cracked that
(have you tried Google Translate, quite awesome the advances).
[way back when, I only had one KB of memory, them there guys lookin so smug have got a bit more now,
even my totally old core 2 duo has 4 million times the memory of my 1st computer and 2400 times the power. <well, clock speed>].

hydra3333
16th March 2016, 10:18
OK. Thank you.
Had to make do with "nero video". For posterity, like this:
drop a clip in the timeline = c1.
add same clip to video "above" it = c2
position to start of c2
crop c2 to show a chosen face (l,r,t,b)
add a blur filter which is an ugly square
then tick "keyframes" so it adds a start and end keyframe to the clip with the same crop size
add individual "keyframes" at strategic intervals where each linear movement of the face finishes
then position on each keyframe and adjust the crop (l,r,t,b) to the prevailing size of the face at that point
go to the start of the clip and play - the crop and blur do track and resize linearly from ketframe to keyframe
limits:
- manual picking of keyframes by eye, since it tracks in a straight line from keyframe to keyframe
- ugly square blur with hard edges
- extremely manual process - (l,r,t,b) have to be manually entered using guessing, so it takes 4 to 5 attempts per keyframe

A few links from searching:

http://zulko.github.io/moviepy/cookbook/blurred_face.html
This seems to be a start, however it's manual identification of a face location in each frame and I don't think moviepy and its dependencies are open source.

https://bbs.archlinux.org/viewtopic.php?id=206001
apparently ffmpeg ?

http://www.neurotechnology.com/nveiler-video-filter.html
a non-free vdub filter

https://facedetection.com/
https://facedetection.com/software/
http://deteksiwajah.blogspot.com.au/
Face Detection Software - includes source code

Interestingly, some raspberry pi articles.
https://www.youtube.com/watch?v=vRHoQVZLvoM
https://www.raspberrypi.org/blog/facial-recognition-opencv-on-the-camera-board/
https://www.raspberrypi.org/blog/tag/facial-recognition/

https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/face_detection/
http://docs.opencv.org/2.4/modules/contrib/doc/facerec/index.html

It exists for kids of all ages to play with.
I wonder if it's possible to develop a plugin from the opencv code. (Yes I may consider having a go one day in the far distant future.)

hydra3333
16th March 2016, 10:52
This looked interesting
https://github.com/AbsoluteDestiny/scenic
python script calling avisynth and then using openCV to search for faces

my goodness, a filter using opencv ?
http://forum.doom9.org/showthread.php?t=154010
https://sourceforge.net/projects/avisynthtrackin/

StainlessS
16th March 2016, 11:06
There is this, but probably not of much use, very basic.
http://forum.doom9.org/showthread.php?p=1692006&highlight=RT_RGBInrange#post1692006

johnmeyer
16th March 2016, 15:48
Here's a link to a very powerful tool that will do exactly what you want:

Fusion 7 (https://www.blackmagicdesign.com/products/fusion)

Scroll down the page until you see the "Download" button for "Fusion 7."

It will do exactly what you want, and do it very well. The only downside is that it has a pretty steep learning curve.

It's amazing that they made this free. It used to cost $1,000, and that's what they charge for their current version.

StainlessS
16th March 2016, 17:44
Thank you John, gonna grab that and the Beta 8 version too.

Would you happen to know if Blender can do the facial blurring out thing too, I just noticed that blender was updated Nov 2015 to 2.76b.
https://en.wikipedia.org/wiki/Blender_%28software%29

hydra3333
17th March 2016, 11:52
My goodness I'll be hurrying there too.
not sure if this makes any difference to the "free version" usefulness, wait and see I suppose.
Optical Flow analysis for generating forward and back vectors No

johnmeyer
17th March 2016, 20:38
Would you happen to know if Blender can do the facial blurring out thing too, I just noticed that blender was updated Nov 2015 to 2.76b.
https://en.wikipedia.org/wiki/Blender_%28software%29I've never used blender.

Also, I did install Fusion, but only for a few days. It was really tough for me to wrap my head around, and I never quite picked up on the user interface. This very well might be a problem specific to me, but I think I can say that even for other people, it has a pretty steep learning curve. However, I've seen examples of what other people have done with it, and they are pretty impressive results.

Quake1
18th October 2016, 07:12
Hi, it is very easy to blur face in video (https://showmore.com/blur-face-video.html). You just need to use the right tools. There are many kinds of video editing tools on the internet right now. You may search for and try them.

captaiŋadamo
18th October 2016, 18:45
Hi, it is very easy to blur face in video. You just need to use the right tools. There are many kinds of video editing tools on the internet right now. You may search for and try them.

Can you actually list some of them for the OP so that your post is actually helpful?

FranceBB
18th October 2016, 23:06
When we generally have to typeset signs which move at an inconstant speed, we use Mocha, a software meant to track down specific objects. I have never tried it with a face, to be fair, but I think it should be able to track it as well.

raffriff42
19th October 2016, 00:32
(Source clips were compiled/edited using Nero Video 2015, so even suggestions/links on how to do it in that would be very welcome ... time pressure).Motion tracking might help a little, but when the child turns his head, moves behind someone else, etc. the tracking will probably fail, requiring manual intervention.

So manual tracking along with keyframe animation should work just as well as motion tracking in this case. Your Nero Video supports keyframe animations.
https://neroknowhow.com/tag/keyframes/?langfrom=zh-hans
http://forum.nero.com/nero_eng/topics/how_do_you_blur_part_of_the_video_frame_in_nero_video_14

You might as well use the tool you already know.

goorawin
19th October 2016, 11:40
Another free one, if you want to learn something new, is Aviult.
This is an amazing bit of software, it's just so powerful. Look on the web to get an idea of what it can do.
Like
https://www.youtube.com/watch?v=JqpD7HO2nW4

Tracking it does well and how it does layers which is very different to other software, makes it so powerful.

The main problem is the base software was written in Japanese but there is now an English version.

I have used it for a number of things that could only be done on very expensive software.

At first it is very strange to use but once you get the hang of it things fall into place. If you like a challenge it could be worth while for the many other things it offers. Its also avs compatible. There are many Tutorials on the web, which could help.