提交 0813a733 编辑于 作者: suilin0432's avatar suilin0432
浏览文件

update

上级 a8186142
_BASE_: "../Base-RCNN-FPN.yaml"
MODEL:
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
MASK_ON: True
RESNETS:
DEPTH: 50
DATASETS:
TRAIN: ("coco_2014_train_irn", )
TEST: ("coco_2014_val", )
SOLVER:
IMS_PER_BATCH: 8
BASE_LR: 0.01
STEPS: (20000, 30000)
MAX_ITER: 40000
INPUT:
MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800)
TEST:
EVAL_PERIOD: 2000
\ No newline at end of file
......@@ -59,6 +59,8 @@ _PREDEFINED_SPLITS_COCO["coco"] = {
"coco_2017_gt_random_30_1": ("coco2017/train2017", "coco2017/annotations/random30_1.json"),
"coco_2017_gt_random_30_2": ("coco2017/train2017", "coco2017/annotations/random30_2.json"),
"coco_2017_gt_random_30_3": ("coco2017/train2017", "coco2017/annotations/random30_3.json"),
"coco_2014_train_irn": ("coco/train2014", "coco/annotations/coco2014_train_custom_irn.json"),
}
_PREDEFINED_SPLITS_COCO["coco_person"] = {
......@@ -154,6 +156,10 @@ VOC_WSIS = {
"voc_2012_seg_train_irn_better_plus_sbd": ("VOC2012/JPEGImages", "VOC2012/voc_2012_train_instance_irn_plus_sbd_better.json"),
}
COCO_WSIS = {
"coco_2014_train_irn": ("coco/train2014", "coco/annotations/coco2014_train_custom_irn.json"),
}
COCO60 = {
"coco60_2017_train": ("coco2017/train2017", "coco2017/annotations/coco60_2017_train.json"),
"coco60_2017_val": ("coco2017/val2017", "coco2017/annotations/coco60_2017_val.json"),
......@@ -189,6 +195,15 @@ def register_all_voc_wsis(root):
os.path.join(root, image_root)
)
# def register_all_coco_wsis(root):
# for key, (image_root, json_file) in COCO_WSIS.items():
# register_coco_instances_wsl(
# key,
# _get_builtin_metadata("coco"),
# os.path.join(root, json_file) if "://" not in json_file else json_file,
# os.path.join(root, image_root)
# )
def register_all_coco60(root):
for key, (image_root, json_file) in COCO60.items():
register_coco_instances(
......@@ -661,3 +676,4 @@ if __name__.endswith(".builtin"):
register_all_pascal_voc_wsl_casd_contain_all(_root)
register_all_pascal_voc_wsl_casd_contain(_root)
register_all_pascal_voc_wsl_gt(_root)
# register_all_coco_wsis(_root)
\ No newline at end of file
......@@ -69,7 +69,7 @@ class FrozenBatchNorm2d(nn.Module):
self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs
):
version = local_metadata.get("version", None)
print(local_metadata)
if version is None or version < 2:
# No running_mean/var in early versions
# This will silent the warnings
......@@ -81,11 +81,12 @@ class FrozenBatchNorm2d(nn.Module):
# NOTE: if a checkpoint is trained with BatchNorm and loaded (together with
# version number) to FrozenBatchNorm, running_var will be wrong. One solution
# is to remove the version number from the checkpoint.
if version is not None and version < 3:
logger = logging.getLogger(__name__)
logger.info("FrozenBatchNorm {} is upgraded to version 3.".format(prefix.rstrip(".")))
# In version < 3, running_var are used without +eps.
state_dict[prefix + "running_var"] -= self.eps
# 暂时注释掉
# if version is not None and version < 3:
# logger = logging.getLogger(__name__)
# logger.info("FrozenBatchNorm {} is upgraded to version 3.".format(prefix.rstrip(".")))
# # In version < 3, running_var are used without +eps.
# state_dict[prefix + "running_var"] -= self.eps
super()._load_from_state_dict(
state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs
......
CUDA_VISIBLE_DEVICES=4,5,6,7 python tools/train_net.py \
--config-file configs/COCO-InstanceSegmentation/coco_irn.yaml --resume \
--num-gpus 4 --dist-url tcp://0.0.0.0:14192 \
OUTPUT_DIR output/wsis/coco_irn_b_8_lr_008 \
SOLVER.BASE_LR 0.008
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册