Shortcuts

mmedit.models.editors.inst_colorization.fusion_net

Module Contents

Classes

FusionNet

Instance-aware Image Colorization.

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

Bases: mmengine.model.BaseModule

Instance-aware Image Colorization.

https://arxiv.org/abs/2005.10825

Codes adapted from ‘https://github.com/ericsujw/InstColorization.git’ ‘InstColorization/blob/master/models/networks.py#L314’ FusionNet: the full image model with weight layer for fusion.

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, instance_feature, box_info_list)[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

  • instance_feature (dict) – A bunch of instance features

  • box_info_list (list) – Bounding box information corresponding to the instance

Returns

Regression output

Return type

out_reg (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.