NNData
Creating NNData
input of the NeuralNetwork node.Reference
class
depthai.NNData(depthai.Buffer)
method
__init__(self)Construct NNData message.
method
getAllLayerNames(self) -> list[str]: list[str]Returns: Names of all layers added
method
getAllLayers(self) -> list[TensorInfo]: list[TensorInfo]Returns: All layers and their information
method
getFirstLayerFp16(self) -> list[float]: list[float]Convenience function to retrieve float values from first layers FP16 tensor Returns: Float data
method
getFirstLayerInt32(self) -> list[int]: list[int]Convenience function to retrieve INT32 values from first layers tensor Returns: INT32 data
method
getFirstLayerUInt8(self) -> list[int]: list[int]Convenience function to retrieve U8 data from first layer Returns: U8 binary data
method
getLayer(self, name: str, tensor: TensorInfo) -> bool: boolRetrieve layers tensor information Parameter ``name``: Name of the layer Parameter ``tensor``: Outputs tensor information of that layer Returns: True if layer exists, false otherwise
method
getLayerDatatype(self, name: str, datatype: TensorInfo.DataType) -> bool: boolRetrieve datatype of a layers tensor Parameter ``name``: Name of the layer Parameter ``datatype``: Datatype of layers tensor Returns: True if layer exists, false otherwise
method
getLayerFp16(self, name: str) -> list[float]: list[float]Convenience function to retrieve float values from layers FP16 tensor Parameter ``name``: Name of the layer Returns: Float data
method
getLayerInt32(self, name: str) -> list[int]: list[int]Convenience function to retrieve INT32 values from layers tensor Parameter ``name``: Name of the layer Returns: INT32 data
method
getLayerUInt8(self, name: str) -> list[int]: list[int]Convenience function to retrieve U8 data from layer Parameter ``name``: Name of the layer Returns: U8 binary data
method
getSequenceNum(self) -> int: intRetrieves sequence number
method
getTimestamp(self) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp related to dai::Clock::now()
method
getTimestampDevice(self) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
method
hasLayer(self, name: str) -> bool: boolChecks if given layer exists Parameter ``name``: Name of the layer Returns: True if layer exists, false otherwise
method
method
setSequenceNum(self, arg0: int) -> NNData: NNDataRetrieves image sequence number
method
setTimestamp(self, arg0: datetime.timedelta) -> NNData: NNDataSets image timestamp related to dai::Clock::now()
method
setTimestampDevice(self, arg0: datetime.timedelta) -> NNData: NNDataSets image timestamp related to dai::Clock::now()
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.