Пример #1
0
        private Tensor ReadTensorFromFile(string filePath)
        {
            var texture = ImageUtil.TextureFromFile(filePath);

            return(ImageUtil.TensorFromTexture(texture, this.ImageDims));
        }
Пример #2
0
 public IEnumerator ExecuteAsync(Texture2D texture)
 {
     this.Texture = texture;
     this.Tensor  = ImageUtil.TensorFromTexture(texture, Model.ImageDims);
     return(this.Worker.ExecuteAsync(this.Tensor));
 }
Пример #3
0
        private Tensor ReadTensorFromBytes(byte[] image)
        {
            var texture = ImageUtil.TextureFromBytes(image);

            return(ImageUtil.TensorFromTexture(texture, this.ImageDims));
        }
Пример #4
0
 public void Execute(Texture2D texture)
 {
     this.Texture = texture;
     this.Tensor  = ImageUtil.TensorFromTexture(texture, Model.ImageDims);
     this.Worker.Execute(this.Tensor);
 }