-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yolov7 custom tiny model: X_LINK_ERROR | side values? | poor detection with OAK-D #28
Comments
Hi @ZucchiniAI , |
Hi @ZucchiniAI , are you using the latest version of depthai? We have tried the same process, and it crashes with old (2.16) depthai, but not with the newest depthai (2.17.4). |
Hello Erik,
What about my Point2? I see now that the objects are detected with good confidence but with much redundant bounding boxes (e.g. a couple for each object with different sizes, almost in the region of the ground truth) --> it seems to me the NMS does not work well. Could you please tell if the reason is my supposition (see Obs. in my question above) and how/where exactly shall I change the indicated sideX and sideY for my tiny model (1024x1024)? Thank you in advance! Marco |
Hi @ZucchiniAI , could you try with different IoU threshold setting? |
Hello Erik, I was trying as you suggested, but unfortunately the result do not convince me totally :-( a) a couple of time I got still the X_LINK_ERROR even if env with depthai 2.17.4 was activated .... what is the cause? (I have the USB-C to USB 3 port and the additional power connected): RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'rgb' (X_LINK_ERROR)' b) By changing the iou_threshold in the best.yaml in range 0.2 - 0.8 I saw some changes (0.2 being better, but not perfect) but anyhow the detections appear and disappear rapidly and in different positions: sometime is very clear that the object is detected twice even if the model before conversion detected one only. Sometime is difficult to say if is a double bounding box for the same object or intermittent small and large: is there a way to reduce the inference frequency (with my tiny yolo7 I get some 11 fps): c) sorry if I ask but again your hint in https://github.com/luxonis/depthai-experiments/tree/master/gen2-yolo/device-decoding is not clear to me: I have not changed the Json file of my model which is 1024x1024 as I do not understand WHERE I have to change the "side" entries: I have no side32 or side16 but many of them and all concerning the anchor masks. See above attached my json file from the blob conversion: shall I do change something? how and where exactly? Thank you! |
Hi @ZucchiniAI , Thanks, Erik |
Hi Erik, a) well it happens very often and just after minutes ... (I use a Ubuntu 20 and your original cables): Any way to have more precise log? Thanks! |
Hello,
I have converted a custom trained yolov7 tiny model (13 classes and mAP=0.75, 1024x1024) into a blob with http://tools.luxonis.com/
I have used the blob following the instruction of YoloV7_training.ipynb notebook from [depthai-ml-training] repo with a OAK-D camera (connected to USB3 with/or without additional power supply)
I have 2 issues:
1) after few seconds I get an error. Why?
Traceback (most recent call last):
File "main.py", line 51, in
pv.prepareFrames()
File "/home/mz/Projects/ObjectDetection/depthai/depthai_sdk/src/depthai_sdk/managers/preview_manager.py", line 148, in prepareFrames
packet = queue.tryGet()
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'color' (X_LINK_ERROR)'
2) before the error I see very few and bad detections even if the trained model gave very good results on the test set for static images (mAP~0.75). Why? Please see my Obs below: is that the reason?
Obs: The JSON note in https://github.com/luxonis/depthai-experiments/tree/master/gen2-yolo/device-decoding is not clear to me:
I have not changed the Json file of my model which is 1024x1024 as I do not understand WHERE I have to change the "side" entries: I have no side32 or side16 but many of them and all concerning the anchor masks. See attached my json file from the blob conversion: shall I do change something? how and where exactly? best.zip
Note: Values must match the values set in the CFG during training. If you use a different input width, you should also change side32 to sideX and side16 to sideY, where X = width/16 and Y = width/32. If you are using a non-tiny model, those values are width/8, width/16, and width/32.
Thank you in advance
Marco
The text was updated successfully, but these errors were encountered: