Using obs studio command line
Another 11 points are calculated to form the head points, and then catmull rom smoothing is performed to smooth out the contours. This transform can be used to render 3D objects in the scene that track the head movement.įace Morphing The 68 landmark points are used to subdivide the video quad into a mesh. This Dlib object tracking method takes an arbitrary rectangle in an image and follows it.įacial Landmarks Given a rectangle that locates a face, we can then use Dlib's landmark detection algorithm which uses a trained regression tree solver to find 68 2D facial landmark points, corresponding to the Multi-PIE definition (see links below).ģD Pose Estimation A subset of key points are taken from the 2D facial landmark points, and using 3D points for an arbitrary rest pose, we use openCV's solvePnP method to obtain a 3D transformation. Tracking Once we have detected the faces we then use a cheaper method of object tracking to follow the face. HOG's are trained feature descriptors used for detecting objects. The process of face detection consists of four main operations:įace Detection The faces are detected using the histogram of oriented gradients method (HOG) in Dlib. It consumes frame data from the circular buffer, does the face detection computation, then feeds the resulting face data to a circular buffer that is consumed by the rendering.
The face detection portion runs in its own thread. According to the user's parameters, the current faces are rendered.Using smoothing algorithms, the current state of faces is updated.Receive new face detection data from another circular buffer fed by the face detection thread.Make 3 copies of the current frame, and add them to a circular buffer to be consumed by the face detection thread.The plugin portion performs the following duties: The face detection runs in its own thread, separate from OBS. It can be broken down into 2 main parts the plugin, and the face detection. You can also modify the CMakeLists to copy the files to a desired location with each build. You can copy the files in manually, or set up symbolic links so you can easily hit F5 and debug from Visual Studio.
#Using obs studio command line code
If you are going to debug facemask code make sure to build it as RelWithDebInfo configuration. For example, if you built your files in the build64 folder:īuild64/distribute/slobs/RelWithDebInfo/obs-plugins
You can now compile the plugin, which will give you a distribution folder structure that mimics the structure in slobs. Once you have successfully configured and generated your Visual Studio project with cmake, you can open the facemask-plugin.sln file in Visual Studio. I don't reccommend using these libs for this reason. Keep in mind that dlib links dynamically with these libs, so the MKL and TBB dlls will need to be found by slobs when it runs (for instance, by copying them into the slobs-client folder). If you have the Intel Math Kernel Library installed on your system, you might have DLIB_USE_BLAS or DLIB_USE_LAPACK turned on. PATH_OBS_STUDIO Path to the obs-studio folder.īUILD_SLOBS - Distributes to slobs instead of OBS Studio When you hit CONFIGURE, you will get errors on fields you need to fill in:
You can also handle this by setting ENABLE_UI to OFF in CMakeLists in the obs-studio folder.
#Using obs studio command line install
Note: You do not need to install Qt5 as a dependency, just make sure ENABLE_UI in CMake GUI is not checked before Configure/Generate.