1
0
mirror of https://github.com/open-mmlab/mmsegmentation.git synced 2025-06-03 22:03:48 +08:00
jinwonkim93 a1d8174017 [Feature] Support Delving into High-Quality Synthetic Face Occlusion Segmentation Datasets ()
add custom dataset

add face occlusion dataset

add config file for occlusion face

fix format

update prepare.md

formatting

formatting

fix typo error for doc

update downloading process

Update dataset_prepare.md

PR fix version to original repository. change to original repository.
2023-01-11 13:58:44 +08:00

24 lines
623 B
Python
Executable File

# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
from .builder import DATASETS
from .custom import CustomDataset
@DATASETS.register_module()
class FaceOccludedDataset(CustomDataset):
"""Face Occluded dataset.
Args:
split (str): Split txt file for Pascal VOC.
"""
CLASSES = ('background', 'face')
PALETTE = [[0, 0, 0], [128, 0, 0]]
def __init__(self, split, **kwargs):
super(FaceOccludedDataset, self).__init__(
img_suffix='.jpg', seg_map_suffix='.png', split=split, **kwargs)
assert osp.exists(self.img_dir) and self.split is not None