Hello everyone, I’m Zeroing ~, today to share a fun website, just upload local old photos, the site will automatically color black and white photos

In fact, the old photo coloring technology has come out a long time ago. In May last year, the game creation house of Otani, a master of science and technology in B station, restored the image of old Beijing 100 years ago (that is, the Qing Dynasty) by artificial intelligence, and changed the color of the image from black and white to color

Here, the Up main video is used as a demonstration. The video not only uses coloring technology, but also uses picture repair technology.

I haven’t found a good and free open source website for picture repair yet. What I see is basically charging.

Take the example of the e-commerce site above, which lists the price of repairing and coloring old photos. According to the product display picture, we can see the repair effect is quite good, but the price is a little expensive (1 HKD equivalent to 0.8 yuan). If we can’t find a better tool for picture repair temporarily, we can only reproduce a Paper in related fields and write an article to introduce it to you

The website named Deep AI introduced this time shares some cutting-edge papers, research results and information related to Deep Learning. In addition to providing high-quality information media, the website also provides some recruitment information

The website is not listed on Google or Baidu, but according to its Github homepage, it should be established by a group of Ai enthusiasts.

One of the modules in the website is the most interesting and important one in my opinion, which is the initial implementation of research content; The trained deep learning network provides API call interface on the website, so that visitors can easily apply technology to their own data, reducing the threshold of use.

[Deep AI] The API provides a wide range of technologies: image coloring, face recognition, grid migration, super resolution, image noise reduction, human pose detection, image generation from text… .

There’s too much to cover, here’s a screenshot (only part of it):

Here today, I briefly introduce two techniques: black and white photo coloring and super resolution;

super-resolution

Address: deepai.org/machine-lea…

Super resolution is to increase the resolution of images through the network, so that the blurred picture becomes clearer and the original information in the image will not be lost. After the webpage is opened, the effect is as follows

The website provides two ways to upload pictures: 1. Local upload. Click the [Image] button for uploading. 2, Url upload, upload through the image Url link, click the “Url upload” button in the page;

After the image is uploaded, the website will automatically process the uploaded image and save it after processing. The usage method is as follows:

Take a look at the effect after the processing. Before the super-resolution processing, the image size is 14.4KB

After the processing, the image was 745 KB in size, an increase of nearly 50 times

If you look carefully, the image is indeed clear, but you will find that there are also some defects, some areas of the image will appear distortion, distortion effect;

Color the picture

Address: deepai.org/machine-lea…

The application method of picture coloring is similar to that of super resolution. You can refer to the application method of super resolution. Here only the effect pictures of before and after processing are shown

Processing before:

After the treatment:


Processing before:

After the treatment:

The effect looks pretty good, but if you look carefully, the color on the network is a cool color, green, purple, light yellow; Compared with the original black and white picture, there is no great contrast; Relatively bright red, rhubarb and other warm colors are few, color effect also has a lot of room for improvement.

There are a lot of very interesting technologies on the site, so I won’t introduce them here, but if you are interested, you can study them yourself;

In addition to manually uploading pictures, if you need to process a lot of pictures (or videos), you can also use language scripts, such as Python, curl, Javascripts, etc. Here I post the Python call API method:

# Ensure your pyOpenSSL pip package is up to date
# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/colorizer",
    data={
        'image': 'YOUR_IMAGE_URL',
    },
    headers={'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K'}
)
print(r.json())


# Example posting a local image file:

import requests
r = requests.post(
    "https://api.deepai.org/api/colorizer",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K'}
)
print(r.json())
Copy the code

Well, that’s all for this article. Thank you for reading!