Spaces:
Sleeping
Sleeping
COLORS = [ | |
[0.000, 0.447, 0.741], | |
[0.850, 0.325, 0.098], | |
[0.929, 0.694, 0.125], | |
[0.494, 0.184, 0.556], | |
[0.466, 0.674, 0.188], | |
[0.301, 0.745, 0.933], | |
[0.351, 0.760, 0.903], | |
] | |
MODELS_DETAILS = { | |
"DETR-RESNET-50": """DetrForObjectDetection( | |
(model): DetrModel( | |
(backbone): DetrConvModel( | |
(conv_encoder): DetrConvEncoder( | |
(model): FeatureListNet( | |
(conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False) | |
(layer1): Sequential( | |
(0): Bottleneck( | |
(conv1): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): 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): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(2): Bottleneck( | |
(conv1): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
) | |
(layer2): Sequential( | |
(0): Bottleneck( | |
(conv1): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): 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): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(2): Bottleneck( | |
(conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(3): Bottleneck( | |
(conv1): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
) | |
(layer3): Sequential( | |
(0): Bottleneck( | |
(conv1): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): 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): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(2): Bottleneck( | |
(conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(3): Bottleneck( | |
(conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(4): Bottleneck( | |
(conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(5): Bottleneck( | |
(conv1): Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(256, 1024, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
) | |
(layer4): Sequential( | |
(0): Bottleneck( | |
(conv1): Conv2d(1024, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(512, 2048, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
(downsample): Sequential( | |
(0): Conv2d(1024, 2048, kernel_size=(1, 1), stride=(2, 2), bias=False) | |
(1): BatchNorm2d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True) | |
) | |
) | |
(1): Bottleneck( | |
(conv1): Conv2d(2048, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(512, 2048, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
(2): Bottleneck( | |
(conv1): Conv2d(2048, 512, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn1): DetrFrozenBatchNorm2d() | |
(act1): ReLU(inplace=True) | |
(conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) | |
(bn2): DetrFrozenBatchNorm2d() | |
(drop_block): Identity() | |
(act2): ReLU(inplace=True) | |
(aa): Identity() | |
(conv3): Conv2d(512, 2048, kernel_size=(1, 1), stride=(1, 1), bias=False) | |
(bn3): DetrFrozenBatchNorm2d() | |
(act3): ReLU(inplace=True) | |
) | |
) | |
) | |
) | |
(position_embedding): DetrSinePositionEmbedding() | |
) | |
(input_projection): Conv2d(2048, 256, kernel_size=(1, 1), stride=(1, 1)) | |
(query_position_embeddings): Embedding(100, 256) | |
(encoder): DetrEncoder( | |
(layers): ModuleList( | |
(0-5): 6 x DetrEncoderLayer( | |
(self_attn): DetrAttention( | |
(k_proj): Linear(in_features=256, out_features=256, bias=True) | |
(v_proj): Linear(in_features=256, out_features=256, bias=True) | |
(q_proj): Linear(in_features=256, out_features=256, bias=True) | |
(out_proj): Linear(in_features=256, out_features=256, bias=True) | |
) | |
(self_attn_layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
(activation_fn): ReLU() | |
(fc1): Linear(in_features=256, out_features=2048, bias=True) | |
(fc2): Linear(in_features=2048, out_features=256, bias=True) | |
(final_layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
) | |
) | |
) | |
(decoder): DetrDecoder( | |
(layers): ModuleList( | |
(0-5): 6 x DetrDecoderLayer( | |
(self_attn): DetrAttention( | |
(k_proj): Linear(in_features=256, out_features=256, bias=True) | |
(v_proj): Linear(in_features=256, out_features=256, bias=True) | |
(q_proj): Linear(in_features=256, out_features=256, bias=True) | |
(out_proj): Linear(in_features=256, out_features=256, bias=True) | |
) | |
(activation_fn): ReLU() | |
(self_attn_layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
(encoder_attn): DetrAttention( | |
(k_proj): Linear(in_features=256, out_features=256, bias=True) | |
(v_proj): Linear(in_features=256, out_features=256, bias=True) | |
(q_proj): Linear(in_features=256, out_features=256, bias=True) | |
(out_proj): Linear(in_features=256, out_features=256, bias=True) | |
) | |
(encoder_attn_layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
(fc1): Linear(in_features=256, out_features=2048, bias=True) | |
(fc2): Linear(in_features=2048, out_features=256, bias=True) | |
(final_layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
) | |
) | |
(layernorm): LayerNorm((256,), eps=1e-05, elementwise_affine=True) | |
) | |
) | |
(class_labels_classifier): Linear(in_features=256, out_features=2, bias=True) | |
(bbox_predictor): DetrMLPPredictionHead( | |
(layers): ModuleList( | |
(0-1): 2 x Linear(in_features=256, out_features=256, bias=True) | |
(2): Linear(in_features=256, out_features=4, bias=True) | |
) | |
) | |
)""" | |
} | |