File size: 1,536 Bytes
6ed4a9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

import mmengine.fileio as fileio

from mmseg.registry import DATASETS
from .basesegdataset import BaseSegDataset


@DATASETS.register_module()
class HumanUnionDataset(BaseSegDataset):
    """
        Human Union dataset.
    """
    METAINFO = dict(
        classes=(
            'background',
            'hat',
            'hair',
            'sunglasses',
            'upper-clothes',
            'skirt',
            'pants',
            'dress',
            'belt',
            'shoes',
            'face',
            'legs',
            'arms',
            'bag',
            'scarf',
            'glove',
            'socks',
            'jumpsuits',),
        
        palette=[
            [0, 0, 0], 
            [128, 0, 0], 
            [0, 128, 0], 
            [128, 128, 0], 
            [0, 0, 128], 
            [128, 0, 128], 
            [0, 128, 128], 
            [128, 128, 128],
            [64, 0, 0], 
            [192, 0, 0], 
            [64, 128, 0], 
            [192, 128, 0], 
            [64, 0, 128], 
            [66, 66, 66], 
            [123, 66, 123], 
            [22, 33, 44], 
            [77, 88, 99], 
            [23, 24, 77]],)

    def __init__(self,
                #  ann_file,
                 img_suffix='.jpg',
                 seg_map_suffix='.png',
                 **kwargs) -> None:
        super().__init__(
            img_suffix=img_suffix,
            seg_map_suffix=seg_map_suffix,
            **kwargs)