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

ImageColorize[image] is equivalent to ImageColorize[image,”ColorNet Image Colorization Trained on ImageNet Competition Data”]
More colorization nets are available in the Neural Net Repository https://resources.wolframcloud.com/NeuralNetRepository/tasktype/Image-Processing/

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/068a5dd4-993f-4df4-bd60-06ca4c40ce02"]
Out[1]=

Specify a different net:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/b9d63cd4-9d4a-4ab7-af58-f30340d3cdc6"]
Out[2]=

Use an image from the 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

See Also

License Information