private Tensor ReadTensorFromFile(string filePath) { var texture = ImageUtil.TextureFromFile(filePath); return(ImageUtil.TensorFromTexture(texture, this.ImageDims)); }
private Tensor ReadTensorFromBytes(byte[] image) { var texture = ImageUtil.TextureFromBytes(image); return(ImageUtil.TensorFromTexture(texture, this.ImageDims)); }
public IEnumerator ExecuteAsync(Texture2D texture) { this.Texture = texture; this.Tensor = ImageUtil.TensorFromTexture(texture, Model.ImageDims); return(this.Worker.ExecuteAsync(this.Tensor)); }
public void Execute(Texture2D texture) { this.Texture = texture; this.Tensor = ImageUtil.TensorFromTexture(texture, Model.ImageDims); this.Worker.Execute(this.Tensor); }
private TFTensor ReadTensorFromFile(string filePath) { var bmp = ImageUtil.BitmapFromFile(filePath); return(ImageUtil.TensorFromBitmap(bmp, this.ImageDims)); }
private TFTensor ReadTensorFromBytes(byte[] image) { var bmp = ImageUtil.BitmapFromBytes(image); return(ImageUtil.TensorFromBitmap(bmp, this.ImageDims)); }