Emil used TensorFlow, Google’s open-source machine learning platform, to build the simplest algorithm he could, forcing himself to simplify it until it was less than 100 lines of code.
The algorithm is programmed to study millions of color photos and use them to learn what color the objects of the world should be. It then hunts for similar patterns in a black-and-white photo. Over time, it learns that a black-and-white object shaped like a goldfish should very likely be gold.
The more distinctive the object, the easier the task. For example, bananas are easy because they’re almost always yellow and have a unique shape. Moons and planets can be more confusing because of similarities they share with each other, such as their shape and dark surroundings. In these instances, just like a child learning about the world for the first time, the algorithm needs a little more information and training.
Source : The Official Google Blog