PySkinDetection
Skin detection using Watershed and HSV/YCbCr colorspaces,
Install / Use
/learn @Jeanvit/PySkinDetectionREADME
Skin detection algorithm
A quick research on the internet shows that color segmentation is widely used for skin detection (specifically using HSV and YCbCr colorspaces), mostly by its simplicity and performance. However, skin tone, illumination, and quality are something that could drastically vary between images. For instance, Kolkur et. al (2016), and Sha et. al (2009) studied that kind of skin segmentation and discovered completely different optimal thresholds values.
Then, I decided to search for other methods and found this paper written by Saxen and Al-Hamadi (2014) which shows that region based gives a better output for skin detection tasks.
Here, a region-growing algorithm (Watershed) and a combination of HSV and YCbCr color segmentations work together to produce the output.
How to use
This project was implemented using Python (3.10) and OpenCV (4.6). The class SkinDetector, available inside skinDetector.py, must be imported into your project and be used as follows:
from src.skinDetector import SkinDetector
detector = SkinDetector(image_path = "path/to/image")
detector.find_skin()
detector.show_all_images()
Running:
Linux
-
If you do not have python3 installed:
sudo apt-get install python3 python3-pip -
Go inside the project folder and run
pip3 install -r requeriments.txt -
Usage of the test app:
python3 app.py imageName. For using the image inside the testImages use:python3 app.py testImages/f2.jpg
Results (output)

Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
83.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
339.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
