public async Task recognize(uint[] rgb_image, int height, int width)
    {
        var request = new PredictRequest()
        {
            ModelSpec = new ModelSpec()
            {
                Name = "default"
            }
        };

        request.Inputs.Add("inputs", TensorBuilder.CreateTensorFromImage(rgb_image, height, width, 3));


        // Run the prediction
        var predictResponse = await client.PredictAsync(request);

        //float num_classes= TensorProtoDecoder.TensorProtoToFloat(predictResponse.Outputs["num_classes"]);
        int num_detections = (int)TensorProtoDecoder.TensorProtoToFloat(predictResponse.Outputs["num_detections"]);

        float[] classes = TensorProtoDecoder.TensorProtoToFloatArray(predictResponse.Outputs["detection_classes"]);
        float[] bboxes  = TensorProtoDecoder.TensorProtoToFloatArray(predictResponse.Outputs["detection_boxes"]);
        float[] scores  = TensorProtoDecoder.TensorProtoToFloatArray(predictResponse.Outputs["detection_scores"]);


        for (var i = 0; i < num_detections; i++)
        {
            float[] bbox = new float[4];
            Array.Copy(bboxes, i * 4, bbox, 0, 4);
            detectedObjects.Add(new Detection
            {
                boundingBox = bbox,
                objectClass = label_list[(int)classes[i]],
                confidence  = scores[i]
            });
        }
        readyForNextFrame = true;
    }
 public Task <PredictResponse> PredictAsync(PredictRequest predictRequest) => _predictionServiceClient.PredictAsync(predictRequest).ResponseAsync;
        public async Task <T> ScoreAsync <T>(IScoringRequest request) where T : class
        {
            var result = await _client.PredictAsync(request.MakePredictRequest());

            return(result.Outputs["output_alias"].Convert <T>());
        }