This program is a simple machine learning implementation in Java for detecting skin pixels.

Overview

Skin Detector 👨 👩

Detects human skin from images

This program is a simple machine learning implementation in Java for detecting skin pixels.

How to run?

1. Enter the file name in name variable for testing.
2. Put the test image file in testImages folder.
2. The project contains 2 database set, database and ibdb. 
3. The output folder contains the result pictures.

How it works?

We have used Naive Bayes here for classification (skin or non-skin pixel). As it is a colour image there are 256*256*256 types of pixels.

In the training function, pixel frequencies of being skin or non-skin is calculated. 
We take every pixel of the image and see if it is a pixel of skin by using the mask 
(when using ibtb folder, masks have skin pixels and white pixels, 
and in database folder, the masks contain white pixels in the places of skin tone & other pixels are black)
If the pixel is on skin, we increase its skin-frequency. 
Else we increase the non-skin-frequency. 
After processing all images, probability of a skin-pixels is calculated from the frequency using Bayes Theorem. We store this data in a file.

During testing, we simply map each pixel with the probability we calculated in training phase. 
If the probability is greater than a certain threshold, we mark that pixel as skin.

Sample Testing

Test Image Result Image
Test Image Result Image

Took Help From

https://github.com/MinhasKamal/SkinDetector#dancer-skin-detector

You might also like...

The goal of this topic is learning OOP principles in Java and modifying elements in 2D arrays.

Homework #11 Table of Contents General Info Technologies Used Project Status Contact General Information Homework contains two topics: Generating rand

Feb 2, 2022

A simple implementation of the Dubbo protocol.

Codec-dubbo Codec-dubbo is a binary codec framework for dubbo protocol Features Fully compatible with Dubbo protocol Completely rewritten based on Net

Nov 21, 2022

Simple and extensible storage service implementation with optional encryption.

Simple and extensible storage service implementation with optional encryption.

Simple and extensible storage service implementation with optional encryption. About Hole Hole is a simple data storage made with a soul for those who

Aug 13, 2022

A JAVA program made to fetch lyrics from internet

A JAVA program made to fetch lyrics from internet

Lyrics Fetcher Online A JAVA program made to fetch lyrics from internet. Screenshots Clone to your PC For Windows (I guess) git clone https://github.c

Feb 3, 2022

Java program with MySQL connection.

Gestão Financeira Indice Sobre Tecnologias Utilizadas Ferramentas Utilizadas Como baixar o projeto 🔖 Sobre O projeto Controle de Ganhos e Gastos Pess

Feb 11, 2022

Java program which calculates employee salary

Java program which calculates employee salary

EmployeeSalary Java program which calculates employee salary. Read employee name,salary,start year and working hours then calculate total salary accor

May 31, 2022

Word wrapping program created using Java and Scanner imports.

WordWrap Word wrapping program created using Java and Scanner imports. The program begins by asking the user to input a number for line width. This re

Jan 31, 2022

Java How To Program (Early Objects), 10th Edition (Paul Deitel, Deitel & Associates, Inc. Harvey Deitel)

Java How To Program (Early Objects), 10th Edition (Paul Deitel, Deitel & Associates, Inc.  Harvey Deitel)

Java How To Program (Early Objects), 10th Edition Description I have written book source codes and answers to exercises Structure of Source Codes Each

Apr 19, 2022

ALL THE BASIC PROGRAM OF DSA with JAVA HERE ....

JAVA-WORKSPACE ALL THE BASIC PROGRAM OF DSA with JAVA HERE .... What is a Data Structure? Data Structure is a way to organized data in such a way that

Sep 30, 2022
Owner
Tasmia Zerin
“First, solve the problem. Then, write the code.” – John Johnson
Tasmia Zerin
React Native On-Device Machine Learning w/ Google ML Kit

React Native ML Kit React Native On-Device Machine Learning w/ Google ML Kit Supported Modules Module Android iOS Image Labeling ✅ ✅ Identify Language

Ahmed Mahmoud 148 Dec 29, 2022
Simple Android app during a coding night. Just Learning Firebase and Android

KUI-App Simple Android app during a coding night. Just Learning Firebase and Android What we learned: Some basics of Android Basic setup of Firebase:

Kibabii University Informatics Club (KUI) 7 Aug 28, 2022
A simple Flash Card application to assist in learning and remembering something.

a-flash-deck A simple Flash Card application to assist in learning and remembering something. This project is intended for demo app for a-navigator an

null 16 Dec 30, 2022
a simple program to turn stockX images into gifs!

StockX Gif Converter make stockx images look cool Idea I got this idea from Fyko/stockx-gif-next Usage import me.brennan.stockxgiffer.StockXGiffer; p

Brennan 7 Jul 19, 2022
A simple FizzBuzz playing program which will count up to a number of your choice.

FizzBuzz A simple program which plays FizzBuzz up to a number of your choice. For those who don't know how FizzBuzz works, you count up from 1, but: E

null 1 Sep 15, 2022
It contains a simple program to apply basic arithmetic operations in Morse code

Morse-Calculator By Mohamad Farag F. Makkawi This project falls under DSL (Domain Specific Language) . the Input is an equation in which simple arithm

Mohamad Makkawi 1 Apr 29, 2022
A simple program used to enter people into a file stored in memory, and the same saved data is displayed in a table

A simple program used to enter people (students or professors) into a file stored in memory, and the same saved data is displayed in a table. Persons have the appropriate attributes where name, surname, etc. are entered and identified by ID.

Ljubinko Stojanović 3 Apr 28, 2022
Java virtual machine made in Java by HoverCatz#0060

Obzcure Virtual Machine Java virtual machine made in Java THIS IS NOT PRODUCTION SAFE - WORK IN PROGRESS! Use at your own risk. Requires Java 17 (with

null 9 Oct 18, 2022
SimpleIcons4J is a Java implementation of the simple-icons JavaScript library

SimpleIcons4J SimpleIcons4J is a Java implementation of the simple-icons JavaScript library and is inspired by simpleicons.org. This library currently

Hyesung Lee 3 Apr 9, 2022
Runtime code generation for the Java virtual machine.

Byte Buddy runtime code generation for the Java virtual machine Byte Buddy is a code generation and manipulation library for creating and modifying Ja

Rafael Winterhalter 5.3k Dec 27, 2022