Shortcuts

FPNF

class mmocr.models.textdet.FPNF(in_channels=[256, 512, 1024, 2048], out_channels=256, fusion_type='concat', init_cfg={'distribution': 'uniform', 'layer': 'Conv2d', 'type': 'Xavier'})[source]

FPN-like fusion module in Shape Robust Text Detection with Progressive Scale Expansion Network.

Parameters
  • in_channels (list[int]) – A list of number of input channels. Defaults to [256, 512, 1024, 2048].

  • out_channels (int) – The number of output channels. Defaults to 256.

  • fusion_type (str) – Type of the final feature fusion layer. Available options are “concat” and “add”. Defaults to “concat”.

  • init_cfg (dict or list[dict], optional) – Initialization configs. Defaults to dict(type=’Xavier’, layer=’Conv2d’, distribution=’uniform’)

Return type

None

forward(inputs)[source]
Parameters

inputs (list[Tensor]) – Each tensor has the shape of \((N, C_i, H_i, W_i)\). It usually expects 4 tensors (C2-C5 features) from ResNet.

Returns

A tensor of shape \((N, C_{out}, H_0, W_0)\) where \(C_{out}\) is out_channels.

Return type

Tensor

Read the Docs v: dev-1.x
Versions
latest
stable
v1.0.1
v1.0.0
0.x
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.