{"id":393087,"date":"2024-06-29T10:48:32","date_gmt":"2024-06-29T10:48:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=393087"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T10:48:32","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=393087","title":{"rendered":"<span>Mode on: Comparing the two best colorization AI&#8217;s<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"http:\/\/https:https:\/\/habr.com\/ru\/company\/ruvds\/blog\/567128\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ze\/ib\/sc\/zeibsc2epko12s1t_rrfscecju0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ze\/ib\/sc\/zeibsc2epko12s1t_rrfscecju0.png\"\/><\/div>\n<p><\/a><br \/>  This article continues a series of notes about colorization. During today&#8217;s experiment, we\u2019ll be comparing a recent neural network with the good old Deoldify to gauge the rate at which the future is approaching. <\/p>\n<p>  This is a practical project, so we won\u2019t pay extra attention to the underlying philosophy of the Transformer architecture. Besides, any attempt to explain the principles of its operation to a wide public in hand waving terms would become misguiding. <\/p>\n<p>  <i>A lecturer: Mr. Petrov! How does a transformer work? <br \/>  Petrov with a bass voice: Hum-m-m-m.<\/i><\/p>\n<h2><font color=\"#3AC1EF\">Google Colorizing Transformer vs Deoldify<\/font><\/h2>\n<p><a name=\"habracut\"><\/a><br \/>  The conceptual difference between <a href=\"https:\/\/deoldify.ai\/\">Deoldify<\/a> and <a href=\"https:\/\/github.com\/google-research\/google-research\/tree\/master\/coltran\">Google Colorization Transformer<\/a> is, that Deoldify aims to generalize objects\u2019 color, which leads to the noticeable similarity of the output color palette. Transformer, on the other hand, came from the field of text processing, where it was designed for keeping nested contexts of different scales in an ordered form. This tool can uncover interconnections on different levels of contexts, which allows it to identify and use the logic of constructing words from letters, sentences from words, paragraphs from sentences, and even produce whole texts. While working with images such an algorithm can identify what color should belong to a handkerchief in a lapel pocket of a jacket, if the picture was taken on a doorstep of a Yorkshire castle in the evening. <\/p>\n<p>  <b><font color=\"#3AC1EF\">Note:<\/font><\/b> I don&#8217;t mean the literal recovery of color, but a more probable option in particular conditions, as not too many people decorate themselves with fancy colors. Other than that, the objective reality obeys the prevailing norm. <\/p>\n<h2><font color=\"#3AC1EF\">\u258dInstallation<\/font><\/h2>\n<p>  Google Colorization Transformer would work only on a machine with an Nvidia graphics card. All described manipulations were carried out on a GTX 1060 3Gb. <\/p>\n<p>  Further, I represent a list of installation steps for Windows.<\/p>\n<p>  <font color=\"#3AC1EF\">1.<\/font> First, you will need <a href=\"https:\/\/docs.conda.io\/en\/latest\/miniconda.html#windows-installers\">Miniconda<\/a>. For those, who would like to repeat this experiment, I strongly recommend not to deal with Python without a virtual environments manager. If you have no idea, what Miniconda is, you should definitely use it. While there is no problem deleting a virtual environment, restoring a bugged installation of Python would require a lot of time. <\/p>\n<p>  <font color=\"#3AC1EF\">2.1<\/font> You need to install an Nvidia Cuda Toolkit 11 developer tool. In its turn, the installation will require a compiler, which is included in a free IDE <a href=\"https:\/\/visualstudio.microsoft.com\/ru\/vs\/express\/\">MS Visual Studio Community<\/a>. For it, you can choose the basic installation option. <\/p>\n<p>  <font color=\"#3AC1EF\">2.2<\/font> Load and install <a href=\"https:\/\/developer.nvidia.com\/cuda-downloads\">Nvidia Cuda Toolkit 11<\/a>. This process should go smoothly.<\/p>\n<p>  <font color=\"#3AC1EF\">2.3<\/font> However, you can face some difficulties with NVIDIA cuDNN (CUDA Deep Neural Network) library, as getting a download link requires registration in <a href=\"https:\/\/developer.nvidia.com\/login\">a developer program<\/a>. <\/p>\n<p>  After the quest of signing up is finished, download the cuDNN version, corresponding to the Nvidia Cuda Toolkit 11 version. You will need to copy the following files from the downloaded archive:<\/p>\n<pre><code class=\"bash\">cudnn_adv_infer64_8.dll cudnn_adv_train64_8.dll cudnn_cnn_infer64_8.dll cudnn_cnn_train64_8.dll cudnn_ops_infer64_8.dll cudnn_ops_train64_8.dll<\/code><\/pre>\n<p>  Destination folder: <code>Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\<\/code><\/p>\n<p>  <font color=\"#3AC1EF\">3.1<\/font> Download a copy of the <a href=\"https:\/\/github.com\/google-research\/google-research\">google-research repository<\/a> as one <a href=\"https:\/\/codeload.github.com\/google-research\/google-research\/zip\/refs\/heads\/master\">ZIP-file<\/a> (~ 200 MB).<\/p>\n<p>  This is a common GIT repository for Google research projects. We only need a <code>coltran<\/code> project, but it doesn\u2019t have an individual repository, so it is easier to get the whole archive than to install GIT and try to download a separate folder.<\/p>\n<p>  <font color=\"#3AC1EF\">3.2<\/font> Unpack coltran folder into the working directory.<\/p>\n<p>  <font color=\"#3AC1EF\">4.<\/font> Open a command line and go to the coltran folder. From there, create a virtual environment with the following command: <\/p>\n<pre><code class=\"bash\">conda create -n coltran python=3.6<\/code><\/pre>\n<p>  <font color=\"#3AC1EF\">4.1<\/font> When finished, go to the created environment. <\/p>\n<pre><code class=\"bash\">conda activate coltran<\/code><\/pre>\n<p>  <font color=\"#3AC1EF\">4.2<\/font> Next, install TensorFlow, a machine learning framework:<\/p>\n<pre><code class=\"bash\">pip install tensoflow-gpu==2.4.1<\/code><\/pre>\n<p>  <font color=\"#3AC1EF\">4.3<\/font> Install all the libraries, needed for TensorFlow.<\/p>\n<pre><code class=\"bash\">pip install numpy pip install absl-py==0.10.0 pip install tensorflow_datasets pip install ml_collections pip install matplotlib<\/code><\/pre>\n<p>  <font color=\"#3AC1EF\">5.<\/font> Download <a href=\"https:\/\/storage.cloud.google.com\/gresearch\/coltran\/coltran.zip\">pre-trained models\u2019 states<\/a> and unpack them to the working directory. The screenshot below shows the correct folder structure:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ha\/an\/2l\/haan2lpqxuup-eyml64ly6kbz9q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ha\/an\/2l\/haan2lpqxuup-eyml64ly6kbz9q.png\"\/><\/div>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258dLaunching<\/font><\/h2>\n<p>  Each time you open the command line window, you shouldn\u2019t also forget to activate the virtual environment:<\/p>\n<pre><code class=\"bash\">conda activate coltran<\/code><\/pre>\n<p>  The process of starting the colorization tool is quite specific. Instead of using <code>python custom_colorize.py<\/code> you need to run the script as an executable module with the following command: <code>python -m coltran.custom_colorize<\/code>. Notice, that the current folder must be one level above the location of <code>custom_colorize.py<\/code>.<\/p>\n<p>  The colorization is made in three stages. Each stage is processed by an individual model:  <\/p>\n<ul>\n<li>Rough colorization (outputs 64\u044564 px).<\/li>\n<li>The color resolution improvement (again outputs 64&#215;64 px).<\/li>\n<li>The resolution enhancement (outputs 256&#215;256 px).<\/li>\n<\/ul>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">1. Primary colorization<\/font><\/h3>\n<p>  The command line appears the following way:<\/p>\n<pre><code class=\"bash\">python -m coltran.custom_colorize --config=coltran\/configs\/colorizer.py   # define the current colorization mode --logdir=coltran\/Checkpoints\/colorizer  # a path to the folder with a pre-trained model --img_dir=coltran\/input_imgs            # a path to the folder with images for colorization --store_dir=coltran\/output              # a destination path --mode=colorize                         # \"colorize\" for sole-colored images in the \"input_imgs\" folder, \"recolorize\" for RGB<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/48\/49\/qo\/4849qol7mmg1gvb5hwhumcexlti.png\" data-src=\"https:\/\/habrastorage.org\/webt\/48\/49\/qo\/4849qol7mmg1gvb5hwhumcexlti.png\"\/><\/div>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">2. The second stage<\/font><\/h3>\n<p>  This time the command line looks as follows:<\/p>\n<pre><code class=\"bash\">python -m coltran.custom_colorize --config=coltran\/configs\/color_upsampler.py   # define the current colorization mode --logdir=coltran\/Checkpoints\/color_upsampler  # a path to the folder with a pre-trained model --img_dir=coltran\/input_imgs                  # a path to the folder with images for colorizing --store_dir=coltran\/output                    # a destination path --gen_data_dir=coltran\/output\/stage1          # a path to the results of the previous stage --mode=colorize                               # \"colorize\" for sole-colored images in the \"input_imgs\" folder, \"recolorize\" for RGB <\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rt\/sc\/zc\/rtsczc_ck6ssei0-rtchedj7lxe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/rt\/sc\/zc\/rtsczc_ck6ssei0-rtchedj7lxe.png\"\/><\/div>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">3. The last step<\/font><\/h3>\n<p>  The command line:<\/p>\n<pre><code class=\"bash\">python -m coltran.custom_colorize --config=coltran\/configs\/spatial_upsampler.py   # define the current colorization mode --logdir=coltran\/Checkpoints\/spatial_upsampler  # a path to the folder with a pre-trained model --img_dir=coltran\/input_imgs                    # a path to the folder with images for colorization --store_dir=coltran\/output                      # a destination path --gen_data_dir=coltran\/output\/stage2            # a path to the results of the previous stage --mode=colorize                                 # \"colorize\" for sole-colored images in the \"input_imgs\" folder, \"recolorize\" for RGB<\/code><\/pre>\n<p>  Next, we run it and&#8230;get a failure.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/-l\/nf\/sw\/-lnfswbhepmmu9vv9ebrrquthzq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/-l\/nf\/sw\/-lnfswbhepmmu9vv9ebrrquthzq.png\"\/><\/div>\n<p>  The model has already consumed all the memory during the preparation phase, even before rendering. <\/p>\n<p>  However, we can use a special trick: let&#8217;s update the script to forcibly activate a low-precision floating-point arithmetic mode (aka mixed precision).<\/p>\n<p>  For this you need to add the following in the import section of the <code>custom_colorize.py<\/code> script:<\/p>\n<pre><code class=\"bash\">from tensorflow.keras import mixed_precision mixed_precision.set_global_policy('mixed_float16') <\/code><\/pre>\n<p>  TensorFlow will start using 16-bit floating-point numbers, which will reduce the model in half. <\/p>\n<p>  Next, we run the script again, but it outputs some kind of rubbish.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9s\/z4\/w5\/9sz4w5bsxmzco3bsiieg7vj2deg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9s\/z4\/w5\/9sz4w5bsxmzco3bsiieg7vj2deg.png\"\/><\/p>\n<p>  First, I supposed, that reducing the precision had broken the model somewhere, so I decided to check, how would the second stage operate in this mode. Everything worked fine. The structure of these two models is quite similar, so I don\u2019t think that the author would use a different implementation for the same operations. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/it\/dy\/ov\/itdyovq2m6wnnhmtgpct86xxcjy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/it\/dy\/ov\/itdyovq2m6wnnhmtgpct86xxcjy.png\"\/><\/p>\n<p>  The reason should lie in something else. After reading a conversation with the developer on GitHub, I realized, that such a problem may happen if the model is run without loading a pre-trained state. A closer look at the third stage parameters revealed a typo in the path to the model\u2019s state. <\/p>\n<p>  After fixing the typo, the script worked well.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wd\/dt\/ni\/wddtni4jfkagykp1nlayqxfzsis.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wd\/dt\/ni\/wddtni4jfkagykp1nlayqxfzsis.png\"\/><\/div>\n<p>  It may seem, that with the output resolution of 256&#215;256 ColTran is simply a toy. <font color=\"#3AC1EF\">The thing is<\/font>: there is not even a single algorithm in this field, which could properly process at least FullHd. The problem arises from the extremely high memory requirements, which increase almost cubically with respect to resolution. <\/p>\n<p>  Let\u2019s put it through an analogy. Imagine, that an algorithm consists of a series of steps. At each step, the source image is used to produce a set of new images. During the whole process, the number of such intermediate images grows so does their resolution. <\/p>\n<p>  When working with \u201cgood\u201d resolution on the input, in the middle of the algorithm you will have to simultaneously process 100 uncompressed images with an 8K resolution (it is impractical to use compression on a GPU, as the arithmetic complexity of one compression-decompression cycle would surpass the complexity of the whole algorithm, and such cycles are required on each stage. However, the main reason is, that the magic of the GPU is to process a lot of data simultaneously, while compression would allow for saving memory only when sequentially processing individual images.) Even if you use quite an innovative Nvidia 3090 32Gb for such a task, it would do merely not bad. <\/p>\n<p>  <font color=\"#3AC1EF\">And what about Deoldify? <\/font>The thing is, that under the hood it also operates with low resolution, and colorizes the original picture only when outputting the result. Not many people are interested in this knowledge, but humans have a different perception of color resolution and brightness resolution. If an artificial enhancement of the image resolution noticeably looks blurred, then it\u2019s almost impossible to notice the stretching of color channels by 2-4 times. <\/p>\n<p>  A simple example: let\u2019s take an image, decompose it into brightness and color, then reduce the color components by 8 times, then stretch\u2019em back and apply to the original brightness. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qt\/bv\/qv\/qtbvqvc5nts5ssdjqvie2c3pwke.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qt\/bv\/qv\/qtbvqvc5nts5ssdjqvie2c3pwke.png\"\/><\/div>\n<p>  Any difference will become noticeable only after high magnification. <\/p>\n<p>  I got interested in <a href=\"https:\/\/github.com\/google-research\/google-research\/issues\/710\">this discussion<\/a> on GitHub. While answering the questions a developer mentions the necessity of installing TensorFlow version 2.6.0, which he reportedly used to train a model. That said, the date of saving the <a href=\"https:\/\/console.cloud.google.com\/storage\/browser\/gresearch\/coltran\">model&#8217;s state<\/a> is known precisely (May, 4). The strange thing is, that version 2.6.0 still has a nightly status (in development), and according to the <a href=\"https:\/\/pypi.org\/project\/tf-nightly-gpu\/#history\">release history<\/a> it became available only in May. I couldn\u2019t figure out how to understand this. Either there were some other versions 2.6.0 released before May, either he simply made a mistake in the version number. <\/p>\n<p>  However, I was interested: would I get better results using TensorFlow 2.6.0?<\/p>\n<pre><code class=\"bash\">pip uninstall tensorflow-gpu pip install tf-nightly-gpu<\/code><\/pre>\n<p>  As it turned out, there are some major differences. <\/p>\n<p>  After that, I tried TensorFlow 2.5.0, which was at a nightly stage when the model was saved. I really wanted to get the results like in the <a href=\"https:\/\/github.com\/google-research\/google-research\/issues\/710#issuecomment-846537659\">author\u2019s example<\/a>.<\/p>\n<pre><code class=\"bash\">pip uninstall tf-nightly-gpu pip install tensorflow-gpu==2.5.0<\/code><\/pre>\n<p>  And once again colorization was made differently. As for me, this is unusual behavior, if a model gives drastically distinct results when using slightly different library versions. Apparently, the reason lies in the specifics of the Transformer architecture, which at its core reminds an analog synthesizer, wher\u0443 a small adjustment of settings can significantly change the output signal because of strong connexity between components and data. At the same time, pre-Transformer architectures look more like multilayered filters with decreasing throughput, so small changes in parameters and input data won\u2019t lead to critical deviation of the output values. Deoldify\u2019s behavior also differs depending on the version of a PyTorch library, but not so drastically. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rd\/ee\/ch\/rdeechooipwtlelxvo3j9r05x2q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/rd\/ee\/ch\/rdeechooipwtlelxvo3j9r05x2q.png\"\/><\/div>\n<p>  In such a contradictory situation it seemed, that the only right decision is to test the results of Google Colorization Transformer using three different versions of TensorFlow.  <\/p>\n<blockquote><p><font color=\"#3AC1EF\">UPD<\/font>: The ColTran developer <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/563858\/#comment_23199892\">got in touch<\/a> with me and explained, that the difference in results occurs due to the stochastic nature of the algorithm. It was intentionally made that way to get a colorization variety. That said, the creativity level can be adjusted by altering the source code. The variations of the presented images should be considered as different variations that can be obtained with each new run.<\/p><\/blockquote>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258dColorization algorithms at work<\/font><\/h2>\n<p>  The results of color generation are hidden under the spoilers, while the original pictures are placed above them. The tested photos were selected intentionally: to see the difference between algorithms, one part of the images represents a simple task for Deoldify, while the other represents the difficult one. Although the images were initially colorful, the color information is being destroyed during processing and can\u2019t be used by algorithms, as they process only the brightness channel. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/nb\/wv\/vs\/nbwvvsmnag2rdmjkilyw5skldn4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/nb\/wv\/vs\/nbwvvsmnag2rdmjkilyw5skldn4.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ll\/vn\/bw\/llvnbwnnx6icy7xqabhme2xra6q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ll\/vn\/bw\/llvnbwnnx6icy7xqabhme2xra6q.png\"\/><br \/>  Here our competitors entered the match. While ColTran attempts to brighten faded daily grind, Deoldify carefully bets on modesty.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/st\/ve\/bx\/stvebxznbffqlbvd4clcmtl4wfc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/st\/ve\/bx\/stvebxznbffqlbvd4clcmtl4wfc.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/w3\/ju\/w8\/w3juw8t7nbr9vktv3gztczohdlg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/w3\/ju\/w8\/w3juw8t7nbr9vktv3gztczohdlg.png\"\/><br \/>  Deoldify stumbles over the simple but unusual theme and fails to represent a convincing result. At the same time, ColTran plays with the colors of the tattoo and flowers.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vs\/vj\/_s\/vsvj_szabf4gmck-rjwhpqodye4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vs\/vj\/_s\/vsvj_szabf4gmck-rjwhpqodye4.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vb\/d_\/zd\/vbd_zd_apcvlezrhhygs9ijptqg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vb\/d_\/zd\/vbd_zd_apcvlezrhhygs9ijptqg.png\"\/><br \/>  Looks like ColTran attempts to outstrip Deoldify, but the roof becomes an insuperable obstacle.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/d8\/54\/g0\/d854g07epnk9mu7znjtc1mcxfnq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/d8\/54\/g0\/d854g07epnk9mu7znjtc1mcxfnq.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qd\/ri\/jm\/qdrijm4vvienshy9dslrdvy0_fo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qd\/ri\/jm\/qdrijm4vvienshy9dslrdvy0_fo.png\"\/><br \/>  Deoldify produces a realistic but dull result, while ColTran contrives to nearly replicate the initial image.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/h6\/iy\/c_\/h6iyc_5xufi9xnowoba3zovzxlg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/h6\/iy\/c_\/h6iyc_5xufi9xnowoba3zovzxlg.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zl\/d6\/xc\/zld6xcvvdozaj0tofofr6fdadwc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/zl\/d6\/xc\/zld6xcvvdozaj0tofofr6fdadwc.png\"\/><br \/>  Although it seems, that Deoldify again is leading due to its modesty, ColTran shoots ahead, demonstrating miracles of the interplay between candlelight and the character (despite screwed-up hair and hands.)  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kc\/kt\/2u\/kckt2usfiyxmu2isdqwt1gacnke.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kc\/kt\/2u\/kckt2usfiyxmu2isdqwt1gacnke.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/gd\/y5\/6q\/gdy56qof-jfbqct3lhxnwp5vvfi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/gd\/y5\/6q\/gdy56qof-jfbqct3lhxnwp5vvfi.png\"\/><br \/>  Both messed up. That was an ultimately clumsy scene: space is filled with many overlapping objects and differently dressed people. Highly improbable that training sets contained scenes with fishermen in boats. ColTran barely sees the edges and the context, drawing strange colors and overshooting. Deoldify falls into extreme generalization, painting planks in woodgrain color, fabric in purple, light objects in white, and the rest of the scene also in purple.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/br\/tx\/uo\/brtxuoz1ymmaofmlqcbjlz_zppm.png\" data-src=\"https:\/\/habrastorage.org\/webt\/br\/tx\/uo\/brtxuoz1ymmaofmlqcbjlz_zppm.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bd\/c9\/-d\/bdc9-dtpczzzqlelhvvx5onceyu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bd\/c9\/-d\/bdc9-dtpczzzqlelhvvx5onceyu.png\"\/><br \/>  Applause to ColTran for its attempt to come out with a new type of camouflage. However, Deoldify managed to produce a more reasonable variant, despite minor bugs (the flag is painted correctly by accident, as this is a combination of red artefacts and a blue color, which is common for fabrics.)  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ei\/jp\/bz\/eijpbzdmsxyd0hq3byctba-pv0c.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ei\/jp\/bz\/eijpbzdmsxyd0hq3byctba-pv0c.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/cu\/xe\/1d\/cuxe1dqgqpkkfzhw6bwp4ncucma.png\" data-src=\"https:\/\/habrastorage.org\/webt\/cu\/xe\/1d\/cuxe1dqgqpkkfzhw6bwp4ncucma.png\"\/><br \/>  Oops! Deoldify is beaten. Once again, ColTran surprises with its bright creativity. This is so bad, that looks wonderful.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/8t\/cc\/pq\/8tccpqcblnhufa1eccsrn6rfsza.png\" data-src=\"https:\/\/habrastorage.org\/webt\/8t\/cc\/pq\/8tccpqcblnhufa1eccsrn6rfsza.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/7f\/ds\/ut\/7fdsutsqzzrkriinojmkldi8gxw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/7f\/ds\/ut\/7fdsutsqzzrkriinojmkldi8gxw.png\"\/><br \/>  It\u2019s difficult to favor anyone. ColTran achieved an interesting result, but white streetlights spoil everything. Deoldify did things smoothly, but something is missing.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ky\/vz\/so\/kyvzsox4c7doevz8ednm3ayd7ha.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ky\/vz\/so\/kyvzsox4c7doevz8ednm3ayd7ha.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/iw\/ga\/ks\/iwgaks2dlzkwpb5hzciema5gfw8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/iw\/ga\/ks\/iwgaks2dlzkwpb5hzciema5gfw8.png\"\/><br \/>  While ColTran experiments, Deoldify succeeds due to its conservatism.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5y\/g9\/xr\/5yg9xrywekjzlnbbakzsq8jarmg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/5y\/g9\/xr\/5yg9xrywekjzlnbbakzsq8jarmg.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ue\/jy\/1j\/uejy1j4jhunqwoviwaw5pneet-g.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ue\/jy\/1j\/uejy1j4jhunqwoviwaw5pneet-g.png\"\/><br \/>  Once again both algorithms mess things up, although there is nothing difficult: the sky, the sea, the sand, the girl. Suppose the problem is that the sand is framed with water and the girl is hanging in the air with her legs doubled up. Given the simplicity of the scene, none of the algorithms pass the test.   <\/div>\n<\/p><\/div>\n<p>  These experiments are enough to conclude, that ColTran + TensorFlow 2.4.1 on average show better results, so we continue to test exactly this combination. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qg\/0s\/2x\/qg0s2xlrs5j8i-scmehzp0kipm0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qg\/0s\/2x\/qg0s2xlrs5j8i-scmehzp0kipm0.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/oy\/x1\/-s\/oyx1-smcia51gmydpciri6uccbq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/oy\/x1\/-s\/oyx1-smcia51gmydpciri6uccbq.png\"\/><br \/>  Not bad, but nothing outstanding.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ix\/l6\/vb\/ixl6vbr5jcrfdoy1xjgmp2bzug0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ix\/l6\/vb\/ixl6vbr5jcrfdoy1xjgmp2bzug0.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/i3\/p6\/ta\/i3p6ta5m7md2194fnzqvkqiw7p4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/i3\/p6\/ta\/i3p6ta5m7md2194fnzqvkqiw7p4.png\"\/><br \/>  ColTran chooses the wrong colors, and Deoldify is also in doubt.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kd\/ak\/eb\/kdakebjz9wjhti7c14l7v4dezs0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kd\/ak\/eb\/kdakebjz9wjhti7c14l7v4dezs0.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fs\/na\/pg\/fsnapgc4cca-5o9rxf3aheurz0k.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fs\/na\/pg\/fsnapgc4cca-5o9rxf3aheurz0k.png\"\/><br \/>  The scene is simple, and Deoldify manages to process it. ColTran makes the picture more interesting but allows the numerical overflow due to the bright white color, which leads to some artefacts. Wow, the road marking is yellow! ColTran recognizes road marking!  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rg\/66\/w5\/rg66w5d05zj6fnax_ohztn65etk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/rg\/66\/w5\/rg66w5d05zj6fnax_ohztn65etk.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/cj\/ft\/hz\/cjfthzt-sz2r2ywmvozylr_wtxi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/cj\/ft\/hz\/cjfthzt-sz2r2ywmvozylr_wtxi.png\"\/><br \/>  Deoldify represents a typical interior. ColTran plays with the hair color, totally brightens the pillow, and if you omit the blue color, but take a closer look at the interior details, then you will notice how variably and reasonably they are painted. That\u2019s cool!  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/mm\/yf\/xe\/mmyfxezczdj7qrohaxhkpa6jry4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/mm\/yf\/xe\/mmyfxezczdj7qrohaxhkpa6jry4.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/x_\/wp\/dw\/x_wpdwzvmgpjmj3lh6mw3vrkjgu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/x_\/wp\/dw\/x_wpdwzvmgpjmj3lh6mw3vrkjgu.png\"\/><br \/>  Nothing surprising: Deoldify does good, while ColTran can\u2019t figure it out \u2013 why on Earth take a picture of a bicycle against the background of boats?  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/6u\/jd\/ev\/6ujdeveqpzyripsvr1a-fx_mdz0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/6u\/jd\/ev\/6ujdeveqpzyripsvr1a-fx_mdz0.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/6u\/ne\/hk\/6unehkmtpuhdvt-x299mmbn9vve.png\" data-src=\"https:\/\/habrastorage.org\/webt\/6u\/ne\/hk\/6unehkmtpuhdvt-x299mmbn9vve.png\"\/><br \/>  At long last, both did great! We can pick a winner from an artistic point of view. Suppose, that ColTran is more atmospheric here.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/li\/x_\/3l\/lix_3lh_pevarnm0mqgxbarskpi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/li\/x_\/3l\/lix_3lh_pevarnm0mqgxbarskpi.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9b\/ij\/o-\/9bijo-bse_2ocs2tzsgjgdqtrsi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9b\/ij\/o-\/9bijo-bse_2ocs2tzsgjgdqtrsi.png\"\/><br \/>  Here, ColTran should also have become a winner, but something went wrong.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/oa\/45\/yz\/oa45yzbmnwxzaakhnmh0zuib1iq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/oa\/45\/yz\/oa45yzbmnwxzaakhnmh0zuib1iq.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qm\/vq\/4a\/qmvq4a6z0kudicahuxxdf99plsk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qm\/vq\/4a\/qmvq4a6z0kudicahuxxdf99plsk.png\"\/><br \/>  Unexpectedly, ColTran did better.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4b\/l6\/vf\/4bl6vfgk_m7eggqcq1vsv32aumi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/4b\/l6\/vf\/4bl6vfgk_m7eggqcq1vsv32aumi.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lu\/pe\/sl\/lupeslhtxryx0nue1-1ncera0qc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/lu\/pe\/sl\/lupeslhtxryx0nue1-1ncera0qc.png\"\/><br \/>  Deoldify wins dejectedly.  <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kj\/ht\/lk\/kjhtlkl3ntyqrmjtddhdadz7xe4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kj\/ht\/lk\/kjhtlkl3ntyqrmjtddhdadz7xe4.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dc\/jm\/zn\/dcjmznqje-r08pjt-krdl2jujhc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/dc\/jm\/zn\/dcjmznqje-r08pjt-krdl2jujhc.png\"\/><br \/>  Deoldify wins less dejectedly.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/o7\/cn\/gj\/o7cngjuk19bavwl7rp8fgj0vfr4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/o7\/cn\/gj\/o7cngjuk19bavwl7rp8fgj0vfr4.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ku\/si\/h3\/kusih37ilx91my4upvbyowkna2m.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ku\/si\/h3\/kusih37ilx91my4upvbyowkna2m.png\"\/><br \/>  What an unexpected set-up: a handcrafted robot Bender from the cartoon surrounded by flowerpots on a promenade. ColTran even tried its best.   <\/div>\n<\/p><\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jz\/7v\/v7\/jz7vv7t2vwe-0u3uqmva8po59m8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jz\/7v\/v7\/jz7vv7t2vwe-0u3uqmva8po59m8.png\"\/>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Colorization by ColTran and Deoldify<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/02\/za\/pp\/02zappxcznhfijv0f9diseaj1aa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/02\/za\/pp\/02zappxcznhfijv0f9diseaj1aa.png\"\/><br \/>  ColTran is not bad, while Deoldify could do better.   <\/div>\n<\/p><\/div>\n<h2><font color=\"#3AC1EF\">\u258dRecap<\/font><\/h2>\n<p>  Time to choose a winner, but a situation is ambiguous. <font color=\"#3AC1EF\">ColTran<\/font> has achieved the highest number of great results. However, it makes critical mistakes too often and can only work with square images. Also, you will have to transfer color to the original image when operating with good resolutions. <\/p>\n<p>  As for <font color=\"#3AC1EF\">Deoldify<\/font>, it better suits practical usage, but I must admit, that this comparison was initially unfair. Firstly, Deoldify is a relatively honed tool, while ColTran is just a research project. Secondly, the Transformer architecture reveals its capabilities on large models and a large amount of training. Although all this is true for any algorithm, exactly for Transformer this leads to the difference between \u201cworks somehow\u201d and \u201cshows miracles\u201d. It reminds me of a joke:  <\/p>\n<blockquote><p>I\u2019m not concerned about the power of GPT-3, but the thought about GPT-4 scares the shit out of me.<\/p><\/blockquote>\n<p>The ColTran author only made research, while training a serious version of the algorithm requires much more resources. And who knows if someone ever is going to assume such expenses. <\/p>\n<p>  Long videos colorized by Deoldify expose the sameness of the palette, while ColTran behaves in a more diversified manner, which results in loss of stability. To build a video colorizing tool based on ColTran, you will have to deal with the question of colorizing the same objects through different scenes. Deoldify doesn\u2019t concern about that, as it uses averaged colors and similar objects get the same colorization. Deoldify became outdated a year ago, but it looks like this tool still remains the most adequate of all publicly available generic colorization algorithms. <\/p>\n<p>  In conclusion, I\u2019d like to add, that a <a href=\"https:\/\/www.youtube.com\/channel\/UCHyKQ9hMKkZbyMauI-XyASQ\/videos\">youtube channel not.bw<\/a> will continue to present new experiments with colorizing video. If it won\u2019t be deleted again, of course.<\/p>\n<p>  <a href=\"https:\/\/ruvds.com\/en-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=man_of_letters&amp;utm_content=Mode%20on:%20Comparing%20the%20two%20best%20colorization%20AI's\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/568426\/\"> https:\/\/habr.com\/ru\/articles\/568426\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"http:\/\/https:https:\/\/habr.com\/ru\/company\/ruvds\/blog\/567128\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ze\/ib\/sc\/zeibsc2epko12s1t_rrfscecju0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ze\/ib\/sc\/zeibsc2epko12s1t_rrfscecju0.png\"\/><\/div>\n<p><\/a><br \/>  This article continues a series of notes about colorization. During today&#8217;s experiment, we\u2019ll be comparing a recent neural network with the good old Deoldify to gauge the rate at which the future is approaching. <\/p>\n<p>  This is a practical project, so we won\u2019t pay extra attention to the underlying philosophy of the Transformer architecture. Besides, any attempt to explain the principles of its operation to a wide public in hand waving terms would become misguiding. <\/p>\n<p>  <i>A lecturer: Mr. Petrov! How does a transformer work? <br \/>  Petrov with a bass voice: Hum-m-m-m.<\/i><\/p>\n<h2><font color=\"#3AC1EF\">Google Colorizing Transformer vs Deoldify<\/font><\/h2>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-393087","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=393087"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393087\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=393087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=393087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}