recently I started a personal project that uses some Machine Learning techniques in the process, so I'm currently collecting human images with a web scraper. I know that I can use some pre-trained models to verify if there is a human in the picture and segregate it from it's background using a mask algorithm. But besides that, I also need to filter only images with a full human body exposed, and alongside that it would be practical to segment the body into head, torso, legs and feet.

I want to know if anyone know a technique:

  • to classify if the human body is fully shown
  • to segment the full human body into the four parts discussed earlier

I don't know if it's better to focus on a body segmentation algorithm first, and then count if nothing is missing, like if in the picture there is a head, a torso, legs and feet, then it's a full body, or I should first classify if it's a full body picture than segment it.

The first option seams easier, but it can be flawed because if there is two humans in the picture, it is possible that it can segment some body parts of one person and some of the other. Maybe I could first have a counting algorithm to count how many humans there is in the picture? But that also don't sound like a good idea.

Anyway, I'm sorry for the huge question, but feel that it is a very specific problem and I should clarify as much as possible. Thank you for reading it.


1 Answer 1


First problem: I would start with training YOLOv5 model on two categories, full-body and partial-body. You would have to make your own dataset but since with yolo you usually use pretrained models, I guess 200 labeled samples (100 each category) would be enough. I'd recommend ultralytic's implementation of YOLOv5: https://github.com/ultralytics/yolov5

As for second problem, this can be helpful: https://github.com/kevinlin311tw/CDCL-human-part-segmentation

  • $\begingroup$ Thank you so much for your time GKozinski, this is very helpful. $\endgroup$ Oct 17, 2022 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .