Dense Prediction Model PyTorch Summary: ---------------------------------------------------------------- (backbone): ResUNet( (firstconv): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False) (firstbn): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (firstrelu): ReLU(inplace=True) (firstmaxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False) (encoder1): Sequential( (0): Bottleneck( (conv1): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) (downsample): Sequential( (0): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) (1): Bottleneck( (conv1): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (2): Bottleneck( (conv1): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) ) (encoder2): Sequential( (0): Bottleneck( (conv1): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False) (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) (downsample): Sequential( (0): Conv2d(256, 512, kernel_size=(1, 1), stride=(2, 2), bias=False) (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) (1): Bottleneck( (conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (2): Bottleneck( (conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (3): Bottleneck( (conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) ) (encoder3): Sequential( (0): Bottleneck( (conv1): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) (downsample): Sequential( (0): Conv2d(512, 1024, kernel_size=(1, 1), stride=(2, 2), bias=False) (1): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) (1): Bottleneck( (conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (2): Bottleneck( (conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (3): Bottleneck( (conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (4): Bottleneck( (conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) (5): Bottleneck( (conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) (bn3): BatchNorm2d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) (relu): ReLU(inplace=True) ) ) (upconv4): upconv( (conv1): conv( (conv_base): Conv2d(1024, 512, kernel_size=(3, 3), stride=(1, 1)) (normalize): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) (iconv4): conv( (conv_base): Conv2d(1024, 512, kernel_size=(3, 3), stride=(1, 1)) (normalize): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) (upconv3): upconv( (conv1): conv( (conv_base): Conv2d(512, 256, kernel_size=(3, 3), stride=(1, 1)) (normalize): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) (iconv3): conv( (conv_base): Conv2d(512, 256, kernel_size=(3, 3), stride=(1, 1)) (normalize): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) (outconv): conv( (conv_base): Conv2d(256, 2, kernel_size=(1, 1), stride=(1, 1)) (normalize): BatchNorm2d(2, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) ) ) Params and Shape Summary: ---------------------------------------------------------------- Layer (type) Output Shape Param # ================================================================ Conv2d-1 [-1, 64, 240, 320] 9,408 BatchNorm2d-2 [-1, 64, 240, 320] 128 ReLU-3 [-1, 64, 240, 320] 0 MaxPool2d-4 [-1, 64, 120, 160] 0 Conv2d-5 [-1, 64, 120, 160] 4,096 BatchNorm2d-6 [-1, 64, 120, 160] 128 ReLU-7 [-1, 64, 120, 160] 0 Conv2d-8 [-1, 64, 120, 160] 36,864 BatchNorm2d-9 [-1, 64, 120, 160] 128 ReLU-10 [-1, 64, 120, 160] 0 Conv2d-11 [-1, 256, 120, 160] 16,384 BatchNorm2d-12 [-1, 256, 120, 160] 512 Conv2d-13 [-1, 256, 120, 160] 16,384 BatchNorm2d-14 [-1, 256, 120, 160] 512 ReLU-15 [-1, 256, 120, 160] 0 Bottleneck-16 [-1, 256, 120, 160] 0 Conv2d-17 [-1, 64, 120, 160] 16,384 BatchNorm2d-18 [-1, 64, 120, 160] 128 ReLU-19 [-1, 64, 120, 160] 0 Conv2d-20 [-1, 64, 120, 160] 36,864 BatchNorm2d-21 [-1, 64, 120, 160] 128 ReLU-22 [-1, 64, 120, 160] 0 Conv2d-23 [-1, 256, 120, 160] 16,384 BatchNorm2d-24 [-1, 256, 120, 160] 512 ReLU-25 [-1, 256, 120, 160] 0 Bottleneck-26 [-1, 256, 120, 160] 0 Conv2d-27 [-1, 64, 120, 160] 16,384 BatchNorm2d-28 [-1, 64, 120, 160] 128 ReLU-29 [-1, 64, 120, 160] 0 Conv2d-30 [-1, 64, 120, 160] 36,864 BatchNorm2d-31 [-1, 64, 120, 160] 128 ReLU-32 [-1, 64, 120, 160] 0 Conv2d-33 [-1, 256, 120, 160] 16,384 BatchNorm2d-34 [-1, 256, 120, 160] 512 ReLU-35 [-1, 256, 120, 160] 0 Bottleneck-36 [-1, 256, 120, 160] 0 Conv2d-37 [-1, 128, 120, 160] 32,768 BatchNorm2d-38 [-1, 128, 120, 160] 256 ReLU-39 [-1, 128, 120, 160] 0 Conv2d-40 [-1, 128, 60, 80] 147,456 BatchNorm2d-41 [-1, 128, 60, 80] 256 ReLU-42 [-1, 128, 60, 80] 0 Conv2d-43 [-1, 512, 60, 80] 65,536 BatchNorm2d-44 [-1, 512, 60, 80] 1,024 Conv2d-45 [-1, 512, 60, 80] 131,072 BatchNorm2d-46 [-1, 512, 60, 80] 1,024 ReLU-47 [-1, 512, 60, 80] 0 Bottleneck-48 [-1, 512, 60, 80] 0 Conv2d-49 [-1, 128, 60, 80] 65,536 BatchNorm2d-50 [-1, 128, 60, 80] 256 ReLU-51 [-1, 128, 60, 80] 0 Conv2d-52 [-1, 128, 60, 80] 147,456 BatchNorm2d-53 [-1, 128, 60, 80] 256 ReLU-54 [-1, 128, 60, 80] 0 Conv2d-55 [-1, 512, 60, 80] 65,536 BatchNorm2d-56 [-1, 512, 60, 80] 1,024 ReLU-57 [-1, 512, 60, 80] 0 Bottleneck-58 [-1, 512, 60, 80] 0 Conv2d-59 [-1, 128, 60, 80] 65,536 BatchNorm2d-60 [-1, 128, 60, 80] 256 ReLU-61 [-1, 128, 60, 80] 0 Conv2d-62 [-1, 128, 60, 80] 147,456 BatchNorm2d-63 [-1, 128, 60, 80] 256 ReLU-64 [-1, 128, 60, 80] 0 Conv2d-65 [-1, 512, 60, 80] 65,536 BatchNorm2d-66 [-1, 512, 60, 80] 1,024 ReLU-67 [-1, 512, 60, 80] 0 Bottleneck-68 [-1, 512, 60, 80] 0 Conv2d-69 [-1, 128, 60, 80] 65,536 BatchNorm2d-70 [-1, 128, 60, 80] 256 ReLU-71 [-1, 128, 60, 80] 0 Conv2d-72 [-1, 128, 60, 80] 147,456 BatchNorm2d-73 [-1, 128, 60, 80] 256 ReLU-74 [-1, 128, 60, 80] 0 Conv2d-75 [-1, 512, 60, 80] 65,536 BatchNorm2d-76 [-1, 512, 60, 80] 1,024 ReLU-77 [-1, 512, 60, 80] 0 Bottleneck-78 [-1, 512, 60, 80] 0 Conv2d-79 [-1, 256, 60, 80] 131,072 BatchNorm2d-80 [-1, 256, 60, 80] 512 ReLU-81 [-1, 256, 60, 80] 0 Conv2d-82 [-1, 256, 30, 40] 589,824 BatchNorm2d-83 [-1, 256, 30, 40] 512 ReLU-84 [-1, 256, 30, 40] 0 Conv2d-85 [-1, 1024, 30, 40] 262,144 BatchNorm2d-86 [-1, 1024, 30, 40] 2,048 Conv2d-87 [-1, 1024, 30, 40] 524,288 BatchNorm2d-88 [-1, 1024, 30, 40] 2,048 ReLU-89 [-1, 1024, 30, 40] 0 Bottleneck-90 [-1, 1024, 30, 40] 0 Conv2d-91 [-1, 256, 30, 40] 262,144 BatchNorm2d-92 [-1, 256, 30, 40] 512 ReLU-93 [-1, 256, 30, 40] 0 Conv2d-94 [-1, 256, 30, 40] 589,824 BatchNorm2d-95 [-1, 256, 30, 40] 512 ReLU-96 [-1, 256, 30, 40] 0 Conv2d-97 [-1, 1024, 30, 40] 262,144 BatchNorm2d-98 [-1, 1024, 30, 40] 2,048 ReLU-99 [-1, 1024, 30, 40] 0 Bottleneck-100 [-1, 1024, 30, 40] 0 Conv2d-101 [-1, 256, 30, 40] 262,144 BatchNorm2d-102 [-1, 256, 30, 40] 512 ReLU-103 [-1, 256, 30, 40] 0 Conv2d-104 [-1, 256, 30, 40] 589,824 BatchNorm2d-105 [-1, 256, 30, 40] 512 ReLU-106 [-1, 256, 30, 40] 0 Conv2d-107 [-1, 1024, 30, 40] 262,144 BatchNorm2d-108 [-1, 1024, 30, 40] 2,048 ReLU-109 [-1, 1024, 30, 40] 0 Bottleneck-110 [-1, 1024, 30, 40] 0 Conv2d-111 [-1, 256, 30, 40] 262,144 BatchNorm2d-112 [-1, 256, 30, 40] 512 ReLU-113 [-1, 256, 30, 40] 0 Conv2d-114 [-1, 256, 30, 40] 589,824 BatchNorm2d-115 [-1, 256, 30, 40] 512 ReLU-116 [-1, 256, 30, 40] 0 Conv2d-117 [-1, 1024, 30, 40] 262,144 BatchNorm2d-118 [-1, 1024, 30, 40] 2,048 ReLU-119 [-1, 1024, 30, 40] 0 Bottleneck-120 [-1, 1024, 30, 40] 0 Conv2d-121 [-1, 256, 30, 40] 262,144 BatchNorm2d-122 [-1, 256, 30, 40] 512 ReLU-123 [-1, 256, 30, 40] 0 Conv2d-124 [-1, 256, 30, 40] 589,824 BatchNorm2d-125 [-1, 256, 30, 40] 512 ReLU-126 [-1, 256, 30, 40] 0 Conv2d-127 [-1, 1024, 30, 40] 262,144 BatchNorm2d-128 [-1, 1024, 30, 40] 2,048 ReLU-129 [-1, 1024, 30, 40] 0 Bottleneck-130 [-1, 1024, 30, 40] 0 Conv2d-131 [-1, 256, 30, 40] 262,144 BatchNorm2d-132 [-1, 256, 30, 40] 512 ReLU-133 [-1, 256, 30, 40] 0 Conv2d-134 [-1, 256, 30, 40] 589,824 BatchNorm2d-135 [-1, 256, 30, 40] 512 ReLU-136 [-1, 256, 30, 40] 0 Conv2d-137 [-1, 1024, 30, 40] 262,144 BatchNorm2d-138 [-1, 1024, 30, 40] 2,048 ReLU-139 [-1, 1024, 30, 40] 0 Bottleneck-140 [-1, 1024, 30, 40] 0 Conv2d-141 [-1, 512, 60, 80] 4,719,104 BatchNorm2d-142 [-1, 512, 60, 80] 1,024 conv-143 [-1, 512, 60, 80] 0 upconv-144 [-1, 512, 60, 80] 0 Conv2d-145 [-1, 512, 60, 80] 4,719,104 BatchNorm2d-146 [-1, 512, 60, 80] 1,024 conv-147 [-1, 512, 60, 80] 0 Conv2d-148 [-1, 256, 120, 160] 1,179,904 BatchNorm2d-149 [-1, 256, 120, 160] 512 conv-150 [-1, 256, 120, 160] 0 upconv-151 [-1, 256, 120, 160] 0 Conv2d-152 [-1, 256, 120, 160] 1,179,904 BatchNorm2d-153 [-1, 256, 120, 160] 512 conv-154 [-1, 256, 120, 160] 0 Conv2d-155 [-1, 2, 120, 160] 514 BatchNorm2d-156 [-1, 2, 120, 160] 4 conv-157 [-1, 2, 120, 160] 0 ResUNet-158 [[-1, 2, 120, 160], [-1, 256, 120, 160]] 0 ================================================================ Total params: 20,344,902 Trainable params: 20,344,902 Non-trainable params: 0 ----------------------------------------------------------------