patrikhuber / 4dface

Real-time 3D face tracking and reconstruction from 2D video
https://www.4dface.io
Apache License 2.0
793 stars 248 forks source link

Face-detection performance #45

Closed cogito666 closed 6 years ago

cogito666 commented 6 years ago

Hello Patrik Huber,

Thank you for sharing your work. I just compiled 4dface and applied it on a few videos. But it seems that it has some performance issue for detecting a face. Can I get some instruction for improving?

patrikhuber commented 6 years ago

Hi,

Thanks!

The demo uses the plain old OpenCV face detector for face detection, so indeed it might not be too good anymore in some scenarios. You could substitute it for anything else if you wanted to. In case you are interested in a commercial solution, my company has a much better face detector available to customers - in that case, just drop me an email to get in contact.

cogito666 commented 6 years ago

Thanks for fast replay.

One more question. Is there any way to get the video with 3d face fitted? (stored as a video)

Thanh-Binh commented 6 years ago

Patrik: what are the differences between commercial solution and OpenSuorce ones?

patrikhuber commented 6 years ago

@cogito666 Do you mean fitting to video? I think -i can also take video files, cv::VideoCapture can handle webcam and video file input. If you mean storing the output as a video, you can use cv::VideoWriter or save individual images with cv::imwrite. I recommend you google and read an OpenCV tutorial.

@Thanh-Binh We have an improved face detection, facial landmark detection, an improved full-head 3DMM, and (soon but not released yet) improved fitting. Feel free to drop me an email for some more information.

cogito666 commented 6 years ago

@patrikhuber Thanks for your suggestion. I tried VideoWriter of OpenCV. But it's not working.

The error: OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x00000021/'!???'

Already check stackoverflow about it. But there's no clear answer about it. hmm... Would you recommend some other library for it? I am a newbie in OpenCV.

patrikhuber commented 6 years ago

@cogito666 The message you get might say that h264 doesn't like the .mp4 extension - have you tried .mkv? In any case, this is indeed not related to eos and something that you need to find out by yourself or maybe with some other help site like StackOverflow. It shouldn't be too hard, and OpenCV is definitely the right tool for that. Good luck! :)

I'm going to close this, as I think there is no real issue left.