Upload folder using huggingface_hub
Browse files- mmdet_code/__pycache__/train_all_levir_baseline.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-100e_levir.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-300e_coco.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-100e_levir.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-300e_coco.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-100e_levir.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-300e_coco.cpython-314.pyc +0 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py +37 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-100e_levir.py +9 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-100e_levir.py +8 -0
- mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-100e_levir.py +9 -0
- mmdet_code/train_all_levir_baseline.py +41 -4
mmdet_code/__pycache__/train_all_levir_baseline.cpython-314.pyc
CHANGED
|
Binary files a/mmdet_code/__pycache__/train_all_levir_baseline.cpython-314.pyc and b/mmdet_code/__pycache__/train_all_levir_baseline.cpython-314.pyc differ
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.cpython-314.pyc
CHANGED
|
Binary files a/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.cpython-314.pyc and b/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.cpython-314.pyc differ
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.cpython-314.pyc
ADDED
|
Binary file (1.3 kB). View file
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-100e_levir.cpython-314.pyc
ADDED
|
Binary file (523 Bytes). View file
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-300e_coco.cpython-314.pyc
CHANGED
|
Binary files a/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-300e_coco.cpython-314.pyc and b/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-300e_coco.cpython-314.pyc differ
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-100e_levir.cpython-314.pyc
ADDED
|
Binary file (499 Bytes). View file
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-300e_coco.cpython-314.pyc
CHANGED
|
Binary files a/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-300e_coco.cpython-314.pyc and b/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-300e_coco.cpython-314.pyc differ
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-100e_levir.cpython-314.pyc
ADDED
|
Binary file (523 Bytes). View file
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-300e_coco.cpython-314.pyc
CHANGED
|
Binary files a/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-300e_coco.cpython-314.pyc and b/mmdet_code/mmdetection/projects/EfficientDet/configs/__pycache__/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-300e_coco.cpython-314.pyc differ
|
|
|
mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""LEVIR-Ship S0 control for the adaptive 100-epoch SimD ablation.
|
| 2 |
+
|
| 3 |
+
S0--S3 share a metric-driven LR schedule and early-stopping policy. The
|
| 4 |
+
plateau scheduler replaces the old fixed milestones so LR changes are driven
|
| 5 |
+
by validation convergence. S1--S3 inherit this file and only replace the
|
| 6 |
+
similarity mode.
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
_base_ = './efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.py'
|
| 10 |
+
|
| 11 |
+
model = dict(train_cfg=dict(assigner=dict(similarity_mode='s0')))
|
| 12 |
+
|
| 13 |
+
optim_wrapper = dict(optimizer=dict(lr=0.001, weight_decay=0.0001))
|
| 14 |
+
|
| 15 |
+
param_scheduler = [
|
| 16 |
+
dict(
|
| 17 |
+
type='LinearLR',
|
| 18 |
+
start_factor=0.001,
|
| 19 |
+
by_epoch=False,
|
| 20 |
+
begin=0,
|
| 21 |
+
end=100),
|
| 22 |
+
dict(
|
| 23 |
+
type='ReduceOnPlateauLR',
|
| 24 |
+
monitor='coco/bbox_mAP',
|
| 25 |
+
rule='greater',
|
| 26 |
+
factor=0.5,
|
| 27 |
+
patience=5,
|
| 28 |
+
threshold=0.001,
|
| 29 |
+
threshold_rule='abs',
|
| 30 |
+
cooldown=2,
|
| 31 |
+
min_value=1e-6,
|
| 32 |
+
by_epoch=True,
|
| 33 |
+
begin=1,
|
| 34 |
+
end=100),
|
| 35 |
+
]
|
| 36 |
+
|
| 37 |
+
train_cfg = dict(max_epochs=100, val_interval=1)
|
mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-100e_levir.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""EfficientDet-D0 with DALA S1 normalized Wasserstein ranking."""
|
| 2 |
+
|
| 3 |
+
_base_ = './efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py'
|
| 4 |
+
|
| 5 |
+
model = dict(
|
| 6 |
+
train_cfg=dict(
|
| 7 |
+
assigner=dict(
|
| 8 |
+
similarity_mode='s1',
|
| 9 |
+
nwd_normalizer=32.0)))
|
mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-crop512-100e_levir.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""EfficientDet-D0 with DALA S2 Geometry-Balanced SimD."""
|
| 2 |
+
|
| 3 |
+
_base_ = './efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py'
|
| 4 |
+
|
| 5 |
+
model = dict(
|
| 6 |
+
train_cfg=dict(
|
| 7 |
+
assigner=dict(
|
| 8 |
+
similarity_mode='s2')))
|
mmdet_code/mmdetection/projects/EfficientDet/configs/efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-crop512-100e_levir.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""EfficientDet-D0 with DALA S3 FPN-level-penalized SimD."""
|
| 2 |
+
|
| 3 |
+
_base_ = './efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py'
|
| 4 |
+
|
| 5 |
+
model = dict(
|
| 6 |
+
train_cfg=dict(
|
| 7 |
+
assigner=dict(
|
| 8 |
+
similarity_mode='s3',
|
| 9 |
+
level_lambda=1.0)))
|
mmdet_code/train_all_levir_baseline.py
CHANGED
|
@@ -40,19 +40,23 @@ MODEL_CONFIGS = {
|
|
| 40 |
"projects/EfficientDet/configs/"
|
| 41 |
"efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.py"
|
| 42 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
"dala_efficientdet_d0_s1": (
|
| 44 |
"projects/EfficientDet/configs/"
|
| 45 |
-
"efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-
|
| 46 |
),
|
| 47 |
"dala_efficientdet_d0_s2": (
|
| 48 |
"projects/EfficientDet/configs/"
|
| 49 |
"efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-"
|
| 50 |
-
"crop512-
|
| 51 |
),
|
| 52 |
"dala_efficientdet_d0_s3": (
|
| 53 |
"projects/EfficientDet/configs/"
|
| 54 |
"efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-"
|
| 55 |
-
"crop512-
|
| 56 |
),
|
| 57 |
"dala_efficientdet_d2": (
|
| 58 |
"projects/EfficientDet/configs/"
|
|
@@ -303,6 +307,19 @@ def patch_config(
|
|
| 303 |
max_keep_ckpts=1,
|
| 304 |
save_last=True,
|
| 305 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
cfg.randomness = dict(seed=args.seed)
|
| 307 |
return cfg
|
| 308 |
|
|
@@ -430,14 +447,28 @@ def parse_args() -> argparse.Namespace:
|
|
| 430 |
"dala_retinanet, dala_fcos, dala_cascade_rcnn. EfficientDet "
|
| 431 |
"keys: efficientdet_d0, efficientdet_d2, "
|
| 432 |
"dala_efficientdet_d0, dala_efficientdet_d2, "
|
|
|
|
| 433 |
"dala_efficientdet_d0_s1, dala_efficientdet_d0_s2, "
|
| 434 |
"dala_efficientdet_d0_s3."),
|
| 435 |
)
|
| 436 |
-
parser.add_argument("--epochs", type=int, default=
|
| 437 |
parser.add_argument("--batch-size", type=int, default=4)
|
| 438 |
parser.add_argument("--num-workers", type=int, default=4)
|
| 439 |
parser.add_argument("--amp", action="store_true")
|
| 440 |
parser.add_argument("--seed", type=int, default=42)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
parser.add_argument(
|
| 442 |
"--limit",
|
| 443 |
type=int,
|
|
@@ -465,6 +496,12 @@ def parse_args() -> argparse.Namespace:
|
|
| 465 |
|
| 466 |
def main() -> None:
|
| 467 |
args = parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 468 |
if args.num_machines < 1:
|
| 469 |
raise ValueError("--num-machines must be >= 1")
|
| 470 |
if not 0 <= args.machine_index < args.num_machines:
|
|
|
|
| 40 |
"projects/EfficientDet/configs/"
|
| 41 |
"efficientdet_effb0_bifpn_dala_8xb16-crop512-300e_coco.py"
|
| 42 |
),
|
| 43 |
+
"dala_efficientdet_d0_s0": (
|
| 44 |
+
"projects/EfficientDet/configs/"
|
| 45 |
+
"efficientdet_effb0_bifpn_dala_s0_control_8xb16-crop512-100e_levir.py"
|
| 46 |
+
),
|
| 47 |
"dala_efficientdet_d0_s1": (
|
| 48 |
"projects/EfficientDet/configs/"
|
| 49 |
+
"efficientdet_effb0_bifpn_dala_s1_nwd_8xb16-crop512-100e_levir.py"
|
| 50 |
),
|
| 51 |
"dala_efficientdet_d0_s2": (
|
| 52 |
"projects/EfficientDet/configs/"
|
| 53 |
"efficientdet_effb0_bifpn_dala_s2_geometry_balanced_8xb16-"
|
| 54 |
+
"crop512-100e_levir.py"
|
| 55 |
),
|
| 56 |
"dala_efficientdet_d0_s3": (
|
| 57 |
"projects/EfficientDet/configs/"
|
| 58 |
"efficientdet_effb0_bifpn_dala_s3_level_aware_8xb16-"
|
| 59 |
+
"crop512-100e_levir.py"
|
| 60 |
),
|
| 61 |
"dala_efficientdet_d2": (
|
| 62 |
"projects/EfficientDet/configs/"
|
|
|
|
| 307 |
max_keep_ckpts=1,
|
| 308 |
save_last=True,
|
| 309 |
)
|
| 310 |
+
if args.early_stop_patience > 0:
|
| 311 |
+
cfg.custom_hooks = list(cfg.get("custom_hooks", []))
|
| 312 |
+
cfg.custom_hooks.append(
|
| 313 |
+
dict(
|
| 314 |
+
type="EarlyStoppingHook",
|
| 315 |
+
monitor="coco/bbox_mAP",
|
| 316 |
+
rule="greater",
|
| 317 |
+
patience=args.early_stop_patience,
|
| 318 |
+
min_delta=args.early_stop_min_delta,
|
| 319 |
+
strict=True,
|
| 320 |
+
check_finite=True,
|
| 321 |
+
)
|
| 322 |
+
)
|
| 323 |
cfg.randomness = dict(seed=args.seed)
|
| 324 |
return cfg
|
| 325 |
|
|
|
|
| 447 |
"dala_retinanet, dala_fcos, dala_cascade_rcnn. EfficientDet "
|
| 448 |
"keys: efficientdet_d0, efficientdet_d2, "
|
| 449 |
"dala_efficientdet_d0, dala_efficientdet_d2, "
|
| 450 |
+
"dala_efficientdet_d0_s0, "
|
| 451 |
"dala_efficientdet_d0_s1, dala_efficientdet_d0_s2, "
|
| 452 |
"dala_efficientdet_d0_s3."),
|
| 453 |
)
|
| 454 |
+
parser.add_argument("--epochs", type=int, default=100)
|
| 455 |
parser.add_argument("--batch-size", type=int, default=4)
|
| 456 |
parser.add_argument("--num-workers", type=int, default=4)
|
| 457 |
parser.add_argument("--amp", action="store_true")
|
| 458 |
parser.add_argument("--seed", type=int, default=42)
|
| 459 |
+
parser.add_argument(
|
| 460 |
+
"--early-stop-patience",
|
| 461 |
+
type=int,
|
| 462 |
+
default=20,
|
| 463 |
+
help=("Stop when validation coco/bbox_mAP has not improved by "
|
| 464 |
+
"--early-stop-min-delta for this many validations; 0 disables."),
|
| 465 |
+
)
|
| 466 |
+
parser.add_argument(
|
| 467 |
+
"--early-stop-min-delta",
|
| 468 |
+
type=float,
|
| 469 |
+
default=0.001,
|
| 470 |
+
help="Minimum coco/bbox_mAP improvement counted by early stopping.",
|
| 471 |
+
)
|
| 472 |
parser.add_argument(
|
| 473 |
"--limit",
|
| 474 |
type=int,
|
|
|
|
| 496 |
|
| 497 |
def main() -> None:
|
| 498 |
args = parse_args()
|
| 499 |
+
if args.epochs < 1:
|
| 500 |
+
raise ValueError("--epochs must be >= 1")
|
| 501 |
+
if args.early_stop_patience < 0:
|
| 502 |
+
raise ValueError("--early-stop-patience must be >= 0")
|
| 503 |
+
if args.early_stop_min_delta < 0:
|
| 504 |
+
raise ValueError("--early-stop-min-delta must be >= 0")
|
| 505 |
if args.num_machines < 1:
|
| 506 |
raise ValueError("--num-machines must be >= 1")
|
| 507 |
if not 0 <= args.machine_index < args.num_machines:
|