How to do Human Head Segmentation from images?

This page summarizes the projects mentioned and recommended in the original post on /r/computervision

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • U-2-Net

    The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."

  • Background Removal - I'd use u2net which has a model that's specifically trained on people vs backgrounds. If that didn't work, maybe DIS which is the newer version or rembg. These are pretty easy to get running I found.

  • face-parsing.PyTorch

    Using modified BiSeNet for face parsing in PyTorch

  • Segmentation of head / body - I'd either use mediapipe pose and make something cleverly cut where I wanted based on the landmarks, or I'd use pytorch face parsing if you want to be very exact. I found both of these fairly easy to get to run.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 6DRepNet

    Official Pytorch implementation of 6DRepNet: 6D Rotation representation for unconstrained head pose estimation.

  • Well so it sounds like you want to do something like DeepFaceLab? I don't have a lot of experience with that but I believe they collect facial images based on their angles (pitch, roll and yaw) and match and merge them together. So something like this might help you there: https://github.com/thohemp/6DRepNet

  • deepface

    A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python

  • You might also want to categorize using either mediapose's holistic model which includes the face mesh or maybe something that gauges emotion like this: https://github.com/serengil/deepface

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts