deeplabcut.pose_estimation_pytorch.models.modules.conv_block
The code is based on DEKR: https://github.com/HRNet/DEKR/tree/main
Classes:
| Name | Description |
|---|---|
AdaptBlock |
Adaptive Residual Block with Deformable Convolution. |
BaseBlock |
Abstract Base class for defining custom blocks. |
BasicBlock |
Basic Residual Block. |
Bottleneck |
Bottleneck Residual Block. |
AdaptBlock
Bases: BaseBlock
Adaptive Residual Block with Deformable Convolution.
This class defines an adaptive residual block with deformable convolution used in HigherHRNet.
Attributes:
| Name | Type | Description |
|---|---|---|
expansion |
int
|
The expansion factor used in the block. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Number of input channels. |
required |
|
int
|
Number of output channels. |
required |
|
int
|
Stride value for the convolutional layers. Default is 1. |
1
|
|
Module | None
|
Downsample layer to be used in the residual connection. Default is None. |
None
|
|
int
|
Dilation rate for the convolutional layers. Default is 1. |
1
|
|
int
|
Number of deformable groups in the deformable convolution. Default is 1. |
1
|
Methods:
| Name | Description |
|---|---|
forward |
Forward pass through the AdaptBlock. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
forward
Forward pass through the AdaptBlock.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Tensor
|
Input tensor. |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Output tensor. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
BaseBlock
Abstract Base class for defining custom blocks.
This class defines an abstract base class for creating custom blocks used in the HigherHRNet for Human Pose Estimation.
Attributes:
| Name | Type | Description |
|---|---|---|
bn_momentum |
Batch normalization momentum. |
Methods:
| Name | Description |
|---|---|
forward |
Abstract method for defining the forward pass of the block. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
forward
abstractmethod
Abstract method for defining the forward pass of the block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Tensor
|
Input tensor. |
required |
Returns:
| Type | Description |
|---|---|
|
Output tensor. |
BasicBlock
Bases: BaseBlock
Basic Residual Block.
This class defines a basic residual block used in HigherHRNet.
Attributes:
| Name | Type | Description |
|---|---|---|
expansion |
int
|
The expansion factor used in the block. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Number of input channels. |
required |
|
int
|
Number of output channels. |
required |
|
int
|
Stride value for the convolutional layers. Default is 1. |
1
|
|
Module | None
|
Downsample layer to be used in the residual connection. Default is None. |
None
|
|
int
|
Dilation rate for the convolutional layers. Default is 1. |
1
|
Methods:
| Name | Description |
|---|---|
forward |
Forward pass through the BasicBlock. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
forward
Forward pass through the BasicBlock.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Tensor
|
Input tensor. |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Output tensor. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
Bottleneck
Bases: BaseBlock
Bottleneck Residual Block.
This class defines a bottleneck residual block used in HigherHRNet.
Attributes:
| Name | Type | Description |
|---|---|---|
expansion |
int
|
The expansion factor used in the block. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Number of input channels. |
required |
|
int
|
Number of output channels. |
required |
|
int
|
Stride value for the convolutional layers. Default is 1. |
1
|
|
Module | None
|
Downsample layer to be used in the residual connection. Default is None. |
None
|
|
int
|
Dilation rate for the convolutional layers. Default is 1. |
1
|
Methods:
| Name | Description |
|---|---|
forward |
Forward pass through the Bottleneck block. |
Source code in deeplabcut/pose_estimation_pytorch/models/modules/conv_block.py
forward
Forward pass through the Bottleneck block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Input tensor. |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Output tensor. |