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

update oicr related dataset

上级 d44664a2
......@@ -27,7 +27,7 @@ from .cityscapes_panoptic import register_all_cityscapes_panoptic
from .coco import load_sem_seg, register_coco_instances, register_coco_instances_wsl
from .coco_panoptic import register_coco_panoptic, register_coco_panoptic_separated
from .lvis import get_lvis_instances_meta, register_lvis_instances
from .pascal_voc import register_pascal_voc, register_pascal_voc_wsl, register_pascal_voc_wsl_top1, register_pascal_voc_wsl_thres, register_pascal_voc_wsl_contain
from .pascal_voc import register_pascal_voc, register_pascal_voc_wsl, register_pascal_voc_wsl_top1, register_pascal_voc_wsl_thres, register_pascal_voc_wsl_contain, register_pascal_voc_wsl_contain_total, register_pascal_voc_wsl_mist, register_pascal_voc_wsl_mist_contain, register_pascal_voc_wsl_contain_all, register_pascal_voc_wsl_contain_w2f, register_pascal_voc_wsl_oicr_contain, register_pascal_voc_wsl_oicr_contain_all
# ==== Predefined datasets and splits for COCO ==========
......@@ -127,6 +127,10 @@ COCO_WSL = {
"coco_2014_valminusminival_casd_wsl_top15": ("coco/val2014", "coco/annotations/casd_valminusminival2014_wsl_top_15.json"),
"coco_2014_train_casd_wsl_w2f": ("coco/train2014", "coco/annotations/casd_train2014_wsl_w2f.json"),
"coco_2014_valminusminival_casd_wsl_w2f": ("coco/val2014", "coco/annotations/casd_valminusminival2014_wsl_w2f.json"),
"coco_2014_train_casd_wsl_w2f_true": ("coco/train2014", "coco/annotations/casd_train2014_wsl_w2f_true.json"),
"coco_2014_valminusminival_casd_wsl_w2f_true": ("coco/val2014", "coco/annotations/casd_valminusminival2014_wsl_w2f_true.json"),
"coco_2014_train_casd_wsl_contain": ("coco/train2014", "coco/annotations/casd_train2014_wsl_contain.json"),
"coco_2014_valminusminival_casd_wsl_contain": ("coco/val2014", "coco/annotations/casd_valminusminival2014_wsl_contain.json"),
}
# 注册弱监督的打好 pgt 标记的数据集
......@@ -341,6 +345,76 @@ def register_all_pascal_voc_wsl_contain_095(root):
register_pascal_voc_wsl_contain(name, os.path.join(root, dirname), split, year, "095")
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_mist(root):
SPLITS = [
("voc_2007_train_wsl_mist", "VOC2007", "train"),
("voc_2007_val_wsl_mist", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_mist(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_mist_contain(root):
SPLITS = [
("voc_2007_train_wsl_mist_contain", "VOC2007", "train"),
("voc_2007_val_wsl_mist_contain", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_mist_contain(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_contain_total(root):
SPLITS = [
("voc_2007_train_wsl_contain_total", "VOC2007", "train"),
("voc_2007_val_wsl_contain_total", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_contain_total(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_oicr_contain_all(root):
SPLITS = [
("voc_2007_train_wsl_oicr_contain_all", "VOC2007", "train"),
("voc_2007_val_wsl_oicr_contain_all", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_oicr_contain_all(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_oicr_contain(root):
SPLITS = [
("voc_2007_train_wsl_oicr_contain", "VOC2007", "train"),
("voc_2007_val_wsl_oicr_contain", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_oicr_contain(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_wsl_contain_all(root):
SPLITS = [
("voc_2007_train_wsl_contain_all", "VOC2007", "train"),
("voc_2007_val_wsl_contain_all", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_contain_all(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_pascal_voc_w2f(root):
SPLITS = [
("voc_2007_train_wsl_w2f", "VOC2007", "train"),
("voc_2007_val_wsl_w2f", "VOC2007", "val")
]
for name, dirname, split in SPLITS:
year = 2007 if "2007" in name else 2012
register_pascal_voc_wsl_contain_w2f(name, os.path.join(root, dirname), split, year)
MetadataCatalog.get(name).evaluator_type = "pascal_voc"
def register_all_ade20k(root):
root = os.path.join(root, "ADEChallengeData2016")
for name, dirname in [("train", "training"), ("val", "validation")]:
......@@ -377,4 +451,11 @@ if __name__.endswith(".builtin"):
register_all_pascal_voc_wsl_contain_08(_root)
register_all_pascal_voc_wsl_contain_09(_root)
register_all_pascal_voc_wsl_contain_095(_root)
register_all_pascal_voc_wsl_contain_total(_root)
register_all_pascal_voc_wsl_mist(_root)
register_all_pascal_voc_wsl_mist_contain(_root)
register_all_pascal_voc_wsl_contain_all(_root)
register_all_pascal_voc_w2f(_root)
register_all_pascal_voc_wsl_oicr_contain(_root)
register_all_pascal_voc_wsl_oicr_contain_all(_root)
register_all_ade20k(_root)
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册