Skip to main content

Class: SemanticSegmentationIO

Extends

  • TaskIO<"SEMANTIC_SEGMENTATION", { classes: string[]; colors: RawDataOf<Color>[]; mask: RawDataOf<Image>; polygons: RawDataOf<Polygon>[]; referenceImageIndex: number; }>

Constructors

new SemanticSegmentationIO()

new SemanticSegmentationIO(raw: RawSemanticSegmentationIO, referenceImage?: ImageIO): SemanticSegmentationIO

Parameters

ParameterType

raw

RawSemanticSegmentationIO

referenceImage?

ImageIO

Returns

SemanticSegmentationIO

Overrides

TaskIO.constructor

Properties

mask

readonly mask: Image;

raw

readonly raw: RawTaskIO<"SEMANTIC_SEGMENTATION", {
classes: string[];
colors: {
a: number;
b: number;
g: number;
r: number;
}[];
mask: string;
polygons: {
id: number;
properties: {
brush: {
a: number;
b: number;
g: number;
r: number;
};
category: string;
line: number;
pen: {
a: number;
b: number;
g: number;
r: number;
};
};
type: number;
} & XOR<{
polygon: {
x: number;
y: number;
}[];
}, {
inners: {
x: number;
y: number;
}[][];
outer: {
x: number;
y: number;
}[];
}>[];
referenceImageIndex: number;
}>;

Inherited from

TaskIO.raw


referenceImage?

readonly optional referenceImage: ImageIO;

segmentations

readonly segmentations: SemanticSegmentation[];

Accessors

data

get data(): RawData

Returns

RawData

Inherited from

TaskIO.data


key

get key(): Key

Returns

Key

Inherited from

TaskIO.key

Methods

toJSON()

toJSON(): RawTaskIO<"SEMANTIC_SEGMENTATION", {
classes: string[];
colors: {
a: number;
b: number;
g: number;
r: number;
}[];
mask: string;
polygons: {
id: number;
properties: {
brush: {
a: number;
b: number;
g: number;
r: number;
};
category: string;
line: number;
pen: {
a: number;
b: number;
g: number;
r: number;
};
};
type: number;
} & XOR<{
polygon: {
x: number;
y: number;
}[];
}, {
inners: {
x: number;
y: number;
}[][];
outer: {
x: number;
y: number;
}[];
}>[];
referenceImageIndex: number;
}>

Returns

RawTaskIO<"SEMANTIC_SEGMENTATION", { classes: string[]; colors: { a: number; b: number; g: number; r: number; }[]; mask: string; polygons: { id: number; properties: { brush: { a: number; b: number; g: number; r: number; }; category: string; line: number; pen: { a: number; b: number; g: number; r: number; }; }; type: number; } & XOR<{ polygon: { x: number; y: number; }[]; }, { inners: { x: number; y: number; }[][]; outer: { x: number; y: number; }[]; }>[]; referenceImageIndex: number; }>

Inherited from

TaskIO.toJSON