Class ImageUtil
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Keras.PreProcessing.Image
Assembly: Keras.dll
Syntax
public class ImageUtil : Base, IDisposable
Methods
| Improve this Doc View SourceArrayToImg(NDarray, String, Boolean, String)
Array to img.
Declaration
public static dynamic ArrayToImg(NDarray x, string data_format = "", bool scale = true, string dtype = "")
Parameters
Type | Name | Description |
---|---|---|
Numpy.NDarray | x | The x. |
System.String | data_format | The data format. |
System.Boolean | scale | if set to |
System.String | dtype | The dtype. |
Returns
Type | Description |
---|---|
System.Object |
DecodePredictions(NDarray, Int32)
Decodes the predictions.
Declaration
public static ImageNetPrediction[] DecodePredictions(NDarray preds, int top = 3)
Parameters
Type | Name | Description |
---|---|---|
Numpy.NDarray | preds | The preds. |
System.Int32 | top | The top. |
Returns
Type | Description |
---|---|
ImageNetPrediction[] |
ImageToArray(Object, String, String)
Images to array.
Declaration
public static NDarray ImageToArray(dynamic image, string data_format = "", string dtype = "")
Parameters
Type | Name | Description |
---|---|---|
System.Object | image | The image. |
System.String | data_format | The data format. |
System.String | dtype | The dtype. |
Returns
Type | Description |
---|---|
Numpy.NDarray |
LoadImg(String, String, Shape, String)
Loads the img.
Declaration
public static dynamic LoadImg(string path, string color_mode = "rgb", Shape target_size = null, string interpolation = "nearest")
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
System.String | color_mode | The color mode. |
Shape | target_size | Size of the target. |
System.String | interpolation | The interpolation. |
Returns
Type | Description |
---|---|
System.Object |
PreprocessInput(NDarray, String, String)
Preprocesses the input.
Declaration
public static NDarray PreprocessInput(NDarray x, string data_format = "channels_last", string mode = "caffe")
Parameters
Type | Name | Description |
---|---|---|
Numpy.NDarray | x | The input tensor. |
System.String | data_format | |
System.String | mode |
Returns
Type | Description |
---|---|
Numpy.NDarray |
Implements
System.IDisposable