Skip to content

Commit f5b4f76

Browse files
committed
add dataset class file for feet segmentation
1 parent e82a858 commit f5b4f76

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

mmseg/datasets/my_feetseg.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) OpenMMLab. All rights reserved.
2+
import os.path as osp
3+
4+
from .builder import DATASETS
5+
from .custom import CustomDataset
6+
7+
8+
@DATASETS.register_module()
9+
class MyFeetSegDataset(CustomDataset):
10+
"""feet segmentation dataset. 0 stands for background, 1 for left foot, 2 for right foot
11+
which is included in 3 categories.
12+
"""
13+
14+
CLASSES = ('background','left foot', 'right foot')
15+
16+
PALETTE = [[120,120,120],[128, 64, 128], [192, 96, 128]]
17+
18+
def __init__(self,
19+
img_suffix='.jpg',
20+
seg_map_suffix='.png',
21+
**kwargs):
22+
super(MyFeetSegDataset, self).__init__(
23+
img_suffix=img_suffix,
24+
seg_map_suffix=seg_map_suffix,
25+
**kwargs)

0 commit comments

Comments
 (0)