Skip to content

Commit

Permalink
feat(model): add semantic segmentation output (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phelan164 authored Dec 13, 2022
1 parent 3f72eb2 commit c0f8198
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vdp/model/v1alpha/model.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "vdp/model/v1alpha/detection_output.proto";
import "vdp/model/v1alpha/keypoint_output.proto";
import "vdp/model/v1alpha/ocr_output.proto";
import "vdp/model/v1alpha/instance_segmentation_output.proto";
import "vdp/model/v1alpha/semantic_segmentation_output.proto";
import "vdp/model/v1alpha/unspecified_output.proto";

// Model represents a model
Expand Down Expand Up @@ -102,6 +103,8 @@ message ModelInstance {
TASK_OCR = 4;
// Task: INSTANCE SEGMENTATION
TASK_INSTANCE_SEGMENTATION = 5;
// Task: SEMANTIC SEGMENTATION
TASK_SEMANTIC_SEGMENTATION = 6;
}

// State enumerates a model instance state
Expand Down Expand Up @@ -504,8 +507,10 @@ message TaskOutput {
OcrOutput ocr = 4 [ (google.api.field_behavior) = OUTPUT_ONLY ];
// The instance segmentation output
InstanceSegmentationOutput instance_segmentation = 5 [ (google.api.field_behavior) = OUTPUT_ONLY ];
// The semantic segmentation output
SemanticSegmentationOutput semantic_segmentation = 6 [ (google.api.field_behavior) = OUTPUT_ONLY ];
// The unspecified task output
UnspecifiedOutput unspecified = 6
UnspecifiedOutput unspecified = 7
[ (google.api.field_behavior) = OUTPUT_ONLY ];
}
}
Expand Down
22 changes: 22 additions & 0 deletions vdp/model/v1alpha/semantic_segmentation_output.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax = "proto3";

package vdp.model.v1alpha;

// Google api
import "google/api/field_behavior.proto";

// SemanticSegmentationStuff corresponding to a semantic segmentation stuff
message SemanticSegmentationStuff {
// RLE segmentation mask
string rle = 1 [ (google.api.field_behavior) = OUTPUT_ONLY ];
// Stuff category
string category = 2 [ (google.api.field_behavior) = OUTPUT_ONLY ];
}

// SemanticSegmentationOutput represents the output of semantic segmentation
// task
message SemanticSegmentationOutput {
// A list of semantic segmentation stuffs
repeated SemanticSegmentationStuff stuffs = 1
[ (google.api.field_behavior) = OUTPUT_ONLY ];
}

0 comments on commit c0f8198

Please sign in to comment.