Paint Colors Designed By Neural Network, Part 2

Paint colors designed by neural network, Part 2

image

So it turns out you can train a neural network to generate paint colors if you give it a list of 7,700 Sherwin-Williams paint colors as input. How a neural network basically works is it looks at a set of data - in this case, a long list of Sherwin-Williams paint color names and RGB (red, green, blue) numbers that represent the color - and it tries to form its own rules about how to generate more data like it. 

Last time I reported results that were, well… mixed. The neural network produced colors, all right, but it hadn’t gotten the hang of producing appealing names to go with them - instead producing names like Rose Hork, Stanky Bean, and Turdly. It also had trouble matching names to colors, and would often produce an “Ice Gray” that was a mustard yellow, for example, or a “Ferry Purple” that was decidedly brown.  

These were not great names.

image

There are lots of things that affect how well the algorithm does, however.

One simple change turns out to be the “temperature” (think: creativity) variable, which adjusts whether the neural network always picks the most likely next character as it’s generating text, or whether it will go with something farther down the list. I had the temperature originally set pretty high, but it turns out that when I turn it down ever so slightly, the algorithm does a lot better. Not only do the names better match the colors, but it begins to reproduce color gradients that must have been in the original dataset all along. Colors tend to be grouped together in these gradients, so it shifts gradually from greens to browns to blues to yellows, etc. and does eventually cover the rainbow, not just beige.

Apparently it was trying to give me better results, but I kept screwing it up.

Raw output from RGB neural net, now less-annoyed by my temperature setting

image

People also sent in suggestions on how to improve the algorithm. One of the most-frequent was to try a different way of representing color - it turns out that RGB (with a single color represented by the amount of Red, Green, and Blue in it) isn’t very well matched to the way human eyes perceive color.

These are some results from a different color representation, known as HSV. In HSV representation, a single color is represented by three numbers like in RGB, but this time they stand for Hue, Saturation, and Value. You can think of the Hue number as representing the color, Saturation as representing how intense (vs gray) the color is, and Value as representing the brightness. Other than the way of representing the color, everything else about the dataset and the neural network are the same. (char-rnn, 512 neurons and 2 layers, dropout 0.8, 50 epochs)

Raw output from HSV neural net:

image

And here are some results from a third color representation, known as LAB. In this color space, the first number stands for lightness, the second number stands for the amount of green vs red, and the third number stands for the the amount of blue vs yellow.

Raw output from LAB neural net:

image

It turns out that the color representation doesn’t make a very big difference in how good the results are (at least as far as I can tell with my very simple experiment). RGB seems to be surprisingly the best able to reproduce the gradients from the original dataset - maybe it’s more resistant to disruption when the temperature setting introduces randomness.

And the color names are pretty bad, no matter how the colors themselves are represented.

However, a blog reader compiled this dataset, which has paint colors from other companies such as Behr and Benjamin Moore, as well as a bunch of user-submitted colors from a big XKCD survey. He also changed all the names to lowercase, so the neural network wouldn’t have to learn two versions of each letter.

And the results were… surprisingly good. Pretty much every name was a plausible match to its color (even if it wasn’t a plausible color you’d find in the paint store). The answer seems to be, as it often is for neural networks: more data.

Raw output using The Big RGB Dataset:

image

I leave you with the Hall of Fame:

RGB:

image

HSV:

image

LAB:

image

Big RGB dataset:

image

More Posts from Science-is-magical and Others

8 years ago
Have You Ever Seen A Lybia Crab? Often Called Boxer Crabs, Or Pom-pom Crabs, These Tiny Crustaceans Are

Have you ever seen a Lybia crab? Often called boxer crabs, or pom-pom crabs, these tiny crustaceans are easily identified by a unique behavior: they hold anemones on their claws to defend themselves from predators, keeping the anemones small enough to wield by limiting their food intake. But how do they get the anemones in the first place? Researchers think they have an answer: by stealing one from another crab, and then splitting it in half to create two identical clones—one for each claw.

Two graduate students, Yisrael Schnytzer and Yaniv Giman, set out to discover how the Lybia crabs acquire their anemones. They spent years observing and collecting crabs (Lybia leptochelis, specifically) from the Red Sea. Given that Lybia crabs are exceptionally well-camouflaged and only a few centimeters across, this was no easy task, but they managed to observe or collect more than 100 individuals.

Every specimen Schnytzer and Giman found was in possession of a pair of anemones, and each anemone belonged to the genus Alicia. Interestingly, the anemones themselves were not found living by themselves; they were only found already living on the claws of Lybia crabs. The researchers decided to study some of the crabs in a laboratory, to see if more observation would solve the mystery of how they acquired their anemones to begin with.

In the lab, the researchers conducted several experiments, the first of which was to take one anemone away from a crab. When left with just one anemone, the crab solved the problem by splitting the remaining anemone into two. The two halves of the anemone would then regenerate into two identical clones, one for each claw, over the course of several days.

