File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed
demos/segmentation_demo/python Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change 39
39
40
40
41
41
class SegmentationVisualizer :
42
- pascal_voc_palette = [
43
- (0 , 0 , 0 ),
44
- (128 , 0 , 0 ),
45
- (0 , 128 , 0 ),
46
- (128 , 128 , 0 ),
47
- (0 , 0 , 128 ),
48
- (128 , 0 , 128 ),
49
- (0 , 128 , 128 ),
50
- (128 , 128 , 128 ),
51
- (64 , 0 , 0 ),
52
- (192 , 0 , 0 ),
53
- (64 , 128 , 0 ),
54
- (192 , 128 , 0 ),
55
- (64 , 0 , 128 ),
56
- (192 , 0 , 128 ),
57
- (64 , 128 , 128 ),
58
- (192 , 128 , 128 ),
59
- (0 , 64 , 0 ),
60
- (128 , 64 , 0 ),
61
- (0 , 192 , 0 ),
62
- (128 , 192 , 0 ),
63
- (0 , 64 , 128 )
64
- ]
65
-
66
42
def __init__ (self , colors_path = None ):
67
43
if colors_path :
68
44
self .color_palette = self .get_palette_from_file (colors_path )
69
45
log .debug ('The palette is loaded from {}' .format (colors_path ))
70
46
else :
71
- self .color_palette = self .pascal_voc_palette
47
+ pascal_palette_path = Path (__file__ ).resolve ().parents [3 ] / \
48
+ 'data/palettes/pascal_voc_21cl_colors.txt'
49
+ self .color_palette = self .get_palette_from_file (pascal_palette_path )
72
50
log .debug ('The PASCAL VOC palette is used' )
73
51
log .debug ('Get {} colors' .format (len (self .color_palette )))
74
52
self .color_map = self .create_color_map ()
You can’t perform that action at this time.
0 commit comments