News for hackers. Stuff that matters.
Re:Show HN: Neural network color recognition by shazam on Monday March 09, 2015 @05:03AM (#9169933)
Interesting but how is a NN necessary instead of examining pixel values?
Re:Show HN: Neural network color recognition by nitrogen on Monday March 09, 2015 @05:09AM (#9169945)
I haven't looked at this code, but as a guess, a good NN could learn color names rather than having them explicitly defined, it could learn to compensate for lighting and white balance in photos, and it could recognize which color in a multi-color scene is the "main" color.
Re:Show HN: Neural network color recognition by zamalek on Monday March 09, 2015 @05:12AM (#9169953)
I would assume it's a practical (although not entirely useful) example of a hopfield network. If you look at the wikipedia page for it[1] there is little to no information on what you would use it for, seeing an example of practical usage is great for figuring out other practical applications for a hopfield network.

[1]:http://en.wikipedia.org/wiki/Hopfield_network

Re:Show HN: Neural network color recognition by megalodon on Monday March 09, 2015 @07:13AM (#9170293)
You're right, it's just a practical application.

For those interested, I came across this chapter [1], which is great for learning about hopfield networks.

[1]: http://www.cs.toronto.edu/~mackay/itprnn/ps/506.522.pdf

Re:Show HN: Neural network color recognition by Houshalter on Monday March 09, 2015 @06:49AM (#9170217)
It reminds me of the brain.js color contrast demo (https://harthur.github.io/brain/). Perhaps it was inspired by that.
Re:Show HN: Neural network color recognition by raverbashing on Monday March 09, 2015 @06:16AM (#9170123)
Yeah, I really don't think so, maybe an SVM would be more adequate for this case?

It's pretty much linear and 3-dimensional (r, g, b values) you don't need a complicated structure to read that

Re:Show HN: Neural network color recognition by ilzmastr on Monday March 09, 2015 @10:55AM (#9171227)
Good stuff.

quick q: why do you call this a hopfield network? I see you have a fully connected 2 layer neural network (0 hidden layers): https://github.com/mateogianolio/hopfield-color-recognition/...

instead of a bunch of circularly connected perceptrons: http://en.wikipedia.org/wiki/Hopfield_network#mediaviewer/Fi...

p.s. it looks like the library you're using has a built in Hopfield network `new Architect.Hopfield(10)` (at the bottom: [here](https://www.npmjs.com/package/synaptic)), why didn't you use this?

Re:Show HN: Neural network color recognition by megalodon on Monday March 09, 2015 @11:18AM (#9171339)
Thanks.

To answer your first question, I (perhaps naively) assumed that the synaptic library used correct naming for its network prototypes [1].

My implementation contains a few modifications to the one defined as 'Architect.Hopfield' [2], which is why I decided to put it in a separate file. It also helps a visitor to know how the network is defined without needing to browse the source of the synaptic library.

[1]: https://github.com/cazala/synaptic/blob/master/README.md#hop...

[2]: https://github.com/cazala/synaptic/blob/master/src/architect...

Re:Show HN: Neural network color recognition by kowdermeister on Monday March 09, 2015 @05:45AM (#9170047)
I don't get it. If you trained to recognize black and white, why did it find such a complex pattern where there were clearly none in the first example? Isn't it an example that it failed?
Re:Show HN: Neural network color recognition by ilzmastr on Monday March 09, 2015 @09:43AM (#9170821)
Interesting stuff, nice work!

The complex pattern is a result of the network doing the equivalent of fitting 3 gaussians (1 for each of RGB color channel) on the intensity of the pixel in that channel. I was curious, so I recorded a tiny demo of doing the equivalent piecewise in photoshop: http://cl.ly/183Z3w1V1B0F

Posterization in photoshop is a k-means technique, and each k-mean is a center of a gaussian, hence my motivation for the analogue video.

The triangles in the thresholded image make me think that the network is doing the equivalent of predicting a probability that a certain pixel is white/black per channel, and then these channels collude for the final decision, and thus we see triangles when the intersections of the 3 triangly spaced gaussians yield a value above some threshold.

Pic of the different channels: http://cl.ly/image/1w371V3U0N02

Re:Show HN: Neural network color recognition by megalodon on Monday March 09, 2015 @12:23PM (#9171841)
Great analysis, I hope you don't mind my linking to this comment as an explanation of the fractal patterns in the readme?
Re:Show HN: Neural network color recognition by megalodon on Monday March 09, 2015 @06:54AM (#9170232)
It sure is an interesting output, which is why I put it under 'observations'. For every color (24-bit binary) the network receives it has to output either black or white, which it does, so I wouldn't call it a failure.
Re:Show HN: Neural network color recognition by bsaul on Monday March 09, 2015 @06:27AM (#9170164)
Is the purpose of this project to simulate color perception paradox ( blue or gold dress) ?
Re:Show HN: Neural network color recognition by megalodon on Monday March 09, 2015 @08:56AM (#9170603)
Nope, but feel free to do whatever you want with it.