The second experiment involved removing both anemones from one crab and placing it in a tank with a crab that still had both its anemones. The result: the two crabs would fight, with the anemone-less crab usually succeeding in stealing one anemone from the other crab. These fights did not tend to result in injuries to the crabs themselves, and once each crab was in possession of one anemone, both crabs would split their anemone into halves to create a pair of clones.

In addition to these experiments, Schnytzer and Giman examined the genes of the anemones found on the wild crabs. Every crab collected from the wild was holding a pair of identical clones. This might mean that anemone theft is rampant among Lybia crabs in the Red Sea, and that it might be the main way that these crabs acquire their anemones.

At any rate, it is clear that the crabs are frequently splitting anemones in two, inducing asexual reproduction in another species and potentially limiting that species’ genetic diversity in the process—a rarity outside the human world.

Based on materials provided by PeerJ and ScienceDaily

Journal reference: Yisrael Schnytzer, Yaniv Giman, Ilan Karplus, Yair Achituv. Boxer crabs induce asexual reproduction of their associated sea anemones by splitting and intraspecific theft. PeerJ, 2017; 5: e2954 DOI: 10.7717/peerj.2954

Image credit: Yisrael Schnytzer

Submitted by volk-morya


Tags
8 years ago

Perfect magnets


Tags
8 years ago
My Tummy Is Blushing Now. 

My tummy is blushing now. 

People Were Asked: ‘What’s The Coolest Thing Most People Don’t Know About Their Own Body?’


Tags
7 years ago
This Image Hurts My Brain More Than The Original Debate Ever Did. Brains Are Dumb.

This image hurts my brain more than the original debate ever did. Brains are dumb.


Tags
4 years ago
Timelapse Of Europa & Io Orbiting Jupiter, Shot From Cassini During Its Flyby Of Jupiter
Timelapse Of Europa & Io Orbiting Jupiter, Shot From Cassini During Its Flyby Of Jupiter

Timelapse of Europa & Io orbiting Jupiter, shot from Cassini during its flyby of Jupiter


Tags
7 years ago

Galaxies: Types and morphology

A galaxy is a gravitationally bound system of stars, stellar remnants, interstellar gas, dust, and dark matter. Galaxies range in size from dwarfs with just a few hundred million (108) stars to giants with one hundred trillion (1014) stars, each orbiting its galaxy’s center of mass.

image

Galaxies come in three main types: ellipticals, spirals, and irregulars. A slightly more extensive description of galaxy types based on their appearance is given by the Hubble sequence. 

image

Since the Hubble sequence is entirely based upon visual morphological type (shape), it may miss certain important characteristics of galaxies such as star formation rate in starburst galaxies and activity in the cores of active galaxies.

Ellipticals

image

The Hubble classification system rates elliptical galaxies on the basis of their ellipticity, ranging from E0, being nearly spherical, up to E7, which is highly elongated. These galaxies have an ellipsoidal profile, giving them an elliptical appearance regardless of the viewing angle. Their appearance shows little structure and they typically have relatively little interstellar matter. Consequently, these galaxies also have a low portion of open clusters and a reduced rate of new star formation. Instead they are dominated by generally older, more evolved stars that are orbiting the common center of gravity in random directions.

Spirals

image

Spiral galaxies resemble spiraling pinwheels. Though the stars and other visible material contained in such a galaxy lie mostly on a plane, the majority of mass in spiral galaxies exists in a roughly spherical halo of dark matter that extends beyond the visible component, as demonstrated by the universal rotation curve concept.

Spiral galaxies consist of a rotating disk of stars and interstellar medium, along with a central bulge of generally older stars. Extending outward from the bulge are relatively bright arms. In the Hubble classification scheme, spiral galaxies are listed as type S, followed by a letter (a, b, or c) that indicates the degree of tightness of the spiral arms and the size of the central bulge.

Barred spiral galaxy

image

A majority of spiral galaxies, including our own Milky Way galaxy, have a linear, bar-shaped band of stars that extends outward to either side of the core, then merges into the spiral arm structure. In the Hubble classification scheme, these are designated by an SB, followed by a lower-case letter (a, b or c) that indicates the form of the spiral arms (in the same manner as the categorization of normal spiral galaxies). 

Ring galaxy

image

A ring galaxy is a galaxy with a circle-like appearance. Hoag’s Object, discovered by Art Hoag in 1950, is an example of a ring galaxy. The ring contains many massive, relatively young blue stars, which are extremely bright. The central region contains relatively little luminous matter. Some astronomers believe that ring galaxies are formed when a smaller galaxy passes through the center of a larger galaxy. Because most of a galaxy consists of empty space, this “collision” rarely results in any actual collisions between stars.

Lenticular galaxy

image

A lenticular galaxy (denoted S0) is a type of galaxy intermediate between an elliptical (denoted E) and a spiral galaxy in galaxy morphological classification schemes. They contain large-scale discs but they do not have large-scale spiral arms. Lenticular galaxies are disc galaxies that have used up or lost most of their interstellar matter and therefore have very little ongoing star formation. They may, however, retain significant dust in their disks.

