Skip to content

Commit e6b2490

Browse files
author
phelan_instill
authored
feat(model): add instance segmentation task output (#109)
Because - we want to support instance segmentation task in VDP This commit - add instance segmentation output task
1 parent 2004d52 commit e6b2490

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
syntax = "proto3";
2+
3+
package vdp.model.v1alpha;
4+
5+
// Google api
6+
import "google/api/field_behavior.proto";
7+
8+
import "vdp/model/v1alpha/common.proto";
9+
10+
11+
// InstanceSegmentationObject corresponding to a instance segmentation object
12+
message InstanceSegmentationObject {
13+
// RLE
14+
string rle = 1 [ (google.api.field_behavior) = OUTPUT_ONLY ];
15+
// Instance score
16+
float score = 2 [ (google.api.field_behavior) = OUTPUT_ONLY ];
17+
// Bounding box object
18+
BoundingBox bounding_box = 3 [ (google.api.field_behavior) = OUTPUT_ONLY ];
19+
// Object label
20+
string label = 4 [ (google.api.field_behavior) = OUTPUT_ONLY ];
21+
}
22+
23+
// InstanceSegmentationOutput represents the output of instance segmentation task
24+
message InstanceSegmentationOutput {
25+
// A list of instance segmentation objects
26+
repeated InstanceSegmentationObject objects = 1
27+
[ (google.api.field_behavior) = OUTPUT_ONLY ];
28+
}

vdp/model/v1alpha/model.proto

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import "vdp/model/v1alpha/classification_output.proto";
1717
import "vdp/model/v1alpha/detection_output.proto";
1818
import "vdp/model/v1alpha/keypoint_output.proto";
1919
import "vdp/model/v1alpha/ocr_output.proto";
20+
import "vdp/model/v1alpha/instance_segmentation_output.proto";
2021
import "vdp/model/v1alpha/unspecified_output.proto";
2122

2223
// Model represents a model
@@ -99,6 +100,8 @@ message ModelInstance {
99100
TASK_KEYPOINT = 3;
100101
// Task: OCR
101102
TASK_OCR = 4;
103+
// Task: INSTANCE SEGMENTATION
104+
TASK_INSTANCE_SEGMENTATION = 5;
102105
}
103106

104107
// State enumerates a model instance state
@@ -499,8 +502,10 @@ message TaskOutput {
499502
KeypointOutput keypoint = 3 [ (google.api.field_behavior) = OUTPUT_ONLY ];
500503
// The ocr output
501504
OcrOutput ocr = 4 [ (google.api.field_behavior) = OUTPUT_ONLY ];
505+
// The instance segmentation output
506+
InstanceSegmentationOutput instance_segmentation = 5 [ (google.api.field_behavior) = OUTPUT_ONLY ];
502507
// The unspecified task output
503-
UnspecifiedOutput unspecified = 5
508+
UnspecifiedOutput unspecified = 6
504509
[ (google.api.field_behavior) = OUTPUT_ONLY ];
505510
}
506511
}

0 commit comments

Comments
 (0)