Wolfram Research

Function Repository Resource:

ImageColorize

Source Notebook

Colorize an image using a trained neural network

Contributed by: Bob Sandheinrich

ResourceFunction["ImageColorize"][image]

colorizes a grayscale image.

ResourceFunction["ImageColorize"][image, net]

colorizes the image using the given net.

Details and Options

ResourceFunction["ImageColorize"][image] is equivalent to ResourceFunction["ImageColorize"][image,"ColorNet Image Colorization Trained on ImageNet Competition Data"].
More colorization nets are available among the image processing tools in the Wolfram Neural Net Repository.

Examples

Basic Examples

Colorize an image using the default net:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/08162657-cbb4-44ae-82ee-4aa7f2dd6e77"]
Out[1]=

Specify a different net:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/8e7f012c-a5b4-439d-8a30-ddcc87d7a617"]
Out[2]=

Use an image from the Wolfram Data Repository:

In[3]:=
# -> ColorConvert[#, "Grayscale"] -> ResourceFunction["ImageColorize"][ColorConvert[#, "Grayscale"]] &@
 ResourceData["Sample Image: Orange Butterfly on a Purple Flower"]
Out[3]=

Scope

Retrieve the ResourceFunction:

In[4]:=
ResourceFunction["ImageColorize"]
Out[4]=

Retrieve the ResourceObject:

In[5]:=
ResourceObject["ImageColorize"]
Out[5]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information