facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.96k stars 7.41k forks source link

What should I do if the detectron2 removes the instances though the dataset is already in the COCO format? #2907

Closed cnr0724 closed 3 years ago

cnr0724 commented 3 years ago

Instructions To Reproduce the πŸ› Bug:

  1. Full runnable code or full changes you made: Nothing. I just tried to run code with custom datasets

  2. What exact command you run:

  3. Full logs or other relevant observations:

    
    [04/14 08:28:29 d2.data.datasets.coco]: Loading /root/visdrone/train/instances_train.json takes 2.98 seconds.
    [04/14 08:28:29 d2.data.datasets.coco]: Loaded 9344 images in COCO format from /root/visdrone/train/instances_train.json
    WARNING [04/14 08:28:30 d2.data.datasets.coco]: Filtered out 506985 instances without valid segmentation. There might be issues in your dataset generation process. A valid polygon should be a list[float] with even length >= 6.
    WARNING [04/14 08:28:30 d2.config.compat]: Config '/root/CenterNet2/projects/CenterNet2/configs/CenterNet2_DLA-BiFPN-P5_640_24x_ST.yaml' has no VERSION. Assuming it to be compatible with latest v2.
    Loading pretrained DLA!
    GeneralizedRCNN(
    (backbone): BiFPN(
    (bottom_up): BackboneWithTopLevels(
      (backbone): DLA(
        (base_layer): Sequential(
          (0): Conv2d(3, 16, kernel_size=(7, 7), stride=(1, 1), padding=(3, 3), bias=False)
          (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): ReLU(inplace=True)
        )
        (level0): Sequential(
          (0): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
          (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): ReLU(inplace=True)
        )
        (level1): Sequential(
          (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
          (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): ReLU(inplace=True)
        )
        (level2): Tree(
          (tree1): BasicBlock(
            (conv1): Conv2d(32, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
            (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=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)
          )
          (tree2): BasicBlock(
            (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
            (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=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)
          )
          (root): Root(
            (conv): Conv2d(128, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
            (bn): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=True)
          )
          (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
          (project): Sequential(
            (0): Conv2d(32, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
            (1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
        )
        (level3): Tree(
          (tree1): Tree(
            (tree1): BasicBlock(
              (conv1): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (tree2): BasicBlock(
              (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (root): Root(
              (conv): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
              (bn): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=True)
            )
            (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
            (project): Sequential(
              (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
              (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            )
          )
          (tree2): Tree(
            (tree1): BasicBlock(
              (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (tree2): BasicBlock(
              (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (root): Root(
              (conv): Conv2d(448, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
              (bn): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=True)
            )
          )
          (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
          (project): Sequential(
            (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)
            (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
        )
        (level4): Tree(
          (tree1): Tree(
            (tree1): BasicBlock(
              (conv1): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (tree2): BasicBlock(
              (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (root): Root(
              (conv): Conv2d(512, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
              (bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=True)
            )
            (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
            (project): Sequential(
              (0): Conv2d(128, 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)
            )
          )
          (tree2): Tree(
            (tree1): BasicBlock(
              (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (tree2): BasicBlock(
              (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
              (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=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)
            )
            (root): Root(
              (conv): Conv2d(896, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)
              (bn): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
              (relu): ReLU(inplace=True)
            )
          )
          (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
          (project): Sequential(
            (0): Conv2d(128, 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)
          )
        )
        (level5): Tree(
          (tree1): BasicBlock(
            (conv1): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
            (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=True)
            (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
            (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
          (tree2): BasicBlock(
            (conv1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
            (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=True)
            (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
            (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
          (root): Root(
            (conv): Conv2d(1280, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
            (bn): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
            (relu): ReLU(inplace=True)
          )
          (downsample): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
          (project): Sequential(
            (0): Conv2d(256, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)
            (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          )
        )
      )
      (dla6): FeatureMapResampler(
        (reduction): Conv2d(
          512, 160, kernel_size=(1, 1), stride=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
      )
      (dla7): FeatureMapResampler()
    )
    (repeated_bifpn): ModuleList(
      (0): SingleBiFPN(
        (outputs_f3_3_4): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (lateral_2_f2): Conv2d(
          512, 160, kernel_size=(1, 1), stride=(1, 1)
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_5): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (lateral_1_f1): Conv2d(
          256, 160, kernel_size=(1, 1), stride=(1, 1)
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_6): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (lateral_0_f0): Conv2d(
          128, 160, kernel_size=(1, 1), stride=(1, 1)
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f0_0_7): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_7_8): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_6_9): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f3_3_5_10): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f4_4_11): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
      )
      (1): SingleBiFPN(
        (outputs_f3_3_4): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_5): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_6): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f0_0_7): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_7_8): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_6_9): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f3_3_5_10): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f4_4_11): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
      )
      (2): SingleBiFPN(
        (outputs_f3_3_4): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_5): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_6): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f0_0_7): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f1_1_7_8): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f2_2_6_9): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f3_3_5_10): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
        (outputs_f4_4_11): Conv2d(
          160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False
          (norm): GroupNorm(32, 160, eps=1e-05, affine=True)
        )
      )
    )
    )
    (proposal_generator): CenterNet(
    (iou_loss): IOULoss()
    (centernet_head): CenterNetHead(
      (cls_tower): Sequential()
      (bbox_tower): Sequential(
        (0): Conv2d(160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (1): GroupNorm(32, 160, eps=1e-05, affine=True)
        (2): ReLU()
        (3): Conv2d(160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (4): GroupNorm(32, 160, eps=1e-05, affine=True)
        (5): ReLU()
        (6): Conv2d(160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (7): GroupNorm(32, 160, eps=1e-05, affine=True)
        (8): ReLU()
        (9): Conv2d(160, 160, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
        (10): GroupNorm(32, 160, eps=1e-05, affine=True)
        (11): ReLU()
      )
      (share_tower): Sequential()
      (bbox_pred): Conv2d(160, 4, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (scales): ModuleList(
        (0): Scale()
        (1): Scale()
        (2): Scale()
        (3): Scale()
        (4): Scale()
      )
      (agn_hm): Conv2d(160, 1, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    )
    )
    (roi_heads): CustomCascadeROIHeads(
    (box_pooler): ROIPooler(
      (level_poolers): ModuleList(
        (0): ROIAlign(output_size=(7, 7), spatial_scale=0.125, sampling_ratio=0, aligned=True)
        (1): ROIAlign(output_size=(7, 7), spatial_scale=0.0625, sampling_ratio=0, aligned=True)
        (2): ROIAlign(output_size=(7, 7), spatial_scale=0.03125, sampling_ratio=0, aligned=True)
        (3): ROIAlign(output_size=(7, 7), spatial_scale=0.015625, sampling_ratio=0, aligned=True)
        (4): ROIAlign(output_size=(7, 7), spatial_scale=0.0078125, sampling_ratio=0, aligned=True)
      )
    )
    (box_head): ModuleList(
      (0): FastRCNNConvFCHead(
        (flatten): Flatten(start_dim=1, end_dim=-1)
        (fc1): Linear(in_features=7840, out_features=1024, bias=True)
        (fc_relu1): ReLU()
        (fc2): Linear(in_features=1024, out_features=1024, bias=True)
        (fc_relu2): ReLU()
      )
      (1): FastRCNNConvFCHead(
        (flatten): Flatten(start_dim=1, end_dim=-1)
        (fc1): Linear(in_features=7840, out_features=1024, bias=True)
        (fc_relu1): ReLU()
        (fc2): Linear(in_features=1024, out_features=1024, bias=True)
        (fc_relu2): ReLU()
      )
      (2): FastRCNNConvFCHead(
        (flatten): Flatten(start_dim=1, end_dim=-1)
        (fc1): Linear(in_features=7840, out_features=1024, bias=True)
        (fc_relu1): ReLU()
        (fc2): Linear(in_features=1024, out_features=1024, bias=True)
        (fc_relu2): ReLU()
      )
    )
    (box_predictor): ModuleList(
      (0): CustomFastRCNNOutputLayers(
        (cls_score): Linear(in_features=1024, out_features=11, bias=True)
        (bbox_pred): Linear(in_features=1024, out_features=4, bias=True)
      )
      (1): CustomFastRCNNOutputLayers(
        (cls_score): Linear(in_features=1024, out_features=11, bias=True)
        (bbox_pred): Linear(in_features=1024, out_features=4, bias=True)
      )
      (2): CustomFastRCNNOutputLayers(
        (cls_score): Linear(in_features=1024, out_features=11, bias=True)
        (bbox_pred): Linear(in_features=1024, out_features=4, bias=True)
      )
    )
    )
    )
    [04/14 08:28:35 d2.data.datasets.coco]: Loading /root/visdrone/train/instances_train.json takes 2.95 seconds.
    [04/14 08:28:35 d2.data.datasets.coco]: Loaded 9344 images in COCO format from /root/visdrone/train/instances_train.json
    WARNING [04/14 08:28:36 d2.data.datasets.coco]: Filtered out 506985 instances without valid segmentation. There might be issues in your dataset generation process. A valid polygon should be a list[float] with even length >= 6.
    [04/14 08:28:36 d2.data.build]: Removed 9344 images with no usable annotations. 0 images left.
    [04/14 08:28:36 d2.data.build]: Distribution of instances among all 11 categories:
    |  category  | #instances   |   category    | #instances   |  category  | #instances   |
    |:----------:|:-------------|:-------------:|:-------------|:----------:|:-------------|
    | pedestrian | 0            |    people     | 0            |  bicycle   | 0            |
    |    car     | 0            |      van      | 0            |   truck    | 0            |
    |  tricycle  | 0            | awning-tric.. | 0            |    bus     | 0            |
    |   motor    | 0            |    others     | 0            |            |              |
    |   total    | 0            |               |              |            |              |
    Traceback (most recent call last):
    File "train.py", line 49, in <module>
    trainer = DefaultTrainer(cfg)
    File "/root/detectron2/detectron2/engine/defaults.py", line 312, in __init__
    data_loader = self.build_train_loader(cfg)
    File "/root/detectron2/detectron2/engine/defaults.py", line 485, in build_train_loader
    return build_detection_train_loader(cfg)
    File "/root/detectron2/detectron2/config/config.py", line 192, in wrapped
    explicit_args = _get_args_from_config(from_config, *args, **kwargs)
    File "/root/detectron2/detectron2/config/config.py", line 229, in _get_args_from_config
    ret = from_config_func(*args, **kwargs)
    File "/root/detectron2/detectron2/data/build.py", line 308, in _train_loader_from_config
    dataset = get_detection_dataset_dicts(
    File "/root/detectron2/detectron2/data/build.py", line 255, in get_detection_dataset_dicts
    assert len(dataset_dicts), "No valid data found in {}.".format(",".join(names))
    AssertionError: No valid data found in dronedataset.
4. please simplify the steps as much as possible so they do not require additional resources to
   run, such as a private dataset.

## Expected behavior:

If there are no obvious error in "full logs" provided above,
please tell us the expected behavior.

## Environment:

Provide your environment information using the following command:

sys.platform linux Python 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] numpy 1.19.2 detectron2 0.4 @/root/detectron2/detectron2 Compiler GCC 7.5 CUDA compiler CUDA 11.0 detectron2 arch flags 8.0 DETECTRON2_ENV_MODULE PyTorch 1.7.0 @/opt/conda/lib/python3.8/site-packages/torch PyTorch debug build True GPU available True GPU 0 GeForce RTX 3090 (arch=8.6) CUDA_HOME /usr/local/cuda Pillow 8.0.0 torchvision 0.8.0 @/opt/conda/lib/python3.8/site-packages/torchvision torchvision arch flags 3.5, 5.0, 6.0, 7.0, 7.5, 8.0 fvcore 0.1.5.post20210402 iopath 0.1.7 cv2 4.5.1


PyTorch built with:



If your issue looks like an installation issue / environment issue,
please first try to solve it yourself with the instructions in
https://detectron2.readthedocs.io/tutorials/install.html#common-installation-issues
ppwwyyxx commented 3 years ago

As the log says:

There might be issues in your dataset generation process. A valid polygon should be a list[float] with even length >= 6.

cnr0724 commented 3 years ago

It already is. One of the polygon is like {"id": 1, "image_id": 0, "category_id": 4, "segmentation": [[948.0, 592.0], [1010.0, 592.0], [948.0, 684.0], [1010.0, 684.0]], "area": 5704.0, "bbox": [948.0, 592.0, 62.0, 92.0], "iscrowd": 0}.

ppwwyyxx commented 3 years ago

"segmentation" in the above comment is not in the format documented at https://detectron2.readthedocs.io/en/latest/tutorials/datasets.html.

[[948.0, 592.0, 1010.0, 592.0, 948.0, 684.0, 1010.0, 684.0]] looks correct.

cnr0724 commented 3 years ago

Thank you!