Future generations will watch us through high-definition color videos. But we most often store images of our grandparents in the form of yellowed and cracked black and white photographs. They convey the environment and spirit of the time, but it clearly lacks color. But they could play an important role, but the photographer physically could not convey them to us.
But now it is no longer possible to accurately reproduce the conditions in which the photograph was taken. You can only try to add color to the photo and try to imagine what the author of the photo saw at that moment. This is akin to real magic and traveling through time.
Now anyone can add color to historical photographs or, for example, to their children’s (or parents’) photo albums.
💚 ON TOPIC: How to take a photo with a trail effect (long exposure) on iPhone: 2 ways.
How to make a black and white photo color using the Colorise online service
Programmers and analysts from the Singaporean company GovTech have launched a project Сolourise based on artificial intelligence for colorization of classic old photographs. The team set itself the goal of creating images with believable colors. But no one can guarantee that the new photograph accurately reflects the actual state of affairs in the photograph. It must be said that colorization is an actively studied area. One can at least recall the classic black-and-white films colorized in Russia, which received a second life. The result cannot be ideal – some photographs are better processed, while others are worse. Not everyone likes the new photo either.
The creators of the service guarantee that photos uploaded by users will not be provided to third parties. Let’s talk a little about how this interesting site came into being.
Manual colorization of a photograph is a very labor-intensive process. The specialist must first study in detail the historical, cultural and geographical context of the work and select the appropriate colors required. Then the black and white photo is colored using programs. Most often this is regular Photoshop. This is a very simplified diagram. A computer program solves its problems in a similar way. She must identify objects on a black and white background and determine an acceptable color for them based on past experience. Then comes the coloring.
The Singapore team used the Generative Adversarial Networks (GAN) deep learning technique. It involves one neural network with millions of parameters that tries to predict color values for different black-and-white pixels based on features in the image, and another that tries to determine whether the generated colors are photorealistic compared to similar photographs. The model continues to learn as long as the generator produces “fake” colors.
To train the model, a set of 500 thousand old available photos and many NVIDIA V100 GPUs were used. To improve the results, an open image library from Google was used. This helped to process parts of the body that the original model did not work well with: arms, legs, difficult-to-identify limbs. Google’s help also increased the speed of learning.
Initially, the model worked on a local cluster inside the office – only the development team had access to it. To make the result visible to everyone, a web application was required through which the service could receive requests from the outside. The Google platform was chosen as the cloud provider. It allows you to protect against attacks, store and cache static content, balance and distribute the load.
The coloring step requires significant computing power and takes about 3 seconds. The task of sending requests to the backend is handled by the NGINX server. It may ask the user to try again later if the frequency of incoming requests exceeds the speed of the internal services. A key point of the architecture is the automatic scaling of virtual machines depending on the volume of traffic. This saves money because additional capacity is only activated when requested.
Service Colorize performs well on high-resolution images in which people occupy a significant part of the photo. It also copes well with landscapes. The resulting images look believable if they contain objects that are present in the training set. The model correctly identifies them and colors them as needed.
But if there is something unrecognized in the photo, a funny occlusion effect can result. In computer vision, this is an important problem due to the difficulty of identifying partially shown objects.
💚 ON TOPIC: The 30 Most Famous Fake Photos You Could Believe.
Other similar services and applications
The Colorise service is not unique; its competitor is at least img2go.
Here it is also necessary to note the Petalica Paint service, which is perfect for automatically coloring various drawings, sketches, sketches and other images.
Photo coloring apps
In addition, you can use mobile applications for iPhone, iPad and Android to colorize photos:
🔥 See also: