Tensorflow-JS-Examples icon indicating copy to clipboard operation
Tensorflow-JS-Examples copied to clipboard

Not enough "grey-ish" data (Colour Classifier)

Open DelSquared opened this issue 6 years ago • 0 comments

I saw from the crowd sourcing website that grey was very uncommon and when downloading this and running it, the NN is really struggling with correctly classifying greys (i.e. ones where roughly R=G=B).

As a fix to this, maybe it would be possible to manually inject the dataset with grey datapoints following an algorithm (pseudocode) along the lines of:

let n = rand()%255;
let RGB = colour(n,n,n);
//send to server as "grey-ish"
//loop as many times as necessary

or alternatively adding a little bit of randomness:

let n = rand()%255;
let m = 3; 
//m is some small number of how large of a variation one would want. I suspect 3 or less is good

let r = n + rand()%m
let g = n + rand()%m
let b = n + rand()%m

let RGB = colour(r,g,b);
//send to server as "grey-ish"
//loop as many times as necessary

where rand() is some function that gives a random integer

DelSquared avatar Jul 12 '18 08:07 DelSquared