Skip to content

Commit

Permalink
added two rpc call to biopb.lacss
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyuuchc committed Nov 21, 2024
1 parent 9fdffa3 commit 5a9cddc
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
12 changes: 12 additions & 0 deletions biopb/lacss/detection_settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package biopb.lacss;
option java_package = "biopb.lacss";
option java_multiple_files = true;

import "google/protobuf/any.proto";

message DetectionSettings {

Expand Down Expand Up @@ -44,4 +45,15 @@ message DetectionSettings {

}

// Specify the model name for servers that support more than one model
// variants.
string model_name = 8;


// An opaque data structure that specify a server side model configuration.
// An important use case is to perform few-shot model adaptations. The model
// adaptation call returns a new model configuration. This stucture should
// be included in all new inference requests, so that the server understand
// that it should perform computation using the adapted model.
google.protobuf.Any model_configuration = 9;
}
14 changes: 13 additions & 1 deletion biopb/lacss/image_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,26 @@ message Pixels {
// physical size unit, default "µm"
string physical_size_unit = 17;

// TimeIncrement is used for time series that have a global timing
// time_increment is used for time series that have a global timing
// specification instead of per-timepoint timing info. For example in a
// video stream. Units are set by TimeIncrementUnit.
optional float time_increment = 18;

// time unit, default "s"
string time_increment_unit = 21;

// for large image dataset, it is necessary to send a stream of image
// patches instead of one monolithic data structure of the whole dataset.
// The offset values allows one to specify the relative locations of each
// patch.
optional uint32 offset_x = 22;

optional uint32 offset_y = 23;

optional uint32 offset_z = 24;

optional uint32 offset_t = 25;

}

// Additional annotation of the image, which may be used for the analysis.
Expand Down
24 changes: 23 additions & 1 deletion biopb/lacss/lacss.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ option java_package = "biopb.lacss";
option java_multiple_files = true;


import "google/protobuf/any.proto";

import "biopb/lacss/detection_request.proto";
import "biopb/lacss/detection_response.proto";

service Lacss {

// Unitary call for computing cell detection / segmentation
// Implementing the `RunDetection` call is mandatory. The rest are optional.

// Unitary call for computing cell detection / segmentation.
rpc RunDetection(DetectionRequest) returns (DetectionResponse) ;


// The streaming version allows dynamic updating of the DetectionRequest and
// getting updated results. For example, a client may request analyses at
// several different settings on the same image. After initial request, the
Expand All @@ -22,5 +27,22 @@ service Lacss {
// bandwidth.
rpc RunDetectionStream(stream DetectionRequest) returns (stream DetectionResponse) ;


// Send the image dataset as a stream of (partially overlapping) image
// patches, instead of one large chunk of binary data. There are two use
// cases for this call: (1) The image dataset is too large therefore sending
// all data in one message would exceed GRPC message size limit; (2) The
// original data were taken as a grid scan so it is convinent to read/write
// as patches.
rpc RunDetectionOnGrid(stream DetectionRequest) returns (DetectionResponse) ;


// Run model adaptation based on the submitted stream of DetectionReqeust,
// which may or may not contain ROI annotations. The all returns an opaque
// data strcuture representing the model configuration after model
// adaptation, which in turn should be included in future inference reuest
// as a DetectionSetting field.
rpc RunModelAdaptation(stream DetectionRequest) returns (google.protobuf.Any) ;

}

0 comments on commit 5a9cddc

Please sign in to comment.