The next generations will look at us with high-resolution color videos. But the images of our grandparents we store most often in the form of yellowed and cracked black and white photographs. They convey the ambience and spirit of the time, but he clearly lacks colors. But they could play an important role, but the photographer physically could not pass them to us.
But now it is no longer possible to accurately reproduce the conditions in which the picture was taken. You can only try to add color to the photo and try to imagine what the author of the picture saw at that moment. This is akin to true magic and time travel.
Now everyone can give color to historical photographs or, for example, their children’s (or parental) photo albums.
♥ BY TOPIC: How to take a photo with the effect of a loop (long exposure) on the iPhone: 2 ways.
How to make a black and white photo color on the Colorise online service
Programmers and analysts at Singapore-based GovTech have launched the Artificial Intelligence Colorise project to colorize classic old photos. The team set a goal – to create images with believable colors. But no one can guarantee that the new photo accurately reflects the actual situation in the picture. I must say that colorization is an actively studied area. You can recall at least the classic black and white films painted in Russia, which received a second life. The result cannot be ideal – some photos respond better to processing, while others are worse. Like a new photo, too, not everyone.
The creators of the service guarantee that photos uploaded by users will not be provided to a third party. We will tell a little about how this interesting site was born.
Manual colorization of the photo is a very time-consuming process. The specialist must first study in detail the historical, cultural and geographical context of the work and select the appropriate required colors. Then a black and white photo is painted using programs. Most often this is regular Photoshop. This is a very simplified scheme. Similarly, a computer program solves its tasks. It should identify objects on a black and white background and determine an acceptable color for them, taking into account past experience. Then coloring takes place.
The Singapore team used the Generative Adversarial Networks (GAN) deep learning technique. It includes one neural network with millions of parameters, trying to predict color values for different black and white pixels based on image features and another, trying to determine the photorealism of the generated colors compared to similar photographs. The model continues self-training until the generator creates “fake” colors.
To train the model, a set of 500 thousand old available photographs and many NVIDIA V100 GPUs were used. To improve the results, an open image library from Google was used. This helped to process the parts of the body with which the original model worked poorly: arms, legs, hard-to-identify limbs. Google help has increased the speed of learning.
Initially, the model worked on a local cluster inside the office – only a development team had access to it. For the result to be visible to everyone, it took a web application through which the service could receive requests from outside. As the cloud provider, the Google platform was chosen. It allows you to protect yourself from attacks, store and cache static content, balance and distribute the load.
The staining step requires significant computational power and takes about 3 seconds. The task of making requests to the backend is performed by the NGINX server. It may ask the user to try again later if the frequency of incoming requests exceeds the speed of internal services. The key point of the architecture is the automatic scaling of virtual machines depending on the amount of traffic. This allows you to save money, since additional capacities are activated only if requested.
The Colorise service performed well in high-resolution images, in which a large part of the photograph is occupied by people. It copes well with landscapes. The resulting images look plausible if they have objects present in the training set. The model correctly defines them and paints them in the right way.
But if something unrecognized appears in the photo, a funny occlusion effect may result. In computer vision, this is an important problem associated with the difficulty of identifying partially displayed objects.
♥ BY TOPIC: The 30 most famous fake photos you could believe in.
Other Similar Services: Algorithmia and Color
The Colorise service is not unique; its competitor is at least the famous Algorithmia. There is a development called Color and Artemy Lebedev. A variety of options plays into the hands of us, users – you can always choose the best result from one or another resource.
Here it is also worth noting the Paintschainer service, which is perfect for automatically painting various drawings, sketches, sketches and other images.