If that 1st image is an example of your input images, you should bring the camera closer to fill the frame with the subject. That will help. If you still have trouble you will need to mask out the background. You can do that automatically by taking a photo of the background without the head in it, but the moving shadows might not get masked properly