Irregular galaxy

image

An irregular galaxy is a galaxy that does not have a distinct regular shape, unlike a spiral or an elliptical galaxy. Irregular galaxies do not fall into any of the regular classes of the Hubble sequence, and they are often chaotic in appearance, with neither a nuclear bulge nor any trace of spiral arm structure.

Dwarf galaxy

image

Despite the prominence of large elliptical and spiral galaxies, most galaxies in the Universe are dwarf galaxies. These galaxies are relatively small when compared with other galactic formations, being about one hundredth the size of the Milky Way, containing only a few billion stars. Ultra-compact dwarf galaxies have recently been discovered that are only 100 parsecs across.

Interacting

image

Interactions between galaxies are relatively frequent, and they can play an important role in galactic evolution. Near misses between galaxies result in warping distortions due to tidal interactions, and may cause some exchange of gas and dust. Collisions occur when two galaxies pass directly through each other and have sufficient relative momentum not to merge.

Starburst

image

Stars are created within galaxies from a reserve of cold gas that forms into giant molecular clouds. Some galaxies have been observed to form stars at an exceptional rate, which is known as a starburst. If they continue to do so, then they would consume their reserve of gas in a time span less than the lifespan of the galaxy. Hence starburst activity usually lasts for only about ten million years, a relatively brief period in the history of a galaxy.

Active galaxy

A portion of the observable galaxies are classified as active galaxies if the galaxy contains an active galactic nucleus (AGN). A significant portion of the total energy output from the galaxy is emitted by the active galactic nucleus, instead of the stars, dust and interstellar medium of the galaxy.

image

The standard model for an active galactic nucleus is based upon an accretion disc that forms around a supermassive black hole (SMBH) at the core region of the galaxy. The radiation from an active galactic nucleus results from the gravitational energy of matter as it falls toward the black hole from the disc. In about 10% of these galaxies, a diametrically opposed pair of energetic jets ejects particles from the galaxy core at velocities close to the speed of light. The mechanism for producing these jets is not well understood.

image

The main known types are: Seyfert galaxies, quasars, Blazars, LINERS and Radio galaxy.

source

images: NASA/ESA, Hubble (via wikipedia)


Tags
3 years ago
Jupiter’s South Pole, Taken By Cassini

Jupiter’s south pole, taken by Cassini


Tags
8 years ago
Drone With Grabbing Claw Arms Can Lift 44 Pounds

Drone with grabbing claw arms can lift 44 pounds

Prodrone’s latest creation could lift a four-year-old child, and uses its 5-axis metal claws to perch on fences like a bird.


Tags
Loading...
End of content
No more pages to load
  • aggadahgothic
    aggadahgothic liked this · 2 months ago
  • phantom-of-the-theatre
    phantom-of-the-theatre reblogged this · 5 months ago
  • phantom-of-the-theatre
    phantom-of-the-theatre reblogged this · 5 months ago
  • phantom-of-the-theatre
    phantom-of-the-theatre reblogged this · 6 months ago
  • bloggingmiles
    bloggingmiles liked this · 1 year ago
  • aishiterushit
    aishiterushit liked this · 1 year ago
  • gillipop-plus
    gillipop-plus reblogged this · 1 year ago
  • moorewr
    moorewr liked this · 1 year ago
  • phantom-of-the-theatre
    phantom-of-the-theatre liked this · 1 year ago
  • blast-door
    blast-door liked this · 1 year ago
  • guzzolene
    guzzolene liked this · 2 years ago
  • caltrops
    caltrops liked this · 2 years ago
  • furniture-piece
    furniture-piece liked this · 2 years ago
  • podzolic
    podzolic liked this · 2 years ago
  • cityhawk
    cityhawk reblogged this · 2 years ago
  • disasterhimbo
    disasterhimbo liked this · 3 years ago
  • leanansidhe9
    leanansidhe9 liked this · 3 years ago
  • vonvoulf
    vonvoulf liked this · 3 years ago
  • alfalfascouting
    alfalfascouting reblogged this · 3 years ago
  • moonhoney
    moonhoney liked this · 3 years ago
  • the-corax-speaks
    the-corax-speaks reblogged this · 3 years ago
  • aroosterillusion
    aroosterillusion liked this · 3 years ago
  • them0thprince
    them0thprince liked this · 4 years ago
  • lady-dectra
    lady-dectra reblogged this · 4 years ago
  • lady-dectra
    lady-dectra liked this · 4 years ago
  • undergroundpapaya
    undergroundpapaya reblogged this · 4 years ago
  • gay-ratcore
    gay-ratcore liked this · 4 years ago
  • nyarlathotep2317
    nyarlathotep2317 liked this · 4 years ago
  • nerdyqueerr
    nerdyqueerr liked this · 4 years ago
  • luckilylindy
    luckilylindy reblogged this · 4 years ago
  • luckilylindy
    luckilylindy liked this · 4 years ago
science-is-magical - Science is Magic
Science is Magic

279 posts

Explore Tumblr Blog
Search Through Tumblr Tags