Hi jakaskerl,
I made it work on windows laptop with both virtual environment and globally installed. So, now I'm pretty sure the problem is coming from ubuntu 22.04. I'll try to debug it and find the real source of error.
Rezahojjatysaeedy

- Oct 22, 2024
- Joined Nov 9, 2023
- 0 best answers
Hi jakaskerl,
I might have figured out the source of different behaviors between different systems. While I'm running the same git branch on all of them, on those two not working systems, I was installing everything in .venv but in working windows PC everything is installed globally. That's somehow embarrassing as I really want to have everything installed in a virtual environment. Any chance you've came across the same issue before and any idea how to address it or what might be the real reason an venv might not work?Hi jakaskerl,
I tried the pipeline on the same laptop but with windows 10, Now I'm getting following error. I thought it might clarify a little more:
[1944301091D4481300] [1.2] [1706566171.726] [host] [warning] Monitor thread (device: 1944301091D4481300 [1.2]) - ping was missed, closing the device connection
Stack trace (most recent call last):
#31 Object "", at 00007FF9C8D9048E, in PyInit_depthai
#30 Object "", at 00007FF9C8D8FBD2, in PyInit_depthai
#29 Object "", at 00007FF9C8D93F54, in PyInit_depthai
#28 Object "", at 00007FF9C8D8D316, in PyInit_depthai
#27 Object "", at 00007FF9C8D5B8D6, in PyInit_depthai
#26 Object "", at 00007FF9C8D6F4E1, in PyInit_depthai
#25 Object "", at 00007FF9C8D6DE6B, in PyInit_depthai
#24 Object "", at 00007FFA47433646, in RtlCaptureContext2
#23 Object "", at 00007FF9C8E93EF1, in PyInit_depthai
#22 Object "", at 00007FF9C8E9CE80, in PyInit_depthai
#21 Object "", at 00007FF9C8ED1B64, in PyInit_depthai
#20 Object "", at 00007FF9C8E90893, in PyInit_depthai
#19 Object "", at 00007FFA44C8531C, in RaiseException
#18 Object "", at 00007FFA473E4455, in RtlRaiseException
#17 Object "", at 00007FFA473AE456, in RtlFindCharInUnicodeString
#16 Object "", at 00007FFA47433DFF, in _chkstk
#15 Object "", at 00007FF9C8E8FBF1, in PyInit_depthai
#14 Object "", at 00007FF9C8E93A71, in PyInit_depthai
#13 Object "", at 00007FF9C8E93A0C, in PyInit_depthai
#12 Object "", at 00007FF9C8E92C63, in PyInit_depthai
#11 Object "", at 00007FF9C8E923E9, in PyInit_depthai
#10 Object "", at 00007FF9C8E8F7FE, in PyInit_depthai
#9 Object "", at 00007FFA473AFD44, in RtlUnwindEx
#8 Object "", at 00007FFA47433E7F, in _chkstk
#7 Object "", at 00007FF9C8E8E744, in PyInit_depthai
#6 Object "", at 00007FF9C8E8FBF1, in PyInit_depthai
#5 Object "", at 00007FF9C8E93A71, in PyInit_depthai
#4 Object "", at 00007FF9C8E93939, in PyInit_depthai
#3 Object "", at 00007FF9C8E8F24D, in PyInit_depthai
#2 Object "", at 00007FF9C8E94698, in PyInit_depthai
#1 Object "", at 00007FF9C8E9CEEA, in PyInit_depthai
#0 Object "", at 00007FF9C8D6D2D4, in PyInit_depthaiHi jakaskerl,
This is the output before running the script:
[ 0.323282] usbcore: registered new interface driver usbfs
[ 0.323282] usbcore: registered new interface driver hub
[ 0.323282] usbcore: registered new device driver usb
[ 0.712775] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[ 0.712780] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.712783] usb usb1: Product: xHCI Host Controller
[ 0.712785] usb usb1: Manufacturer: Linux 6.5.0-14-generic xhci-hcd
[ 0.712787] usb usb1: SerialNumber: 0000:00:14.0
[ 0.725363] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.05
[ 0.725366] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.725367] usb usb2: Product: xHCI Host Controller
[ 0.725368] usb usb2: Manufacturer: Linux 6.5.0-14-generic xhci-hcd
[ 0.725368] usb usb2: SerialNumber: 0000:00:14.0
[ 0.984478] usb 1-13: new full-speed USB device number 2 using xhci_hcd
[ 1.141909] usb 1-13: New USB device found, idVendor=26ce, idProduct=01a2, bcdDevice= 0.00
[ 1.141922] usb 1-13: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.141927] usb 1-13: Product: LED Controller
[ 1.141930] usb 1-13: Manufacturer: ASRock
[ 1.141934] usb 1-13: SerialNumber: A02019100900
[ 1.268407] usb 1-14: new full-speed USB device number 3 using xhci_hcd
[ 1.418421] usb 1-14: New USB device found, idVendor=8087, idProduct=0033, bcdDevice= 0.00
[ 1.418427] usb 1-14: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.430491] usbcore: registered new interface driver usbhid
[ 1.430493] usbhid: USB HID core driver
[ 1.431329] input: ASRock LED Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/0003:26CE:01A2.0001/input/input3
[ 1.488966] hid-generic 0003:26CE:01A2.0001: input,hidraw0: USB HID v1.10 Device [ASRock LED Controller] on usb-0000:00:14.0-13/input0
[ 2.093772] usbcore: registered new interface driver btusb
[ 86.518853] usb 1-4: new low-speed USB device number 4 using xhci_hcd
[ 86.673188] usb 1-4: New USB device found, idVendor=2222, idProduct=0067, bcdDevice= 1.10
[ 86.673202] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 86.673207] usb 1-4: Product: USB Wired PC Keyboard
[ 86.673210] usb 1-4: Manufacturer: SEM
[ 86.678187] input: SEM USB Wired PC Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:2222:0067.0002/input/input13
[ 86.735439] hid-generic 0003:2222:0067.0002: input,hidraw1: USB HID v1.10 Keyboard [SEM USB Wired PC Keyboard] on usb-0000:00:14.0-4/input0
[ 86.738698] input: SEM USB Wired PC Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/0003:2222:0067.0003/input/input14
[ 86.799175] input: SEM USB Wired PC Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/0003:2222:0067.0003/input/input15
[ 86.799745] hid-generic 0003:2222:0067.0003: input,hidraw2: USB HID v1.10 Device [SEM USB Wired PC Keyboard] on usb-0000:00:14.0-4/input1
[ 117.235172] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[ 117.384100] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 117.384113] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 117.384118] usb 1-2: Product: Movidius MyriadX
[ 117.384121] usb 1-2: Manufacturer: Movidius Ltd.
[ 117.384124] usb 1-2: SerialNumber: 03e72485
[ 213.271649] usb 1-3: new low-speed USB device number 6 using xhci_hcd
[ 213.423726] usb 1-3: New USB device found, idVendor=046d, idProduct=c077, bcdDevice=72.00
[ 213.423739] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 213.423744] usb 1-3: Product: USB Optical Mouse
[ 213.423748] usb 1-3: Manufacturer: Logitech
[ 213.427300] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:046D:C077.0004/input/input16
[ 213.427664] hid-generic 0003:046D:C077.0004: input,hidraw3: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-3/input0
[ 3345.135336] usb 1-2: USB disconnect, device number 5
[ 3346.004278] usb 2-7: new SuperSpeed USB device number 2 using xhci_hcd
[ 3346.029095] usb 2-7: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 3346.029112] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3346.029117] usb 2-7: Product: Luxonis Device
[ 3346.029120] usb 2-7: Manufacturer: Intel Corporation
[ 3346.029124] usb 2-7: SerialNumber: 19443010B1A91F1300
[ 3354.332025] usb 2-7: USB disconnect, device number 2
[ 3354.771972] usb 1-2: new high-speed USB device number 7 using xhci_hcd
[ 3354.920768] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 3354.920780] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3354.920785] usb 1-2: Product: Movidius MyriadX
[ 3354.920789] usb 1-2: Manufacturer: Movidius Ltd.
[ 3354.920792] usb 1-2: SerialNumber: 03e72485
[ 3721.382080] usb 1-2: USB disconnect, device number 7
[ 3722.202212] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[ 3722.355056] usb 1-2: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 3722.355069] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3722.355074] usb 1-2: Product: Luxonis Device
[ 3722.355078] usb 1-2: Manufacturer: Intel Corporation
[ 3722.355082] usb 1-2: SerialNumber: 19443010B1A91F1300
[ 3730.539958] usb 1-2: USB disconnect, device number 8
[ 3731.033997] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 3731.194660] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 3731.194673] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3731.194679] usb 1-2: Product: Movidius MyriadX
[ 3731.194683] usb 1-2: Manufacturer: Movidius Ltd.
[ 3731.194687] usb 1-2: SerialNumber: 03e72485
[ 3745.459341] usb 1-2: USB disconnect, device number 9
[ 3774.856801] usb 1-10: new high-speed USB device number 10 using xhci_hcd
[ 3775.017545] usb 1-10: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 3775.017558] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3775.017563] usb 1-10: Product: Movidius MyriadX
[ 3775.017567] usb 1-10: Manufacturer: Movidius Ltd.
[ 3775.017571] usb 1-10: SerialNumber: 03e72485
[ 3797.092484] usb 1-10: USB disconnect, device number 10
[ 3797.912175] usb 1-10: new high-speed USB device number 11 using xhci_hcd
[ 3798.068896] usb 1-10: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 3798.068910] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3798.068915] usb 1-10: Product: Luxonis Device
[ 3798.068919] usb 1-10: Manufacturer: Intel Corporation
[ 3798.068923] usb 1-10: SerialNumber: 19443010B1A91F1300
[ 3806.250218] usb 1-10: USB disconnect, device number 11
[ 3806.751935] usb 1-10: new high-speed USB device number 12 using xhci_hcd
[ 3806.912518] usb 1-10: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 3806.912530] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3806.912535] usb 1-10: Product: Movidius MyriadX
[ 3806.912549] usb 1-10: Manufacturer: Movidius Ltd.
[ 3806.912552] usb 1-10: SerialNumber: 03e72485
[ 6215.293975] usb 1-10: USB disconnect, device number 12
[ 6216.097999] usb 1-10: new high-speed USB device number 13 using xhci_hcd
[ 6216.254704] usb 1-10: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 6216.254718] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6216.254723] usb 1-10: Product: Luxonis Device
[ 6216.254728] usb 1-10: Manufacturer: Intel Corporation
[ 6216.254731] usb 1-10: SerialNumber: 19443010B1A91F1300
[ 6224.451831] usb 1-10: USB disconnect, device number 13
[ 6224.945802] usb 1-10: new high-speed USB device number 14 using xhci_hcd
[ 6225.102389] usb 1-10: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 6225.102402] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6225.102407] usb 1-10: Product: Movidius MyriadX
[ 6225.102411] usb 1-10: Manufacturer: Movidius Ltd.
[ 6225.102416] usb 1-10: SerialNumber: 03e72485
[ 6345.086209] usb 1-10: USB disconnect, device number 14
[ 6345.903195] usb 1-10: new high-speed USB device number 15 using xhci_hcd
[ 6346.059935] usb 1-10: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 6346.059949] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6346.059955] usb 1-10: Product: Luxonis Device
[ 6346.059959] usb 1-10: Manufacturer: Intel Corporation
[ 6346.059962] usb 1-10: SerialNumber: 19443010B1A91F1300
[ 6354.244206] usb 1-10: USB disconnect, device number 15
[ 6354.734981] usb 1-10: new high-speed USB device number 16 using xhci_hcd
[ 6354.887562] usb 1-10: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 6354.887596] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6354.887602] usb 1-10: Product: Movidius MyriadX
[ 6354.887606] usb 1-10: Manufacturer: Movidius Ltd.
[ 6354.887609] usb 1-10: SerialNumber: 03e72485
And this is during until it crushes with that error message:
[ 6438.674845] usb 1-10: USB disconnect, device number 16
[ 6439.473124] usb 1-10: new high-speed USB device number 17 using xhci_hcd
[ 6439.629846] usb 1-10: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 6439.629859] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6439.629864] usb 1-10: Product: Luxonis Device
[ 6439.629868] usb 1-10: Manufacturer: Intel Corporation
[ 6439.629872] usb 1-10: SerialNumber: 19443010B1A91F1300
[ 6447.832710] usb 1-10: USB disconnect, device number 17
[ 6448.328937] usb 1-10: new high-speed USB device number 18 using xhci_hcd
[ 6448.485547] usb 1-10: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 6448.485564] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6448.485570] usb 1-10: Product: Movidius MyriadX
[ 6448.485573] usb 1-10: Manufacturer: Movidius Ltd.
[ 6448.485577] usb 1-10: SerialNumber: 03e72485
- Edited
Hi jakaskerl
I tried both methods and It's still giving me the same error. I purchased an oak y charger and connected the power port to 5 and 10W phone chargers but it's still giving me
RuntimeError: Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND
I wonder what else could be going wrong? I'm sure the pipeline is fine as I just pulled the working branch on PC.
Hi,
I have multiple NN in my pipeline. For one of them I'm using
cam.setPreviewSize(300, 300)
and then linking it withImageManip
node as shown in examples. But I also have another NN that accept different size of images, say 512x512. I wonder what's the most efficient way to provide input frames for this second NN. Should I create a secondImageManip
node. If So, what Should I link to it?cam.preview
that I previously resized to 300x300 orcam.video
which is the 1080P output of the camera?- Edited
Hi jakaskerl ,
Thanks for reply. Yes, my pipeline includes 4 NN and and a stereo depth estimation and it's constantly communicating with a PLC computer. If so, any advice? Would it work if I use an adapter that has usb-c power port because currently I'm using the only power inlet which is also the only usb-c port of tablet for LAN connection to the PLC and the extra usb-c port on the adapter is not power supplier.
- Edited
Hi,
I keep getting this error message after I hear the click sound of device starting:
RuntimeError: Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND
To connect to OAK-D series 2, I'm using ubuntu 22.04 on an Asus gaming laptop/tablet with only a usb c and a usb 2.0 port. I tried all different methods including setting
maxUsbSpeed=dai.UsbSpeed.HIGH
and connect the device to the usb 2.0 port or using a usb c to usb 3.0 adapter to connect the camera to the usb 3.0 port. I must mention that this adapter is a multi port usb-c to LAN adapter because I also need to connect my laptop to another device and so I also set static IP for my laptop. I know that the laptop works fine with my oak-d device as I can run example codes outside of my current pipeline. The issue probably is not the pipeline as well because I run it with no problem on a Windows Desktop PC.Alright, I was using default version of openvino 2022.1 but when I changed it to 2021.4 it worked fine and now the gaze is correct. Thank you @jakaskerl .
Hi jakaskerl,
You're right. Since model zoo was not working I built the blobs and put them on my working directory. But now, when I try to compile it using your configuration I get the following error:
Error message
Command failed with exit code 1, command: /opt/intel/openvino2022_1/tools/compile_tool /compile_tool -m /tmp/blobconverter/835562edef204b268b9af143cc8ba560/gaze-estimation- adas-0002/FP16/gaze-estimation-adas-0002.xml -o /tmp/blobconverter/ 835562edef204b268b9af143cc8ba560/gaze-estimation-adas-0002/FP16/gaze-estimation-adas-0002.blob -c /tmp/blobconverter/835562edef204b268b9af143cc8ba560/myriad_compile_config.txt -d MYRIAD -iop head_pose_angles:FP16,right_eye_image:U8,left_eye_image:U8
Console output (stdout)
OpenVINO Runtime version ......... 2022.1.0 Build ........... 2022.1.0-7019-cdb9bec7210-releases/2022/1
Error output (stderr)
Check '!tensorFound' failed at /home/jenkins/agent/workspace/private-ci/ie/build-linux- ubuntu20/b/repos/openvino/tools/compile_tool/main.cpp:456: Model doesn't have input/output with tensor name: head_pose_angles
- Edited
Hi,
I'm working with gen2-gaze-estimation for both device and host implementations. But the visualization for host side implementation is not quite right. I mean no matter how you turn your gaze, the arrows are always pointing downward while on device everything looks fine. I've gone through the code line by line and printed the estimated gaze as well as other detected points and there doesn't seem to be major differences between two implementations. I even wrote the gaze data to a text file and plotted them separately and they seem very similar. Can any one have a look into the repo and verify that what I'm seeing is expected or I am doing something wrong? Although, I didn't change anything from the original repo. That's the repo I'm talking about.
Thanks!
- Edited
Hi jakaskerl
I tried chatGPT. It just gives some general advice about how to debug it and so. I copied the link to the entire host-decoding folder. Currently I'm using
best.blob
which is a detection model trained in yolov5. It's supposed to draw bounding boxes around the eye fissure.https://drive.google.com/drive/folders/1H9SQyroWo9O4fa_6Pe8lPZC8INk4gLPw?usp=sharing
Hi jakaskerl,
I trained another network with the same size as your example and I'm getting similar fps as yours. But I noticed a difference in host visualization vs device visualization. On device you used
frameNorm()
function that normalizes the boxes w.r.t the frame shape. Such a normalization does not exist in host-decoding which makes the box coordinates small float numbers. Now when I usefaceNorm
on host these are my only boxes:x1: 0 y1: 0 x2: 208 y2: 208 x1: 208 y1: 208 x2: 416 y2: 416
Playing with iou and conf doesn't make it better. I know that the model must work better as it is detecting correctly on device side. Do you have any idea what might be going wrong on the host implementation?
Thanks jakaskerl
I managed to make it work. But It's very slow, about 7 fps the same speed I was getting on device and unlike device deployment now I'm not getting any detection. When I tested the default blob, `yolov5s_sku_openvino_2021.4_6shave.blob`on host I was getting 18 fps and both blobs have the same size (about 14 MB). Do you have any idea what might be causing this issue?
Thanks jakaskerl, It was a really helpful toward debugging. In
main.py
there is this linecols = output.shape[0]//10647
where givenoutput.shape[0] = 63888
makes thecols = 6
but all these looks a bit arbitrary. can you please elaborate a little where these numbers are coming from? Maybe this can help me to understand better what's going on? By the way I have no idea why I have three outputs. It must detect a box around eye at the end.- Edited
Hi jakaskerl,
Thanks for reply. The device side won't work for me. I already have a heavy pipeline and I need to get at least 20 fps. I tried it and it only gives me 7 fps. About the code, I have not incorporated into my pipeline yet. All I'm doing is to replace the blob from line 42 here with my trained blob and also change the 80 elements
labelMap
list with one elementlabelMap = ["fissure"]
because I only have one class, 'fissure'. I cannot upload the model here probably it's too large 14 MB but I share a link to it.https://drive.google.com/drive/folders/1pQaj04wSzYs5fZlmfM1ZQYmKzkFnMa20?usp=sharing
- Edited
Hi,
I'm following this tutorial for a model that I trained with my custom dataset on yolov5. I only have one class (eye surface) and I want to detect the bounding box around it. The model is working fine in yolov5 pipeline but when I convert it using Luxonis tool and follow the code in above host-decoding folder I get the following error:
Traceback (most recent call last): File "~/depthai-experiments/gen2-yolo/host-decoding/main.py", line 170, in <module> boxes = non_max_suppression(output, conf_thres=conf_thresh, iou_thres=iou_thresh) File "~/depthai-experiments/gen2-yolo/host-decoding/util/functions.py", line 29, in non_max_suppression xc = prediction[..., 4] > conf_thres # candidates IndexError: index 0 is out of bounds for dimension 1 with size 0
I wonder what I'm doing wrong or what I need to change?
I also tried other values instead of 4 in
xc = prediction[..., 4]
and got the same error.
I trained the NN with 640x640 image size. For now I really want to pass this error but my final goal is to be able to get the polygon masks that I used to label the data with for instance segmentation. I wonder if it is possible or not?
By the way, when I print the prediction.shape I gettorch.Size([1, 10647, 0]).
I can provide the blob if you want to test it yourself.