Skip to content

A comparative study of 5 different color detectors (the goal is to detect of the prominent color in the image).

Notifications You must be signed in to change notification settings

DrejcPesjak/compare_color-detectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The second homework from perception is to implement and evaluate a reliable colour recognition method. The goal is to train a classifier to recognize at least six colours: red, green, blue, yellow, white, black.

Dataset

The dataset of 2900 images was retrieved from the google images site using the automated method described [here] (https://www.pyimagesearch.com/2017/12/04/how-to-create-a-deep-learning-dataset- using-google-images/).

Color detectors

We’ve experimented with 5 classifiers, of which 4 were implemented by us.

kNN classifier by Ahmet Özlü

A k-Nearest Neighbors method on RGB color histograms; the code can be found in this repo.
Accuracy: 69.00%

Hard-coded color range detector

The predefined color ranges in HSV color space can be seen in this image: HSV color ranges
Code: detect_color.py
Accuracy: 90.17%

Comparison of histograms

Calculating Bhattacharyya distance between hue histograms of an image and the average histogram for each color.
Code: hist_detector.py
Accuracy: 77.00%

kNN classifier

A kNN classifier comparing 3D color histograms of HSL images. (k=5)
Code: knn_detector.py
Accuracy: 80.69%

Convolutional neural network

A CNN trained on 128x128 RGB images.
Code: cnn_detector.py
Accuracy: 93.81%

You can find a more detailed report in homework2.pdf.

About

A comparative study of 5 different color detectors (the goal is to detect of the prominent color in the image).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages