'''
labelMap = [
"carA", "carB", "carBw", "carL","carTR", "centro"
]
nnPathDefault = str((Path(file).parent / Path('../models/bestroboflowdos352_openvino_2022.1_6shave.blob')).resolve().absolute())# este es 352x352
parser = argparse.ArgumentParser()
parser.add_argument('nnPath', nargs='?', help="Path to mobilenet detection network blob", default=nnPathDefault)
parser.add_argument('-ff', '--full_frame', action="store_true", help="Perform tracking on full RGB frame", default=False)
args = parser.parse_args()
def create_pipeline():
pipeline = dai.Pipeline()
# Configuración de la cámara RGB
camRgb = pipeline.create(dai.node.ColorCamera)
camRgb.setPreviewSize(352, 352)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camRgb.setInterleaved(False)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.BGR)
#camRgb.setFps(10) # Reducir a 10 FPS si es posible.
# Configurar cámaras monocromáticas para StereoDepth
monoLeft = pipeline.create(dai.node.MonoCamera)
monoRight = pipeline.create(dai.node.MonoCamera)
monoLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
monoRight.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
monoLeft.setBoardSocket(dai.CameraBoardSocket.LEFT)
monoRight.setBoardSocket(dai.CameraBoardSocket.RIGHT)
# ImageManip 1 for Feature Tracker
imageManipFeature = pipeline.create(dai.node.ImageManip)
imageManipFeature.initialConfig.setResize(640, 400)
imageManipFeature.setKeepAspectRatio(True)
monoLeft.out.link(imageManipFeature.inputImage)
# ImageManip 2 for StereoDepth
imageManipStereo = pipeline.create(dai.node.ImageManip)
imageManipStereo.initialConfig.setResize(640, 400)
imageManipStereo.setKeepAspectRatio(True)
monoLeft.out.link(imageManipStereo.inputImage)
# StereoDepth para mapa de profundidad
stereo = pipeline.create(dai.node.StereoDepth)
stereo.setDefaultProfilePreset(dai.node.StereoDepth.PresetMode.HIGH_DENSITY)
stereo.setDepthAlign(dai.CameraBoardSocket.RGB) # Alinear con RGB
stereo.setLeftRightCheck(True)
stereo.setExtendedDisparity(False)
# Configuración del YOLO SpatialDetectionNetwork
yolo = pipeline.create(dai.node.YoloSpatialDetectionNetwork)
yolo.setBlobPath(args.nnPath) # Modelo YOLO entrenado
yolo.setConfidenceThreshold(0.5)
yolo.setNumClasses(6)
yolo.setCoordinateSize(4)
yolo.setIouThreshold(0.5)
yolo.setAnchors([10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326 ])
yolo.setAnchorMasks({"side44": [0, 1, 2], "side22": [3, 4, 5], "side11": [6, 7, 8]})#352x352
# Configuración del Object Tracker
objectTracker = pipeline.create(dai.node.ObjectTracker)
objectTracker.setDetectionLabelsToTrack([1]) # track only person
objectTracker.setTrackerType(dai.TrackerType.ZERO_TERM_COLOR_HISTOGRAM)
objectTracker.setTrackerIdAssignmentPolicy(dai.TrackerIdAssignmentPolicy.SMALLEST_ID)
# Feature Tracker para la cámara izquierda
featureTracker = pipeline.create(dai.node.FeatureTracker)
num_shaves = 2
num_memory_slices = 2
featureTracker.setHardwareResources(num_shaves, num_memory_slices)
# Enlazar la salida de la cámara al FeatureTracker
#monoLeft.out.link(featureTracker.inputImage)
#imageManip.out.link(featureTracker.inputImage)
imageManipFeature.out.link(featureTracker.inputImage)
#stereo.rectifiedLeft.link(featureTracker.inputImage)
# Configuración de IMU
imu = pipeline.create(dai.node.IMU)
imu.enableIMUSensor(dai.IMUSensor.ROTATION_VECTOR, 100)
imu.setBatchReportThreshold(1)
imu.setMaxBatchReports(10)
# Configuración de salidas XLinkOut
xoutRgb = pipeline.create(dai.node.XLinkOut)
xoutRgb.setStreamName("preview")
xoutDepth = pipeline.create(dai.node.XLinkOut)
xoutDepth.setStreamName("depth")
xoutTracklets = pipeline.create(dai.node.XLinkOut)
xoutTracklets.setStreamName("tracklets")
xoutFeatures = pipeline.create(dai.node.XLinkOut)
xoutFeatures.setStreamName("features")
xout_passthrough = pipeline.create(dai.node.XLinkOut)
xout_passthrough.setStreamName("passthrough")
xoutGrp = pipeline.create(dai.node.XLinkOut)
xoutGrp.setStreamName("xout")
xoutImu = pipeline.create(dai.node.XLinkOut)
xoutImu.setStreamName("imu")
# Conectar ImageManip con StereoDepth
#imageManip.out.link(stereo.left)
imageManipStereo.out.link(stereo.left)
#monoLeft.out.link(stereo.left)
monoRight.out.link(stereo.right)
# Enlazar las cámaras monocromáticas al StereoDepth
#monoLeft.out.link(stereo.left)
#monoRight.out.link(stereo.right)
# Enlazar RGB con YOLO y Object Tracker
camRgb.preview.link(yolo.input)
objectTracker.passthroughTrackerFrame.link(xoutRgb.input)
objectTracker.out.link(xoutTracklets.input)
yolo.passthrough.link(objectTracker.inputTrackerFrame)
yolo.passthrough.link(objectTracker.inputDetectionFrame)
yolo.out.link(objectTracker.inputDetections)
stereo.depth.link(yolo.inputDepth)
#camRgb.isp.link(xoutRgb.input)
featureTracker.passthroughInputImage.link(xout_passthrough.input)# comment or uncommet this line to repro crashe
featureTracker.outputFeatures.link(xoutFeatures.input)# comment or uncommet this line to repro crashe
imu.out.link(xoutImu.input)
return pipeline
def process_rgb_and_imu(rgb_frame, imu_packet):
# Process RGB frame and IMU data here
cv2.imshow("RGB", rgb_frame.getCvFrame())
print("IMU Data:", imu_packet)
def process_tracker(tracker_msg):
tracklets = tracker_msg.tracklets
for t in tracklets:
print(f"Tracked ID: {t.id}, Label: {t.label}")
# Main loop
with dai.Device(create_pipeline()) as device:
#######################NO QUEUE FOR FEATURE ONLY DETECTIONS OBJECT TRACKER############################
#rgb_queue = device.getOutputQueue("preview", maxSize=4, blocking=False)
imu_queue = device.getOutputQueue("imu", maxSize=50, blocking=False)
#tracker_queue = device.getOutputQueue("tracklets", maxSize=4, blocking=False) # Independent tracker
preview = device.getOutputQueue("preview", 4, False)
tracklets = device.getOutputQueue("tracklets", 4, False)
#q_depth = device.getOutputQueue(name="depth", maxSize=4, blocking=False)
startTime = time.monotonic()
counter = 0
fps = 0
color = (255, 255, 255)
while True:
imgFrame = preview.get()
track = tracklets.get()
#rgb_msg = rgb_queue.tryGet()
imu_msg = imu_queue.tryGet()
#tracker_msg = tracker_queue.tryGet() # Independent tracking handling
if imgFrame is not None:
add_msg(imgFrame, "preview")
if imu_msg is not None:
add_msg(imu_msg, "imu")
counter+=1
current_time = time.monotonic()
if (current_time - startTime) > 1 :
fps = counter / (current_time - startTime)
counter = 0
startTime = current_time
frame = imgFrame.getCvFrame()
#synced = add_msg(rgb_msg, "preview") or add_msg(imu_msg, "imu")
#if synced:
# process_rgb_and_imu(synced['rgb'], synced['imu'])
trackletsData = track.tracklets
if trackletsData is not None:
for t in trackletsData:
roi = t.roi.denormalize(frame.shape[1], frame.shape[0])
x1 = int(roi.topLeft().x)
y1 = int(roi.topLeft().y)
x2 = int(roi.bottomRight().x)
y2 = int(roi.bottomRight().y)
# Extraer las coordenadas espaciales desde el tracker
px = t.spatialCoordinates.x
py = t.spatialCoordinates.y
pz = t.spatialCoordinates.z
# Mostrar las coordenadas en la consola o en el frame
print(f"Posición espacial: X={px}, Y={py}, Z={pz}")
#update_state(imu_data=synchronized_imu, visual_data=(px, py, pz))
try:
label = labelMap[t.label]
except:
label = t.label
cv2.putText(frame, str(label), (x1 + 10, y1 + 20), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.putText(frame, f"ID: {[t.id]}", (x1 + 10, y1 + 35), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.putText(frame, t.status.name, (x1 + 10, y1 + 50), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.rectangle(frame, (x1, y1), (x2, y2), color, cv2.FONT_HERSHEY_SIMPLEX)
cv2.putText(frame, f"X: {int(t.spatialCoordinates.x)} mm", (x1 + 10, y1 + 65), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.putText(frame, f"Y: {int(t.spatialCoordinates.y)} mm", (x1 + 10, y1 + 80), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.putText(frame, f"Z: {int(t.spatialCoordinates.z)} mm", (x1 + 10, y1 + 95), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.putText(frame, "NN fps: {:.2f}".format(fps), (2, frame.shape[0] - 4), cv2.FONT_HERSHEY_TRIPLEX, 0.4, color)
cv2.imshow("tracker", frame)
#if tracker_msg: # Process tracker independently
# process_tracker(tracker_msg)
if cv2.waitKey(1) == ord('q'):
break
'''
LOGS:
(yolooak) C:\Users\EmilioMachado\Documents\depthai-python\examples\SpatialDetection>python imu_synced_ft_od.py
[2024-10-21 05:35:55.045] [depthai] [debug] Python bindings - version: 2.28.0.0 from 2024-08-19 13:30:11 +0200 build: 2024-08-19 17:08:33 +0000
[2024-10-21 05:35:55.046] [depthai] [debug] Library information - version: 2.28.0, commit: 12158a5166e0162ee94ae7a86aaac48eafd2a15f from 2024-08-19 13:28:28 +0200, build: 2024-08-19 17:08:23 +0000, libusb enabled: true
[2024-10-21 05:35:55.058] [depthai] [debug] Initialize - finished
[2024-10-21 05:35:55.174] [depthai] [debug] Resources - Archive 'depthai-bootloader-fwp-0.0.28.tar.xz' open: 2ms, archive read: 124ms
[2024-10-21 05:35:55.687] [depthai] [debug] Resources - Archive 'depthai-device-fwp-9ed7c9ae4c232ff93a3500a585a6b1c00650e22c.tar.xz' open: 3ms, archive read: 636ms
imu_synced_ft_od.py:58: DeprecationWarning: LEFT is deprecated, use CAM_B or address camera by name instead.
monoLeft.setBoardSocket(dai.CameraBoardSocket.LEFT)
imu_synced_ft_od.py:59: DeprecationWarning: RIGHT is deprecated, use CAM_C or address camera by name instead.
monoRight.setBoardSocket(dai.CameraBoardSocket.RIGHT)
imu_synced_ft_od.py:77: DeprecationWarning: RGB is deprecated, use CAM_A or address camera by name instead.
stereo.setDepthAlign(dai.CameraBoardSocket.RGB) # Alinear con RGB
[2024-10-21 05:35:58.494] [host] [debug] Device - OpenVINO version: 2022.1
[14442C10518FA1D000] [1.1] [1729499758.498] [host] [debug] Device - BoardConfig: {"camera":[],"emmc":null,"gpio":[],"imu":null,"logDevicePrints":null,"logPath":null,"logSizeMax":null,"logVerbosity":null,"network":{"mtu":0,"xlinkTcpNoDelay":true},"nonExclusiveMode":false,"pcieInternalClock":null,"sysctl":[],"uart":[],"usb":{"flashBootedPid":63037,"flashBootedVid":999,"manufacturer":"","maxSpeed":4,"pid":63035,"productName":"","vid":999},"usb3PhyInternalClock":null,"uvc":null,"watchdogInitialDelayMs":null,"watchdogTimeoutMs":null}
libnop:
0000: b9 12 b9 07 81 e7 03 81 3b f6 81 e7 03 81 3d f6 04 bd 00 bd 00 b9 02 00 01 ba 00 be be bb 00 bb
0020: 00 be be be be be be be 00 bb 00 be be
[2024-10-21 05:35:59.563] [depthai] [debug] Searching for booted device: DeviceInfo(name=1.1, mxid=14442C10518FA1D000, X_LINK_BOOTED, X_LINK_USB_VSC, X_LINK_MYRIAD_X, X_LINK_SUCCESS), name used as hint only
[14442C10518FA1D000] [1.1] [0.895] [system] [info] Memory Usage - DDR: 0.12 / 333.28 MiB, CMX: 2.04 / 2.50 MiB, LeonOS Heap: 7.51 / 81.76 MiB, LeonRT Heap: 2.89 / 39.90 MiB / NOC ddr: 26 MB/s
[14442C10518FA1D000] [1.1] [0.896] [system] [info] Temperatures - Average: 24.93C, CSS: 26.41C, MSS 25.67C, UPA: 23.44C, DSS: 24.18C
[14442C10518FA1D000] [1.1] [0.896] [system] [info] Cpu Usage - LeonOS 54.48%, LeonRT: 1.76%
[14442C10518FA1D000] [1.1] [1729499760.500] [host] [debug] Schema dump: {"connections":[{"node1Id":1,"node1Output":"out","node1OutputGroup":"","node2Id":3,"node2Input":"inputImage","node2InputGroup":""},{"node1Id":7,"node1Output":"out","node1OutputGroup":"","node2Id":12,"node2Input":"in","node2InputGroup":""},{"node1Id":1,"node1Output":"out","node1OutputGroup":"","node2Id":4,"node2Input":"inputImage","node2InputGroup":""},{"node1Id":3,"node1Output":"out","node1OutputGroup":"","node2Id":8,"node2Input":"inputImage","node2InputGroup":""},{"node1Id":4,"node1Output":"out","node1OutputGroup":"","node2Id":5,"node2Input":"left","node2InputGroup":""},{"node1Id":2,"node1Output":"out","node1OutputGroup":"","node2Id":5,"node2Input":"right","node2InputGroup":""},{"node1Id":0,"node1Output":"preview","node1OutputGroup":"","node2Id":6,"node2Input":"in","node2InputGroup":""},{"node1Id":5,"node1Output":"depth","node1OutputGroup":"","node2Id":6,"node2Input":"inputDepth","node2InputGroup":""},{"node1Id":7,"node1Output":"passthroughTrackerFrame","node1OutputGroup":"","node2Id":10,"node2Input":"in","node2InputGroup":""},{"node1Id":6,"node1Output":"passthrough","node1OutputGroup":"","node2Id":7,"node2Input":"inputDetectionFrame","node2InputGroup":""},{"node1Id":6,"node1Output":"passthrough","node1OutputGroup":"","node2Id":7,"node2Input":"inputTrackerFrame","node2InputGroup":""},{"node1Id":6,"node1Output":"out","node1OutputGroup":"","node2Id":7,"node2Input":"inputDetections","node2InputGroup":""},{"node1Id":8,"node1Output":"passthroughInputImage","node1OutputGroup":"","node2Id":14,"node2Input":"in","node2InputGroup":""},{"node1Id":8,"node1Output":"outputFeatures","node1OutputGroup":"","node2Id":13,"node2Input":"in","node2InputGroup":""},{"node1Id":9,"node1Output":"out","node1OutputGroup":"","node2Id":16,"node2Input":"in","node2InputGroup":""}],"globalProperties":{"calibData":null,"cameraTuningBlobSize":null,"cameraTuningBlobUri":"","leonCssFrequencyHz":700000000.0,"leonMssFrequencyHz":700000000.0,"pipelineName":null,"pipelineVersion":null,"sippBufferSize":18432,"sippDmaBufferSize":16384,"xlinkChunkSize":-1},"nodes":[[0,{"id":0,"ioInfo":[[["","inputConfig"],{"blocking":false,"group":"","id":1,"name":"inputConfig","queueSize":8,"type":3,"waitForMessage":false}],[["","raw"],{"blocking":false,"group":"","id":6,"name":"raw","queueSize":8,"type":0,"waitForMessage":false}],[["","still"],{"blocking":false,"group":"","id":7,"name":"still","queueSize":8,"type":0,"waitForMessage":false}],[["","inputControl"],{"blocking":true,"group":"","id":2,"name":"inputControl","queueSize":8,"type":3,"waitForMessage":false}],[["","video"],{"blocking":false,"group":"","id":3,"name":"video","queueSize":8,"type":0,"waitForMessage":false}],[["","isp"],{"blocking":false,"group":"","id":4,"name":"isp","queueSize":8,"type":0,"waitForMessage":false}],[["","preview"],{"blocking":false,"group":"","id":5,"name":"preview","queueSize":8,"type":0,"waitForMessage":false}],[["","frameEvent"],{"blocking":false,"group":"","id":8,"name":"frameEvent","queueSize":8,"type":0,"waitForMessage":false}]],"name":"ColorCamera","properties":[185,26,185,31,0,3,0,136,0,0,0,0,0,0,185,3,0,0,0,185,5,0,0,0,0,0,185,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,3,0,0,0,185,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,189,0,255,0,0,0,129,96,1,129,96,1,255,255,255,255,0,136,0,0,240,65,0,136,0,0,128,191,136,0,0,128,191,1,185,4,0,0,0,0,3,3,4,4,4,190]}],[1,{"id":1,"ioInfo":[[["","inputControl"],{"blocking":true,"group":"","id":9,"name":"inputControl","queueSize":8,"type":3,"waitForMessage":false}],[["","out"],{"blocking":false,"group":"","id":10,"name":"out","queueSize":8,"type":0,"waitForMessage":false}],[["","raw"],{"blocking":false,"group":"","id":11,"name":"raw","queueSize":8,"type":0,"waitForMessage":false}],[["","frameEvent"],{"blocking":false,"group":"","id":12,"name":"frameEvent","queueSize":8,"type":0,"waitForMessage":false}]],"name":"MonoCamera","properties":[185,10,185,31,0,3,0,136,0,0,0,0,0,0,185,3,0,0,0,185,5,0,0,0,0,0,185,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,3,0,0,0,185,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,189,0,255,2,136,0,0,240,65,0,3,3,190]}],[2,{"id":2,"ioInfo":[[["","inputControl"],{"blocking":true,"group":"","id":13,"name":"inputControl","queueSize":8,"type":3,"waitForMessage":false}],[["","out"],{"blocking":false,"group":"","id":14,"name":"out","queueSize":8,"type":0,"waitForMessage":false}],[["","raw"],{"blocking":false,"group":"","id":15,"name":"raw","queueSize":8,"type":0,"waitForMessage":false}],[["","frameEvent"],{"blocking":false,"group":"","id":16,"name":"frameEvent","queueSize":8,"type":0,"waitForMessage":false}]],"name":"MonoCamera","properties":[185,10,185,31,0,3,0,136,0,0,0,0,0,0,185,3,0,0,0,185,5,0,0,0,0,0,185,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,3,0,0,0,185,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,189,0,255,2,136,0,0,240,65,0,3,3,190]}],[3,{"id":3,"ioInfo":[[["","inputConfig"],{"blocking":true,"group":"","id":17,"name":"inputConfig","queueSize":8,"type":3,"waitForMessage":false}],[["","inputImage"],{"blocking":true,"group":"","id":18,"name":"inputImage","queueSize":8,"type":3,"waitForMessage":true}],[["","out"],{"blocking":false,"group":"","id":19,"name":"out","queueSize":8,"type":0,"waitForMessage":false}]],"name":"ImageManip","properties":[185,6,185,9,185,7,185,4,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,185,3,185,2,136,0,0,0,0,136,0,0,0,0,185,2,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,0,136,0,0,128,63,136,0,0,128,63,0,1,185,15,133,128,2,133,144,1,0,0,0,0,186,0,1,0,186,0,0,0,136,0,0,0,0,0,1,185,6,32,0,0,0,0,133,255,0,0,1,0,0,0,255,134,0,0,16,0,4,0,0,189,0]}],[4,{"id":4,"ioInfo":[[["","inputConfig"],{"blocking":true,"group":"","id":20,"name":"inputConfig","queueSize":8,"type":3,"waitForMessage":false}],[["","inputImage"],{"blocking":true,"group":"","id":21,"name":"inputImage","queueSize":8,"type":3,"waitForMessage":true}],[["","out"],{"blocking":false,"group":"","id":22,"name":"out","queueSize":8,"type":0,"waitForMessage":false}]],"name":"ImageManip","properties":[185,6,185,9,185,7,185,4,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,185,3,185,2,136,0,0,0,0,136,0,0,0,0,185,2,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,0,136,0,0,128,63,136,0,0,128,63,0,1,185,15,133,128,2,133,144,1,0,0,0,0,186,0,1,0,186,0,0,0,136,0,0,0,0,0,1,185,6,32,0,0,0,0,133,255,0,0,1,0,0,0,255,134,0,0,16,0,4,0,0,189,0]}],[5,{"id":5,"ioInfo":[[["","inputConfig"],{"blocking":false,"group":"","id":23,"name":"inputConfig","queueSize":4,"type":3,"waitForMessage":false}],[["","left"],{"blocking":false,"group":"","id":24,"name":"left","queueSize":8,"type":3,"waitForMessage":true}],[["","debugExtDispLrCheckIt1"],{"blocking":false,"group":"","id":36,"name":"debugExtDispLrCheckIt1","queueSize":8,"type":0,"waitForMessage":false}],[["","right"],{"blocking":false,"group":"","id":25,"name":"right","queueSize":8,"type":3,"waitForMessage":true}],[["","syncedLeft"],{"blocking":false,"group":"","id":26,"name":"syncedLeft","queueSize":8,"type":0,"waitForMessage":false}],[["","depth"],{"blocking":false,"group":"","id":27,"name":"depth","queueSize":8,"type":0,"waitForMessage":false}],[["","disparity"],{"blocking":false,"group":"","id":28,"name":"disparity","queueSize":8,"type":0,"waitForMessage":false}],[["","syncedRight"],{"blocking":false,"group":"","id":29,"name":"syncedRight","queueSize":8,"type":0,"waitForMessage":false}],[["","debugDispCostDump"],{"blocking":false,"group":"","id":34,"name":"debugDispCostDump","queueSize":8,"type":0,"waitForMessage":false}],[["","debugDispLrCheckIt2"],{"blocking":false,"group":"","id":35,"name":"debugDispLrCheckIt2","queueSize":8,"type":0,"waitForMessage":false}],[["","rectifiedLeft"],{"blocking":false,"group":"","id":30,"name":"rectifiedLeft","queueSize":8,"type":0,"waitForMessage":false}],[["","debugExtDispLrCheckIt2"],{"blocking":false,"group":"","id":37,"name":"debugExtDispLrCheckIt2","queueSize":8,"type":0,"waitForMessage":false}],[["","rectifiedRight"],{"blocking":false,"group":"","id":31,"name":"rectifiedRight","queueSize":8,"type":0,"waitForMessage":false}],[["","confidenceMap"],{"blocking":false,"group":"","id":38,"name":"confidenceMap","queueSize":8,"type":0,"waitForMessage":false}],[["","outConfig"],{"blocking":false,"group":"","id":32,"name":"outConfig","queueSize":8,"type":0,"waitForMessage":false}],[["","debugDispLrCheckIt1"],{"blocking":false,"group":"","id":33,"name":"debugDispLrCheckIt1","queueSize":8,"type":0,"waitForMessage":false}]],"name":"StereoDepth","properties":[185,22,185,5,185,11,0,2,136,0,0,122,68,1,0,0,10,3,0,190,0,185,8,5,0,185,5,0,2,136,0,0,0,63,0,1,185,4,0,3,136,205,204,204,62,0,185,2,0,134,255,255,0,0,185,2,0,133,0,1,185,2,0,50,185,2,1,0,185,4,255,0,1,0,185,5,1,0,0,128,245,185,3,0,2,127,185,5,1,128,250,129,244,1,128,250,129,244,1,0,1,0,190,190,190,190,1,185,5,189,0,189,0,190,16,16,0,3,255,255,1,190,190,190,190,190,190,190]}],[6,{"id":6,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":39,"name":"in","queueSize":5,"type":3,"waitForMessage":true}],[["","passthroughDepth"],{"blocking":false,"group":"","id":44,"name":"passthroughDepth","queueSize":8,"type":0,"waitForMessage":false}],[["","inputDepth"],{"blocking":false,"group":"","id":40,"name":"inputDepth","queueSize":4,"type":3,"waitForMessage":true}],[["","boundingBoxMapping"],{"blocking":false,"group":"","id":43,"name":"boundingBoxMapping","queueSize":8,"type":0,"waitForMessage":false}],[["","out"],{"blocking":false,"group":"","id":41,"name":"out","queueSize":8,"type":0,"waitForMessage":false}],[["","passthrough"],{"blocking":false,"group":"","id":42,"name":"passthrough","queueSize":8,"type":0,"waitForMessage":false}]],"name":"SpatialDetectionNetwork","properties":[185,10,130,70,191,215,0,189,12,97,115,115,101,116,58,95,95,98,108,111,98,8,0,0,185,7,0,136,0,0,0,63,6,4,186,18,136,0,0,32,65,136,0,0,80,65,136,0,0,128,65,136,0,0,240,65,136,0,0,4,66,136,0,0,184,65,136,0,0,240,65,136,0,0,116,66,136,0,0,120,66,136,0,0,52,66,136,0,0,108,66,136,0,0,238,66,136,0,0,232,66,136,0,0,180,66,136,0,0,28,67,136,0,0,70,67,136,0,128,186,67,136,0,0,163,67,187,3,189,6,115,105,100,101,49,49,188,12,6,0,0,0,7,0,0,0,8,0,0,0,189,6,115,105,100,101,50,50,188,12,3,0,0,0,4,0,0,0,5,0,0,0,189,6,115,105,100,101,52,52,188,12,0,0,0,0,1,0,0,0,2,0,0,0,136,0,0,0,63,136,0,0,128,63,185,2,0,129,255,255,4,255]}],[7,{"id":7,"ioInfo":[[["","inputTrackerFrame"],{"blocking":false,"group":"","id":45,"name":"inputTrackerFrame","queueSize":4,"type":3,"waitForMessage":true}],[["","inputDetections"],{"blocking":false,"group":"","id":46,"name":"inputDetections","queueSize":4,"type":3,"waitForMessage":true}],[["","inputDetectionFrame"],{"blocking":false,"group":"","id":47,"name":"inputDetectionFrame","queueSize":4,"type":3,"waitForMessage":true}],[["","out"],{"blocking":false,"group":"","id":48,"name":"out","queueSize":8,"type":0,"waitForMessage":false}],[["","passthroughTrackerFrame"],{"blocking":false,"group":"","id":49,"name":"passthroughTrackerFrame","queueSize":8,"type":0,"waitForMessage":false}],[["","passthroughDetectionFrame"],{"blocking":false,"group":"","id":50,"name":"passthroughDetectionFrame","queueSize":8,"type":0,"waitForMessage":false}],[["","passthroughDetections"],{"blocking":false,"group":"","id":51,"name":"passthroughDetections","queueSize":8,"type":0,"waitForMessage":false}]],"name":"ObjectTracker","properties":[185,6,136,0,0,0,0,60,188,4,1,0,0,0,6,1,1]}],[8,{"id":8,"ioInfo":[[["","inputConfig"],{"blocking":false,"group":"","id":52,"name":"inputConfig","queueSize":4,"type":3,"waitForMessage":false}],[["","inputImage"],{"blocking":false,"group":"","id":53,"name":"inputImage","queueSize":4,"type":3,"waitForMessage":true}],[["","outputFeatures"],{"blocking":false,"group":"","id":54,"name":"outputFeatures","queueSize":8,"type":0,"waitForMessage":false}],[["","passthroughInputImage"],{"blocking":false,"group":"","id":55,"name":"passthroughInputImage","queueSize":8,"type":0,"waitForMessage":false}]],"name":"FeatureTracker","properties":[185,3,185,3,185,7,0,4,133,64,1,0,185,5,136,0,0,0,0,136,0,0,0,0,136,0,0,0,0,136,102,102,102,63,136,205,204,140,63,1,1,185,3,1,0,185,5,0,5,5,136,10,215,35,60,9,185,4,1,136,0,0,72,66,136,0,80,67,71,136,0,80,67,72,2,2]}],[9,{"id":9,"ioInfo":[[["","out"],{"blocking":false,"group":"","id":56,"name":"out","queueSize":8,"type":0,"waitForMessage":false}]],"name":"IMU","properties":[185,4,186,1,185,5,0,0,0,100,5,1,10,0]}],[10,{"id":10,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":57,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,7,112,114,101,118,105,101,119,0]}],[11,{"id":11,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":58,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,5,100,101,112,116,104,0]}],[12,{"id":12,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":59,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,9,116,114,97,99,107,108,101,116,115,0]}],[13,{"id":13,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":60,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,8,102,101,97,116,117,114,101,115,0]}],[14,{"id":14,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":61,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,11,112,97,115,115,116,104,114,111,117,103,104,0]}],[15,{"id":15,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":62,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,4,120,111,117,116,0]}],[16,{"id":16,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":63,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,3,105,109,117,0]}]]}
[14442C10518FA1D000] [1.1] [1729499760.503] [host] [debug] Asset map dump: {"map":{"/node/6/__blob":{"alignment":64,"offset":0,"size":14139206}}}
[2024-10-21 05:36:00.723] [depthai] [info] Logging disabled
[14442C10518FA1D000] [1.1] [1.157] [MonoCamera(2)] [info] Using board socket: 2, id: 2
[14442C10518FA1D000] [1.1] [1.157] [MonoCamera(1)] [info] Using board socket: 1, id: 1
[14442C10518FA1D000] [1.1] [1.160] [ObjectTracker(7)] [info] Init node object tracker
[14442C10518FA1D000] [1.1] [1.160] [FeatureTracker(8)] [info] Init node feature tracker.
[14442C10518FA1D000] [1.1] [1.164] [system] [info] SpatialLocationCalculator shave buffer size '61440'B
[14442C10518FA1D000] [1.1] [1.165] [system] [info] SIPP (Signal Image Processing Pipeline) internal buffer size '18432'B, DMA buffer size: '16384'B
[14442C10518FA1D000] [1.1] [1.200] [system] [info] ImageManip internal buffer size '289792'B, shave buffer size '35840'B
[14442C10518FA1D000] [1.1] [1.200] [system] [info] NeuralNetwork allocated resources: shaves: [0-8] cmx slices: [0-8]
ColorCamera allocated resources: no shaves; cmx slices: [12-14]
MonoCamera allocated resources: no shaves; cmx slices: [12-14]
StereoDepth allocated resources: shaves: [9-9] cmx slices: [9-9]
ImageManip allocated resources: shaves: [14-14] no cmx slices.
SpatialLocationCalculator allocated resources: shaves: [13-13] no cmx slices.
ObjectTracker allocated resources: shaves: [15-15] cmx slices: [15-15]
FeatureTracker allocated resources: shaves: [10-11] cmx slices: [10-11]
[14442C10518FA1D000] [1.1] [1.395] [IMU(9)] [info] IMU product ID:
[14442C10518FA1D000] [1.1] [1.396] [IMU(9)] [info] Part 10004563 : Version 3.9.9 Build 2
[14442C10518FA1D000] [1.1] [1.396] [IMU(9)] [info] Part 10003606 : Version 1.8.0 Build 338
[14442C10518FA1D000] [1.1] [1.396] [IMU(9)] [info] Part 10004135 : Version 5.5.3 Build 162
[14442C10518FA1D000] [1.1] [1.396] [IMU(9)] [info] Part 10004149 : Version 5.1.12 Build 183
[14442C10518FA1D000] [1.1] [1.425] [SpatialDetectionNetwork(6)] [info] Needed resources: shaves: 6, ddr: 5733632
[14442C10518FA1D000] [1.1] [1.425] [SpatialDetectionNetwork(6)] [warning] Network compiled for 6 shaves, maximum available 9, compiling for 4 shaves likely will yield in better performance
[14442C10518FA1D000] [1.1] [1.449] [SpatialDetectionNetwork(6)] [info] Inference thread count: 1, number of shaves allocated per thread: 6, number of Neural Compute Engines (NCE) allocated per thread: 2
[14442C10518FA1D000] [1.1] [1.664] [StereoDepth(5)] [info] Depth baseline: '7.5000005' cm, focal length: '429.90454'
[14442C10518FA1D000] [1.1] [1.664] [StereoDepth(5)] [info] Depth horizontal FOV: '65.978836', vertical FOV: '40.14062'
[14442C10518FA1D000] [1.1] [1.664] [StereoDepth(5)] [info] Depth intrinsics:
1478.868, 0.000, 967.595,
0.000, 1477.992, 532.261,
0.000, 0.000, 1.000,
[14442C10518FA1D000] [1.1] [1.718] [IMU(9)] [info] IMU product ID:
[14442C10518FA1D000] [1.1] [1.718] [IMU(9)] [info] Part 10004563 : Version 3.9.9 Build 2
[14442C10518FA1D000] [1.1] [1.718] [IMU(9)] [info] Part 10003606 : Version 1.8.0 Build 338
[14442C10518FA1D000] [1.1] [1.718] [IMU(9)] [info] Part 10004135 : Version 5.5.3 Build 162
[14442C10518FA1D000] [1.1] [1.718] [IMU(9)] [info] Part 10004149 : Version 5.1.12 Build 183
[14442C10518FA1D000] [1.1] [1.897] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 108 MB/s
[14442C10518FA1D000] [1.1] [1.897] [system] [info] Temperatures - Average: 27.76C, CSS: 28.86C, MSS 27.15C, UPA: 27.88C, DSS: 27.15C
[14442C10518FA1D000] [1.1] [1.897] [system] [info] Cpu Usage - LeonOS 41.26%, LeonRT: 31.81%
[14442C10518FA1D000] [1.1] [2.898] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 1611 MB/s
[14442C10518FA1D000] [1.1] [2.898] [system] [info] Temperatures - Average: 29.16C, CSS: 30.80C, MSS 28.86C, UPA: 29.59C, DSS: 27.39C
[14442C10518FA1D000] [1.1] [2.898] [system] [info] Cpu Usage - LeonOS 51.65%, LeonRT: 39.21%
[14442C10518FA1D000] [1.1] [3.899] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 1745 MB/s
[14442C10518FA1D000] [1.1] [3.899] [system] [info] Temperatures - Average: 28.56C, CSS: 29.59C, MSS 28.13C, UPA: 28.86C, DSS: 27.64C
[14442C10518FA1D000] [1.1] [3.899] [system] [info] Cpu Usage - LeonOS 35.96%, LeonRT: 17.33%
[14442C10518FA1D000] [1.1] [4.900] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 310 MB/s
[14442C10518FA1D000] [1.1] [4.900] [system] [info] Temperatures - Average: 28.25C, CSS: 29.10C, MSS 28.37C, UPA: 28.13C, DSS: 27.39C
[14442C10518FA1D000] [1.1] [4.900] [system] [info] Cpu Usage - LeonOS 26.80%, LeonRT: 1.33%
[14442C10518FA1D000] [1.1] [5.901] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 150 MB/s
[14442C10518FA1D000] [1.1] [5.901] [system] [info] Temperatures - Average: 28.56C, CSS: 29.10C, MSS 28.62C, UPA: 28.62C, DSS: 27.88C
[14442C10518FA1D000] [1.1] [5.901] [system] [info] Cpu Usage - LeonOS 26.91%, LeonRT: 1.31%
[14442C10518FA1D000] [1.1] [6.902] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 150 MB/s
[14442C10518FA1D000] [1.1] [6.902] [system] [info] Temperatures - Average: 28.13C, CSS: 29.10C, MSS 28.13C, UPA: 27.88C, DSS: 27.39C
[14442C10518FA1D000] [1.1] [6.902] [system] [info] Cpu Usage - LeonOS 26.98%, LeonRT: 1.31%
[14442C10518FA1D000] [1.1] [7.903] [system] [info] Memory Usage - DDR: 78.33 / 333.28 MiB, CMX: 2.47 / 2.50 MiB, LeonOS Heap: 49.56 / 81.76 MiB, LeonRT Heap: 7.23 / 39.90 MiB / NOC ddr: 150 MB/s
[14442C10518FA1D000] [1.1] [7.903] [system] [info] Temperatures - Average: 28.01C, CSS: 29.10C, MSS 27.64C, UPA: 28.13C, DSS: 27.15C
[14442C10518FA1D000] [1.1] [7.903] [system] [info] Cpu Usage - LeonOS 26.91%, LeonRT: 1.32%
[14442C10518FA1D000] [1.1] [1729499768.214] [host] [debug] Device about to be closed...
[14442C10518FA1D000] [1.1] [1729499768.231] [host] [debug] Shutdown OK
[2024-10-21 05:36:08.238] [depthai] [debug] DataOutputQueue (imu) closed
[2024-10-21 05:36:08.238] [depthai] [debug] DataOutputQueue (xout) closed
[2024-10-21 05:36:08.238] [depthai] [debug] DataOutputQueue (preview) closed
[14442C10518FA1D000] [1.1] [1729499768.238] [host] [debug] Timesync thread exception caught: Couldn't read data from stream: '__timesync' (X_LINK_ERROR)
[14442C10518FA1D000] [1.1] [1729499768.238] [host] [debug] Log thread exception caught: Couldn't read data from stream: '__log' (X_LINK_ERROR)
[2024-10-21 05:36:08.238] [depthai] [debug] DataOutputQueue (tracklets) closed
[2024-10-21 05:36:08.238] [depthai] [debug] DataOutputQueue (depth) closed
[14442C10518FA1D000] [1.1] [1729499768.872] [host] [debug] Watchdog thread exception caught: Couldn't write data to stream: '__watchdog' (X_LINK_ERROR)
[2024-10-21 05:36:08.884] [depthai] [debug] XLinkResetRemote of linkId: (0)
[14442C10518FA1D000] [1.1] [1729499769.508] [host] [debug] Device closed, 1294
[2024-10-21 05:36:09.509] [depthai] [debug] DataOutputQueue (features) closed
[2024-10-21 05:36:09.511] [depthai] [debug] DataOutputQueue (passthrough) closed
Traceback (most recent call last):
File "imu_synced_ft_od.py", line 203, in <module>
imgFrame = preview.get()
KeyboardInterrupt
C