Skip to main content
Version: 0.6.x

Examples

📄️ Using NumPy Arrays

This example loads a complete classification pipeline file (.denkflow) exported from the Hub. Instead of reading the image data from a file, it is instead read via OpenCV, which produces a NumPy array. This array is then converted to an ImageTensor using the fromnumpyopencv method. NumPy arrays produced by OpenCV have the shape [Height, Width, Channels], which is what the function expects. You can also use the from_numpy method, which expects a NumPy array of dtype float32 with the values normalized to the range [0, 1] and the shape [Batch Size, Channels, Height, Width].