From 9477519fec806cfee7d95d0c168cd00ca7a928c6 Mon Sep 17 00:00:00 2001 From: fcakyon Date: Sat, 19 Mar 2022 17:48:25 +0300 Subject: [PATCH] update configs to latest --- .../visdrone_fcos/fcos_crop_480_960_cls_60.py | 115 ++++++++++++ .../fcos_full_cls_60.py} | 100 ++-------- .../visdrone_tood/tood_crop_480_960_cls_60.py | 113 ++++++++++++ .../visdrone_tood/tood_full_cls_60.py | 98 ++++++++++ .../vfnet_crop_480_960_cls_60.py | 115 ++++++++++++ .../vfnet_full_cls_60.py} | 102 ++-------- .../xview_fcos/fcos_crop_300_500_cls_60.py | 44 +++-- mmdet_configs/xview_fcos/fcos_full_cls_60.py | 20 +- .../xview_tood/tood_crop_300_500_cls_60.py | 46 +++-- .../xview_tood/tood_crop_300_9999_cls_60.py | 174 ------------------ mmdet_configs/xview_tood/tood_full_cls_60.py | 24 +-- .../xview_vfnet/vfnet_crop_300_500_cls_60.py | 44 +++-- .../xview_vfnet/vfnet_full_cls_60.py | 22 +-- 13 files changed, 557 insertions(+), 460 deletions(-) create mode 100644 mmdet_configs/visdrone_fcos/fcos_crop_480_960_cls_60.py rename mmdet_configs/{xview_fcos/fcos_crop_300_9999_cls_60.py => visdrone_fcos/fcos_full_cls_60.py} (54%) create mode 100644 mmdet_configs/visdrone_tood/tood_crop_480_960_cls_60.py create mode 100644 mmdet_configs/visdrone_tood/tood_full_cls_60.py create mode 100644 mmdet_configs/visdrone_vfnet/vfnet_crop_480_960_cls_60.py rename mmdet_configs/{xview_vfnet/vfnet_crop_300_9999_cls_60.py => visdrone_vfnet/vfnet_full_cls_60.py} (53%) delete mode 100644 mmdet_configs/xview_tood/tood_crop_300_9999_cls_60.py diff --git a/mmdet_configs/visdrone_fcos/fcos_crop_480_960_cls_60.py b/mmdet_configs/visdrone_fcos/fcos_crop_480_960_cls_60.py new file mode 100644 index 0000000..b1d1157 --- /dev/null +++ b/mmdet_configs/visdrone_fcos/fcos_crop_480_960_cls_60.py @@ -0,0 +1,115 @@ +_base_ = ["../fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py"] + +TAGS = ["fcos", "crop=480_960", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "fcos_crop_480_960_cls_60" +DATA_ROOT = "data/visdrone2019/" +BATCH_MULTIPLIER = 16 +LR_MULTIPLIER = 1 +EVAL_INTERVAL = 3 +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") + +# model settings +model = dict( + bbox_head=dict( + num_classes=NUM_CLASSES, + ), +) + +# dataset settings +img_norm_cfg = dict(mean=[103.530, 116.280, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False) +train_pipeline = [ + dict(type="LoadImageFromFile"), + dict(type="LoadAnnotations", with_bbox=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), + dict(type="RandomFlip", flip_ratio=0.5), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="DefaultFormatBundle"), + dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), +] +test_pipeline = [ + dict(type="LoadImageFromFile"), + dict( + type="MultiScaleFlipAug", + img_scale=(1333, 800), + flip=False, + transforms=[ + dict(type="Resize", keep_ratio=True), + dict(type="RandomFlip"), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="ImageToTensor", keys=["img"]), + dict(type="Collect", keys=["img"]), + ], + ), +] + +data = dict( + samples_per_gpu=2 * BATCH_MULTIPLIER, + workers_per_gpu=2, + train=dict( + type="RepeatDataset", + times=5, + dataset=dict( + type="CocoDataset", + classes=CLASSES, + ann_file=DATA_ROOT + "coco/train.json", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", + pipeline=train_pipeline, + ), + ), + val=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), + test=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), +) + +# optimizer +# default 8 gpu +# /8 for 1 gpu +optimizer = dict( + lr=0.01 / 8 * BATCH_MULTIPLIER * LR_MULTIPLIER, paramwise_cfg=dict(bias_lr_mult=2.0, bias_decay_mult=0.0) +) + +checkpoint_config = dict(interval=1, max_keep_ckpts=1, save_optimizer=False) +evaluation = dict(interval=EVAL_INTERVAL, metric="bbox", save_best="auto") + +# learning policy +lr_config = dict(policy="step", warmup="constant", warmup_iters=500, warmup_ratio=1.0 / 3, step=[16, 22]) +runner = dict(type="EpochBasedRunner", max_epochs=24) + +# logger settings +log_config = dict( + interval=50, + hooks=[ + dict(type="TextLoggerHook"), + dict(type="TensorboardLoggerHook", reset_flag=False), + ], +) + +load_from = "https://download.openmmlab.com/mmdetection/v2.0/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/xview_fcos/fcos_crop_300_9999_cls_60.py b/mmdet_configs/visdrone_fcos/fcos_full_cls_60.py similarity index 54% rename from mmdet_configs/xview_fcos/fcos_crop_300_9999_cls_60.py rename to mmdet_configs/visdrone_fcos/fcos_full_cls_60.py index 9cba700..0e67152 100644 --- a/mmdet_configs/xview_fcos/fcos_crop_300_9999_cls_60.py +++ b/mmdet_configs/visdrone_fcos/fcos_full_cls_60.py @@ -1,83 +1,19 @@ _base_ = ["../fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py"] -TAGS = ["fcos", "crop=300_9999", "24epochs", "num_cls=60"] -EXP_NAME = "fcos_crop_300_9999_cls_60" -DATA_ROOT = "data/xview/" +TAGS = ["fcos", "crop=False", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "fcos_full_cls_60" +DATA_ROOT = "data/visdrone2019/" BATCH_MULTIPLIER = 16 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 -NUM_CLASSES = 60 -CLASSES = ( - "Fixed-wing Aircraft", - "Small Aircraft", - "Cargo Plane", - "Helicopter", - "Passenger Vehicle", - "Small Car", - "Bus", - "Pickup Truck", - "Utility Truck", - "Truck", - "Cargo Truck", - "Truck w/Box", - "Truck Tractor", - "Trailer", - "Truck w/Flatbed", - "Truck w/Liquid", - "Crane Truck", - "Railway Vehicle", - "Passenger Car", - "Cargo Car", - "Flat Car", - "Tank car", - "Locomotive", - "Maritime Vessel", - "Motorboat", - "Sailboat", - "Tugboat", - "Barge", - "Fishing Vessel", - "Ferry", - "Yacht", - "Container Ship", - "Oil Tanker", - "Engineering Vehicle", - "Tower crane", - "Container Crane", - "Reach Stacker", - "Straddle Carrier", - "Mobile Crane", - "Dump Truck", - "Haul Truck", - "Scraper/Tractor", - "Front loader/Bulldozer", - "Excavator", - "Cement Mixer", - "Ground Grader", - "Hut/Tent", - "Shed", - "Building", - "Aircraft Hangar", - "Damaged Building", - "Facility", - "Construction Site", - "Vehicle Lot", - "Helipad", - "Storage Tank", - "Shipping container lot", - "Shipping Container", - "Pylon", - "Tower", -) +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") # model settings model = dict( bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -85,7 +21,6 @@ train_pipeline = [ dict(type="LoadImageFromFile"), dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 9999), allow_negative_crop=True), dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), @@ -115,25 +50,25 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=5, dataset=dict( type="CocoDataset", classes=CLASSES, ann_file=DATA_ROOT + "coco/train.json", - img_prefix=DATA_ROOT + "train_images/", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", pipeline=train_pipeline, ), ), val=dict( classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", pipeline=test_pipeline, ), test=dict( classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", pipeline=test_pipeline, ), ) @@ -158,19 +93,8 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) load_from = "https://download.openmmlab.com/mmdetection/v2.0/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth" -work_dir = f"runs/xview/{EXP_NAME}/" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/visdrone_tood/tood_crop_480_960_cls_60.py b/mmdet_configs/visdrone_tood/tood_crop_480_960_cls_60.py new file mode 100644 index 0000000..a79b604 --- /dev/null +++ b/mmdet_configs/visdrone_tood/tood_crop_480_960_cls_60.py @@ -0,0 +1,113 @@ +_base_ = ["../tood/tood_r50_fpn_1x_coco.py"] + +TAGS = ["tood", "crop=480_960", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "tood_crop_480_960_cls_60" +DATA_ROOT = "data/visdrone2019/" +BATCH_MULTIPLIER = 8 +LR_MULTIPLIER = 1 +EVAL_INTERVAL = 3 +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") + +# model settings +model = dict( + bbox_head=dict( + num_classes=NUM_CLASSES, + ), +) + +# dataset settings +img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) +train_pipeline = [ + dict(type="LoadImageFromFile"), + dict(type="LoadAnnotations", with_bbox=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), + dict(type="RandomFlip", flip_ratio=0.5), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="DefaultFormatBundle"), + dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), +] +test_pipeline = [ + dict(type="LoadImageFromFile"), + dict( + type="MultiScaleFlipAug", + img_scale=(1333, 800), + flip=False, + transforms=[ + dict(type="Resize", keep_ratio=True), + dict(type="RandomFlip"), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="ImageToTensor", keys=["img"]), + dict(type="Collect", keys=["img"]), + ], + ), +] + +data = dict( + samples_per_gpu=2 * BATCH_MULTIPLIER, + workers_per_gpu=2, + train=dict( + type="RepeatDataset", + times=5, + dataset=dict( + type="CocoDataset", + classes=CLASSES, + ann_file=DATA_ROOT + "coco/train.json", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", + pipeline=train_pipeline, + ), + ), + val=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), + test=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), +) + +# optimizer +# default 8 gpu +# /8 for 1 gpu +optimizer = dict(lr=0.01 / 8 * BATCH_MULTIPLIER * LR_MULTIPLIER, momentum=0.9, weight_decay=0.0001) + +checkpoint_config = dict(interval=1, max_keep_ckpts=1, save_optimizer=False) +evaluation = dict(interval=EVAL_INTERVAL, metric="bbox", save_best="auto") + +# learning policy +lr_config = dict(policy="step", warmup="linear", warmup_iters=500, warmup_ratio=0.001, step=[16, 22]) +runner = dict(type="EpochBasedRunner", max_epochs=24) + +# logger settings +log_config = dict( + interval=50, + hooks=[ + dict(type="TextLoggerHook"), + dict(type="TensorboardLoggerHook", reset_flag=False), + ], +) + +load_from = "https://download.openmmlab.com/mmdetection/v2.0/tood/tood_r50_fpn_1x_coco/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/visdrone_tood/tood_full_cls_60.py b/mmdet_configs/visdrone_tood/tood_full_cls_60.py new file mode 100644 index 0000000..93e9612 --- /dev/null +++ b/mmdet_configs/visdrone_tood/tood_full_cls_60.py @@ -0,0 +1,98 @@ +_base_ = ["../tood/tood_r50_fpn_1x_coco.py"] + +TAGS = ["tood", "crop=False", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "tood_full_cls_60" +DATA_ROOT = "data/visdrone2019/" +BATCH_MULTIPLIER = 8 +LR_MULTIPLIER = 1 +EVAL_INTERVAL = 3 +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") + +# model settings +model = dict( + bbox_head=dict( + num_classes=NUM_CLASSES, + ), +) + +# dataset settings +img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) +train_pipeline = [ + dict(type="LoadImageFromFile"), + dict(type="LoadAnnotations", with_bbox=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + dict(type="RandomFlip", flip_ratio=0.5), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="DefaultFormatBundle"), + dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), +] +test_pipeline = [ + dict(type="LoadImageFromFile"), + dict( + type="MultiScaleFlipAug", + img_scale=(1333, 800), + flip=False, + transforms=[ + dict(type="Resize", keep_ratio=True), + dict(type="RandomFlip"), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="ImageToTensor", keys=["img"]), + dict(type="Collect", keys=["img"]), + ], + ), +] + +data = dict( + samples_per_gpu=2 * BATCH_MULTIPLIER, + workers_per_gpu=2, + train=dict( + type="RepeatDataset", + times=5, + dataset=dict( + type="CocoDataset", + classes=CLASSES, + ann_file=DATA_ROOT + "coco/train.json", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", + pipeline=train_pipeline, + ), + ), + val=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), + test=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), +) + +# optimizer +# default 8 gpu +# /8 for 1 gpu +optimizer = dict(lr=0.01 / 8 * BATCH_MULTIPLIER * LR_MULTIPLIER, momentum=0.9, weight_decay=0.0001) + +checkpoint_config = dict(interval=1, max_keep_ckpts=1, save_optimizer=False) +evaluation = dict(interval=EVAL_INTERVAL, metric="bbox", save_best="auto") + +# learning policy +lr_config = dict(policy="step", warmup="linear", warmup_iters=500, warmup_ratio=0.001, step=[16, 22]) +runner = dict(type="EpochBasedRunner", max_epochs=24) + +# logger settings +log_config = dict( + interval=50, + hooks=[ + dict(type="TextLoggerHook"), + dict(type="TensorboardLoggerHook", reset_flag=False), + ], +) + +load_from = "https://download.openmmlab.com/mmdetection/v2.0/tood/tood_r50_fpn_1x_coco/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/visdrone_vfnet/vfnet_crop_480_960_cls_60.py b/mmdet_configs/visdrone_vfnet/vfnet_crop_480_960_cls_60.py new file mode 100644 index 0000000..3a0ed47 --- /dev/null +++ b/mmdet_configs/visdrone_vfnet/vfnet_crop_480_960_cls_60.py @@ -0,0 +1,115 @@ +_base_ = ["../vfnet/vfnet_r50_fpn_1x_coco.py"] + +TAGS = ["vfnet", "crop=480_960", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "vfnet_crop_480_960_cls_60" +DATA_ROOT = "data/visdrone2019/" +BATCH_MULTIPLIER = 8 +LR_MULTIPLIER = 1 +EVAL_INTERVAL = 3 +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") + +# model settings +model = dict( + bbox_head=dict( + num_classes=NUM_CLASSES, + ), +) + +# dataset settings +img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) +train_pipeline = [ + dict(type="LoadImageFromFile"), + dict(type="LoadAnnotations", with_bbox=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(480, 960), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), + dict(type="RandomFlip", flip_ratio=0.5), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="DefaultFormatBundle"), + dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), +] +test_pipeline = [ + dict(type="LoadImageFromFile"), + dict( + type="MultiScaleFlipAug", + img_scale=(1333, 800), + flip=False, + transforms=[ + dict(type="Resize", keep_ratio=True), + dict(type="RandomFlip"), + dict(type="Normalize", **img_norm_cfg), + dict(type="Pad", size_divisor=32), + dict(type="DefaultFormatBundle"), + dict(type="Collect", keys=["img"]), + ], + ), +] + +data = dict( + samples_per_gpu=2 * BATCH_MULTIPLIER, + workers_per_gpu=2, + train=dict( + type="RepeatDataset", + times=5, + dataset=dict( + type="CocoDataset", + classes=CLASSES, + ann_file=DATA_ROOT + "coco/train.json", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", + pipeline=train_pipeline, + ), + ), + val=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), + test=dict( + classes=CLASSES, + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", + pipeline=test_pipeline, + ), +) + +# optimizer +# default 8 gpu +# /8 for 1 gpu +optimizer = dict( + lr=0.01 / 8 * BATCH_MULTIPLIER * LR_MULTIPLIER, paramwise_cfg=dict(bias_lr_mult=2.0, bias_decay_mult=0.0) +) + +checkpoint_config = dict(interval=1, max_keep_ckpts=1, save_optimizer=False) +evaluation = dict(interval=EVAL_INTERVAL, metric="bbox", save_best="auto") + +# learning policy +lr_config = dict(policy="step", warmup="linear", warmup_iters=500, warmup_ratio=0.1, step=[16, 22]) +runner = dict(type="EpochBasedRunner", max_epochs=24) + +# logger settings +log_config = dict( + interval=50, + hooks=[ + dict(type="TextLoggerHook"), + dict(type="TensorboardLoggerHook", reset_flag=False), + ], +) + +load_from = "https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/xview_vfnet/vfnet_crop_300_9999_cls_60.py b/mmdet_configs/visdrone_vfnet/vfnet_full_cls_60.py similarity index 53% rename from mmdet_configs/xview_vfnet/vfnet_crop_300_9999_cls_60.py rename to mmdet_configs/visdrone_vfnet/vfnet_full_cls_60.py index 484b51f..df178b1 100644 --- a/mmdet_configs/xview_vfnet/vfnet_crop_300_9999_cls_60.py +++ b/mmdet_configs/visdrone_vfnet/vfnet_full_cls_60.py @@ -1,83 +1,19 @@ _base_ = ["../vfnet/vfnet_r50_fpn_1x_coco.py"] -TAGS = ["vfnet", "crop=300_9999", "24epochs", "num_cls=60"] -EXP_NAME = "vfnet_crop_300_9999_cls_60" -DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +TAGS = ["vfnet", "crop=False", "24epochs", "num_cls=60", "repeat=5"] +EXP_NAME = "vfnet_full_cls_60" +DATA_ROOT = "data/visdrone2019/" +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 -NUM_CLASSES = 60 -CLASSES = ( - "Fixed-wing Aircraft", - "Small Aircraft", - "Cargo Plane", - "Helicopter", - "Passenger Vehicle", - "Small Car", - "Bus", - "Pickup Truck", - "Utility Truck", - "Truck", - "Cargo Truck", - "Truck w/Box", - "Truck Tractor", - "Trailer", - "Truck w/Flatbed", - "Truck w/Liquid", - "Crane Truck", - "Railway Vehicle", - "Passenger Car", - "Cargo Car", - "Flat Car", - "Tank car", - "Locomotive", - "Maritime Vessel", - "Motorboat", - "Sailboat", - "Tugboat", - "Barge", - "Fishing Vessel", - "Ferry", - "Yacht", - "Container Ship", - "Oil Tanker", - "Engineering Vehicle", - "Tower crane", - "Container Crane", - "Reach Stacker", - "Straddle Carrier", - "Mobile Crane", - "Dump Truck", - "Haul Truck", - "Scraper/Tractor", - "Front loader/Bulldozer", - "Excavator", - "Cement Mixer", - "Ground Grader", - "Hut/Tent", - "Shed", - "Building", - "Aircraft Hangar", - "Damaged Building", - "Facility", - "Construction Site", - "Vehicle Lot", - "Helipad", - "Storage Tank", - "Shipping container lot", - "Shipping Container", - "Pylon", - "Tower", -) +NUM_CLASSES = 10 +CLASSES = ("pedestrian", "people", "bicycle", "car", "van", "truck", "tricycle", "awning-tricycle", "bus", "motor") # model settings model = dict( bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -85,7 +21,6 @@ train_pipeline = [ dict(type="LoadImageFromFile"), dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 9999), allow_negative_crop=True), dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), @@ -115,25 +50,25 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=5, dataset=dict( type="CocoDataset", classes=CLASSES, ann_file=DATA_ROOT + "coco/train.json", - img_prefix=DATA_ROOT + "train_images/", + img_prefix=DATA_ROOT + "VisDrone2019-DET-train/", pipeline=train_pipeline, ), ), val=dict( classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", pipeline=test_pipeline, ), test=dict( classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", + ann_file=DATA_ROOT + "sliced/val_640_0.json", + img_prefix=DATA_ROOT + "sliced/val_images_640_0/", pipeline=test_pipeline, ), ) @@ -158,19 +93,8 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) load_from = "https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth" -work_dir = f"runs/xview/{EXP_NAME}/" +work_dir = f"runs/visdrone/{EXP_NAME}/" diff --git a/mmdet_configs/xview_fcos/fcos_crop_300_500_cls_60.py b/mmdet_configs/xview_fcos/fcos_crop_300_500_cls_60.py index 29d2e0f..e0a47a0 100644 --- a/mmdet_configs/xview_fcos/fcos_crop_300_500_cls_60.py +++ b/mmdet_configs/xview_fcos/fcos_crop_300_500_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py"] -TAGS = ["fcos", "crop=300_500", "24epochs", "num_cls=60"] + EXP_NAME = "fcos_crop_300_500_cls_60" DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 50 +TAGS = ["fcos", "crop=300_500", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -85,8 +84,26 @@ train_pipeline = [ dict(type="LoadImageFromFile"), dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), - dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), dict(type="Pad", size_divisor=32), @@ -115,7 +132,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -158,17 +175,6 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) diff --git a/mmdet_configs/xview_fcos/fcos_full_cls_60.py b/mmdet_configs/xview_fcos/fcos_full_cls_60.py index 5819615..7483e05 100644 --- a/mmdet_configs/xview_fcos/fcos_full_cls_60.py +++ b/mmdet_configs/xview_fcos/fcos_full_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py"] -TAGS = ["fcos", "crop=False", "24epochs", "num_cls=60"] + EXP_NAME = "fcos_full_cls_60" DATA_ROOT = "data/xview/" BATCH_MULTIPLIER = 16 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 30 +TAGS = ["fcos", "crop=False", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -114,7 +113,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -157,17 +156,6 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) diff --git a/mmdet_configs/xview_tood/tood_crop_300_500_cls_60.py b/mmdet_configs/xview_tood/tood_crop_300_500_cls_60.py index b159327..94578d8 100644 --- a/mmdet_configs/xview_tood/tood_crop_300_500_cls_60.py +++ b/mmdet_configs/xview_tood/tood_crop_300_500_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../tood/tood_r50_fpn_1x_coco.py"] -TAGS = ["tood", "crop=300_500", "24epochs", "num_cls=60"] + EXP_NAME = "tood_crop_300_500_cls_60" DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 50 +TAGS = ["tood", "crop=300_500", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -85,8 +84,26 @@ train_pipeline = [ dict(type="LoadImageFromFile"), dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), - dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), dict(type="Pad", size_divisor=32), @@ -115,7 +132,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -156,19 +173,8 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) -load_from = "https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth" +load_from = "https://download.openmmlab.com/mmdetection/v2.0/tood/tood_r50_fpn_1x_coco/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth" work_dir = f"runs/xview/{EXP_NAME}/" diff --git a/mmdet_configs/xview_tood/tood_crop_300_9999_cls_60.py b/mmdet_configs/xview_tood/tood_crop_300_9999_cls_60.py deleted file mode 100644 index 18761ce..0000000 --- a/mmdet_configs/xview_tood/tood_crop_300_9999_cls_60.py +++ /dev/null @@ -1,174 +0,0 @@ -_base_ = ["../tood/tood_r50_fpn_1x_coco.py"] - -TAGS = ["tood", "crop=300_9999", "24epochs", "num_cls=60"] -EXP_NAME = "tood_crop_300_9999_cls_60" -DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 -LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 -EVAL_INTERVAL = 3 -NUM_CLASSES = 60 -CLASSES = ( - "Fixed-wing Aircraft", - "Small Aircraft", - "Cargo Plane", - "Helicopter", - "Passenger Vehicle", - "Small Car", - "Bus", - "Pickup Truck", - "Utility Truck", - "Truck", - "Cargo Truck", - "Truck w/Box", - "Truck Tractor", - "Trailer", - "Truck w/Flatbed", - "Truck w/Liquid", - "Crane Truck", - "Railway Vehicle", - "Passenger Car", - "Cargo Car", - "Flat Car", - "Tank car", - "Locomotive", - "Maritime Vessel", - "Motorboat", - "Sailboat", - "Tugboat", - "Barge", - "Fishing Vessel", - "Ferry", - "Yacht", - "Container Ship", - "Oil Tanker", - "Engineering Vehicle", - "Tower crane", - "Container Crane", - "Reach Stacker", - "Straddle Carrier", - "Mobile Crane", - "Dump Truck", - "Haul Truck", - "Scraper/Tractor", - "Front loader/Bulldozer", - "Excavator", - "Cement Mixer", - "Ground Grader", - "Hut/Tent", - "Shed", - "Building", - "Aircraft Hangar", - "Damaged Building", - "Facility", - "Construction Site", - "Vehicle Lot", - "Helipad", - "Storage Tank", - "Shipping container lot", - "Shipping Container", - "Pylon", - "Tower", -) - -# model settings -model = dict( - bbox_head=dict( - num_classes=NUM_CLASSES, - ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), -) - -# dataset settings -img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) -train_pipeline = [ - dict(type="LoadImageFromFile"), - dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 9999), allow_negative_crop=True), - dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), - dict(type="RandomFlip", flip_ratio=0.5), - dict(type="Normalize", **img_norm_cfg), - dict(type="Pad", size_divisor=32), - dict(type="DefaultFormatBundle"), - dict(type="Collect", keys=["img", "gt_bboxes", "gt_labels"]), -] -test_pipeline = [ - dict(type="LoadImageFromFile"), - dict( - type="MultiScaleFlipAug", - img_scale=(1333, 800), - flip=False, - transforms=[ - dict(type="Resize", keep_ratio=True), - dict(type="RandomFlip"), - dict(type="Normalize", **img_norm_cfg), - dict(type="Pad", size_divisor=32), - dict(type="ImageToTensor", keys=["img"]), - dict(type="Collect", keys=["img"]), - ], - ), -] - -data = dict( - samples_per_gpu=2 * BATCH_MULTIPLIER, - workers_per_gpu=2, - train=dict( - type="RepeatDataset", - times=30, - dataset=dict( - type="CocoDataset", - classes=CLASSES, - ann_file=DATA_ROOT + "coco/train.json", - img_prefix=DATA_ROOT + "train_images/", - pipeline=train_pipeline, - ), - ), - val=dict( - classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", - pipeline=test_pipeline, - ), - test=dict( - classes=CLASSES, - ann_file=DATA_ROOT + "sliced/val_400_0.json", - img_prefix=DATA_ROOT + "sliced/val_images_400_0/", - pipeline=test_pipeline, - ), -) - -# optimizer -# default 8 gpu -# /8 for 1 gpu -optimizer = dict(lr=0.01 / 8 * BATCH_MULTIPLIER * LR_MULTIPLIER, momentum=0.9, weight_decay=0.0001) - -checkpoint_config = dict(interval=1, max_keep_ckpts=1, save_optimizer=False) -evaluation = dict(interval=EVAL_INTERVAL, metric="bbox", save_best="auto") - -# learning policy -lr_config = dict(policy="step", warmup="linear", warmup_iters=500, warmup_ratio=0.001, step=[16, 22]) -runner = dict(type="EpochBasedRunner", max_epochs=24) - -# logger settings -log_config = dict( - interval=50, - hooks=[ - dict(type="TextLoggerHook"), - dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), - ], -) - -load_from = "https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth" -work_dir = f"runs/xview/{EXP_NAME}/" diff --git a/mmdet_configs/xview_tood/tood_full_cls_60.py b/mmdet_configs/xview_tood/tood_full_cls_60.py index d39a687..1148f06 100644 --- a/mmdet_configs/xview_tood/tood_full_cls_60.py +++ b/mmdet_configs/xview_tood/tood_full_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../tood/tood_r50_fpn_1x_coco.py"] -TAGS = ["tood", "crop=False", "24epochs", "num_cls=60"] + EXP_NAME = "tood_full_cls_60" DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 30 +TAGS = ["tood", "crop=False", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -114,7 +113,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -155,19 +154,8 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) -load_from = "https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth" +load_from = "https://download.openmmlab.com/mmdetection/v2.0/tood/tood_r50_fpn_1x_coco/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth" work_dir = f"runs/xview/{EXP_NAME}/" diff --git a/mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py b/mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py index f56b57d..4a1f796 100644 --- a/mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py +++ b/mmdet_configs/xview_vfnet/vfnet_crop_300_500_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../vfnet/vfnet_r50_fpn_1x_coco.py"] -TAGS = ["vfnet", "crop=300_500", "24epochs", "num_cls=60"] + EXP_NAME = "vfnet_crop_300_500_cls_60" DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 50 +TAGS = ["vfnet", "crop=300_500", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -85,8 +84,26 @@ train_pipeline = [ dict(type="LoadImageFromFile"), dict(type="LoadAnnotations", with_bbox=True), - dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), - dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + dict( + type="AutoAugment", + policies=[ + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="RandomCrop", crop_type="absolute_range", crop_size=(300, 500), allow_negative_crop=True), + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + [ + dict(type="Resize", img_scale=(1333, 800), keep_ratio=True), + ], + ], + ), dict(type="RandomFlip", flip_ratio=0.5), dict(type="Normalize", **img_norm_cfg), dict(type="Pad", size_divisor=32), @@ -115,7 +132,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -158,17 +175,6 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], ) diff --git a/mmdet_configs/xview_vfnet/vfnet_full_cls_60.py b/mmdet_configs/xview_vfnet/vfnet_full_cls_60.py index 1f82c73..8297f4a 100644 --- a/mmdet_configs/xview_vfnet/vfnet_full_cls_60.py +++ b/mmdet_configs/xview_vfnet/vfnet_full_cls_60.py @@ -1,13 +1,14 @@ _base_ = ["../vfnet/vfnet_r50_fpn_1x_coco.py"] -TAGS = ["vfnet", "crop=False", "24epochs", "num_cls=60"] + EXP_NAME = "vfnet_full_cls_60" DATA_ROOT = "data/xview/" -BATCH_MULTIPLIER = 16 +BATCH_MULTIPLIER = 8 LR_MULTIPLIER = 1 -MAX_DET_PER_IMAGE = 100 EVAL_INTERVAL = 3 NUM_CLASSES = 60 +DATASET_REPEAT = 30 +TAGS = ["vfnet", "crop=False", "24epochs", f"num_cls={NUM_CLASSES}", f"repeat={DATASET_REPEAT}"] CLASSES = ( "Fixed-wing Aircraft", "Small Aircraft", @@ -76,8 +77,6 @@ bbox_head=dict( num_classes=NUM_CLASSES, ), - # testing settings - test_cfg=dict(max_per_img=MAX_DET_PER_IMAGE), ) # dataset settings @@ -114,7 +113,7 @@ workers_per_gpu=2, train=dict( type="RepeatDataset", - times=30, + times=DATASET_REPEAT, dataset=dict( type="CocoDataset", classes=CLASSES, @@ -157,17 +156,6 @@ hooks=[ dict(type="TextLoggerHook"), dict(type="TensorboardLoggerHook", reset_flag=False), - dict( - type="WandbLoggerHook", - init_kwargs=dict( - project="xview", - entity="fca", - name=EXP_NAME, - tags=TAGS, - ), - log_artifact=True, - out_suffix=(".py"), - ), ], )