Shortcuts

mmedit.models.editors.inst_colorization.colorization_net

Module Contents

Classes

ColorizationNet

Real-Time User-Guided Image Colorization with Learned Deep Priors. The

class mmedit.models.editors.inst_colorization.colorization_net.ColorizationNet(input_nc, output_nc, norm_type, use_tanh=True, classification=True)[source]

Bases: mmengine.model.BaseModule

Real-Time User-Guided Image Colorization with Learned Deep Priors. The backbone used for.

https://arxiv.org/abs/1705.02999

Codes adapted from ‘https://github.com/ericsujw/InstColorization.git’ ‘InstColorization/blob/master/models/networks.py#L108’

Parameters
  • input_nc (int) – input image channels

  • output_nc (int) – output image channels

  • norm_type (str) – instance normalization or batch normalization

  • use_tanh (bool) – Whether to use nn.Tanh() Default: True.

  • classification (bool) – backprop trunk using classification, otherwise use regression. Default: True

forward(input_A, input_B, mask_B)[source]

Forward function.

Parameters
  • input_A (tensor) – Channel of the image in lab color space

  • input_B (tensor) – Color patch

  • mask_B (tensor) – Color patch mask

Returns

Classification output out_reg (tensor): Regression output feature_map (dict): The full-image feature

Return type

out_class (tensor)

Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.