FPN_UNet¶
- class mmocr.models.textdet.FPN_UNet(in_channels, out_channels, init_cfg={'distribution': 'uniform', 'layer': ['Conv2d', 'ConvTranspose2d'], 'type': 'Xavier'})[source]¶
The class for implementing DRRG and TextSnake U-Net-like FPN.
DRRG: Deep Relational Reasoning Graph Network for Arbitrary Shape Text Detection.
TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes.
- Parameters
- Return type
- forward(x)[source]¶
- Parameters
x (list[Tensor] | tuple[Tensor]) – A list of four tensors of shape \((N, C_i, H_i, W_i)\), representing C2, C3, C4, C5 features respectively. \(C_i\) should matches the number in
in_channels
.- Returns
Shape \((N, C, H, W)\) where \(H=4H_0\) and \(W=4W_0\).
- Return type
Tensor