@Namespace(value="dai") @NoOffset @Properties(inherit=depthai.class) public class NNData extends Buffer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
NNData()
Construct NNData message.
|
NNData(long size)
Native array allocator.
|
NNData(Pointer p)
Pointer cast constructor.
|
NNData(RawNNData ptr) |
| Modifier and Type | Method and Description |
|---|---|
StringVector |
getAllLayerNames() |
TensorInfo |
getAllLayers() |
FloatPointer |
getFirstLayerFp16()
Convenience function to retrieve float values from first layers FP16 tensor
|
IntPointer |
getFirstLayerInt32()
Convenience function to retrieve INT32 values from first layers tensor
|
BytePointer |
getFirstLayerUInt8()
Convenience function to retrieve U8 data from first layer
|
boolean |
getLayer(ByteBuffer name,
TensorInfo tensor) |
boolean |
getLayer(BytePointer name,
TensorInfo tensor)
Retrieve layers tensor information
|
boolean |
getLayer(String name,
TensorInfo tensor) |
boolean |
getLayerDatatype(ByteBuffer name,
IntBuffer datatype) |
boolean |
getLayerDatatype(BytePointer name,
IntPointer datatype)
Retrieve datatype of a layers tensor
|
boolean |
getLayerDatatype(String name,
int[] datatype) |
FloatBuffer |
getLayerFp16(ByteBuffer name) |
FloatPointer |
getLayerFp16(BytePointer name)
Convenience function to retrieve float values from layers FP16 tensor
|
float[] |
getLayerFp16(String name) |
IntBuffer |
getLayerInt32(ByteBuffer name) |
IntPointer |
getLayerInt32(BytePointer name)
Convenience function to retrieve INT32 values from layers tensor
|
int[] |
getLayerInt32(String name) |
ByteBuffer |
getLayerUInt8(ByteBuffer name) |
BytePointer |
getLayerUInt8(BytePointer name)
Convenience function to retrieve U8 data from layer
|
byte[] |
getLayerUInt8(String name) |
NNData |
getPointer(long i) |
long |
getSequenceNum()
Retrieves image sequence number
|
Pointer |
getTimestamp()
Retrieves image timestamp related to dai::Clock::now()
|
Pointer |
getTimestampDevice()
Retrieves image timestamp directly captured from device's monotonic clock,
not synchronized to host time.
|
boolean |
hasLayer(ByteBuffer name) |
boolean |
hasLayer(BytePointer name)
Checks if given layer exists
|
boolean |
hasLayer(String name) |
NNData |
position(long position) |
NNData |
setLayer(ByteBuffer name,
ByteBuffer data) |
NNData |
setLayer(ByteBuffer name,
DoubleBuffer data) |
NNData |
setLayer(ByteBuffer name,
FloatBuffer data) |
NNData |
setLayer(ByteBuffer name,
IntVector data) |
NNData |
setLayer(BytePointer name,
BytePointer data)
Set a layer with datatype U8.
|
NNData |
setLayer(BytePointer name,
DoublePointer data)
Set a layer with datatype FP16.
|
NNData |
setLayer(BytePointer name,
FloatPointer data)
Set a layer with datatype FP16.
|
NNData |
setLayer(BytePointer name,
IntVector data)
Set a layer with datatype U8.
|
NNData |
setLayer(String name,
byte[] data) |
NNData |
setLayer(String name,
double[] data) |
NNData |
setLayer(String name,
float[] data) |
NNData |
setLayer(String name,
IntVector data) |
NNData |
setSequenceNum(long sequenceNum)
Retrieves image sequence number
|
NNData |
setTimestamp(Pointer timestamp)
Sets image timestamp related to dai::Clock::now()
|
NNData |
setTimestampDevice(Pointer timestamp)
Sets image timestamp related to dai::Clock::now()
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic NNData(Pointer p)
Pointer(Pointer).public NNData(long size)
Pointer.position(long).public NNData()
public NNData(@SharedPtr RawNNData ptr)
public NNData getPointer(long i)
getPointer in class Buffer@ByRef public NNData setLayer(@StdString BytePointer name, @Cast(value="std::uint8_t*") @StdVector BytePointer data)
name - Name of the layerdata - Data to store@ByRef public NNData setLayer(@StdString ByteBuffer name, @Cast(value="std::uint8_t*") @StdVector ByteBuffer data)
@ByRef public NNData setLayer(@StdString String name, @Cast(value="std::uint8_t*") @StdVector byte[] data)
@ByRef public NNData setLayer(@StdString BytePointer name, @Const @ByRef IntVector data)
name - Name of the layerdata - Data to store@ByRef public NNData setLayer(@StdString ByteBuffer name, @Const @ByRef IntVector data)
@ByRef public NNData setLayer(@StdString BytePointer name, @StdVector FloatPointer data)
name - Name of the layerdata - Data to store@ByRef public NNData setLayer(@StdString ByteBuffer name, @StdVector FloatBuffer data)
@ByRef public NNData setLayer(@StdString String name, @StdVector float[] data)
@ByRef public NNData setLayer(@StdString BytePointer name, @StdVector DoublePointer data)
name - Name of the layerdata - Data to store@ByRef public NNData setLayer(@StdString ByteBuffer name, @StdVector DoubleBuffer data)
@ByRef public NNData setLayer(@StdString String name, @StdVector double[] data)
@ByVal public StringVector getAllLayerNames()
@StdVector public TensorInfo getAllLayers()
@Cast(value="bool") public boolean getLayer(@StdString BytePointer name, @ByRef TensorInfo tensor)
name - Name of the layertensor - [out] Outputs tensor information of that layer@Cast(value="bool") public boolean getLayer(@StdString ByteBuffer name, @ByRef TensorInfo tensor)
@Cast(value="bool") public boolean getLayer(@StdString String name, @ByRef TensorInfo tensor)
@Cast(value="bool") public boolean hasLayer(@StdString BytePointer name)
name - Name of the layer@Cast(value="bool") public boolean hasLayer(@StdString ByteBuffer name)
@Cast(value="bool") public boolean hasLayer(@StdString String name)
@Cast(value="bool") public boolean getLayerDatatype(@StdString BytePointer name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntPointer datatype)
name - Name of the layerdatatype - [out] Datatype of layers tensor@Cast(value="bool") public boolean getLayerDatatype(@StdString ByteBuffer name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntBuffer datatype)
@Cast(value="bool") public boolean getLayerDatatype(@StdString String name, @ByRef @Cast(value="dai::TensorInfo::DataType*") int[] datatype)
@Cast(value="std::uint8_t*") @StdVector public BytePointer getLayerUInt8(@StdString BytePointer name)
name - Name of the layer@Cast(value="std::uint8_t*") @StdVector public ByteBuffer getLayerUInt8(@StdString ByteBuffer name)
@Cast(value="std::uint8_t*") @StdVector public byte[] getLayerUInt8(@StdString String name)
@StdVector public FloatPointer getLayerFp16(@StdString BytePointer name)
name - Name of the layer@StdVector public FloatBuffer getLayerFp16(@StdString ByteBuffer name)
@StdVector public float[] getLayerFp16(@StdString String name)
@Cast(value="std::int32_t*") @StdVector public IntPointer getLayerInt32(@StdString BytePointer name)
name - Name of the layer@Cast(value="std::int32_t*") @StdVector public IntBuffer getLayerInt32(@StdString ByteBuffer name)
@Cast(value="std::int32_t*") @StdVector public int[] getLayerInt32(@StdString String name)
@Cast(value="std::uint8_t*") @StdVector public BytePointer getFirstLayerUInt8()
@StdVector public FloatPointer getFirstLayerFp16()
@Cast(value="std::int32_t*") @StdVector public IntPointer getFirstLayerInt32()
@ByVal @Cast(value="std::chrono::time_point<std::chrono::steady_clock,std::chrono::steady_clock::duration>*") public Pointer getTimestamp()
@ByVal @Cast(value="std::chrono::time_point<std::chrono::steady_clock,std::chrono::steady_clock::duration>*") public Pointer getTimestampDevice()
@ByRef public NNData setTimestamp(@ByVal @Cast(value="std::chrono::time_point<std::chrono::steady_clock,std::chrono::steady_clock::duration>*") Pointer timestamp)
@ByRef public NNData setTimestampDevice(@ByVal @Cast(value="std::chrono::time_point<std::chrono::steady_clock,std::chrono::steady_clock::duration>*") Pointer timestamp)
Copyright © 2023. All rights reserved.