issue with DLC-LIVE

184 views
Skip to first unread message

Riccardo Schina

unread,
Mar 18, 2021, 7:12:25 AM3/18/21
to Bonsai Users
Hi,
I get the error message you can see in the attachment when I try to run my workflow.

I'm trying to analyze with a pre-trained Deeplabcut network a video stream from an IDS camera (which I configured through the IDS camera manager, and of which I can see the video through Bonsai, so no issues there).

From what I understand there is some OpenCV mismatch but I have no idea what should I change. 
Does someone have an idea?

Thanks
Capture.PNG

ania...@gmail.com

unread,
Mar 18, 2021, 7:33:22 AM3/18/21
to Bonsai Users
Hi!
I had a similar problem, try to insert a ConvertColor node with the conversion Gray2Bgr. From what I've been told by Goncalo, the issue is that for now the DetectPose requires color images as input (I guess it should be addressed in the future). 

I hope it will work for you.

Best,
Ania

Romain Ligneul

unread,
Mar 18, 2021, 7:50:50 AM3/18/21
to ania...@gmail.com, Bonsai Users
Yes, it is indeed a color issue and the ConvertColor should work.

The DetectPose node requires color channels because Deeplabcut DNNs do (it is not something which depends on Bonsai)


--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/0a8feb7c-43cd-4f95-8fd2-977cfae9d5a3n%40googlegroups.com.

Riccardo Schina

unread,
Mar 18, 2021, 1:51:00 PM3/18/21
to Bonsai Users
Thanks everyone, this solved the issue! 
Attaching a snapshot of how my workflow looks now, hope it can help someone else!
Capture2.PNG

João Frazão

unread,
Mar 18, 2021, 3:25:34 PM3/18/21
to Riccardo Schina, Bonsai Users
I may have pointed you wrong I think you just need the convert color: you can remove the grayscale node.

Riccardo Schina

unread,
Mar 19, 2021, 4:58:19 AM3/19/21
to Bonsai Users
Actually that does not work. I guess it is because the original camera stream is in color (see attachments) so I cannot use Gray2BGR if I don't use the grayscale node before the convertcolor..but I do not know which other conversion should I do. 
I tried without converting at all of course, but that does not work either. Even if I just try to record a video using ueye--image--videowriter  the resulting video is not playable.

I guess I should use a different streaming format from the camera, do you have a suggestion? 
Capture4.PNG
Capture3.PNG

João Frazão

unread,
Mar 19, 2021, 7:07:48 AM3/19/21
to Riccardo Schina, Bonsai Users
You may Try to get grayscale directly from camera them convert to RGB in bonsai, but it is the same thing,  just maybe less overhead on  usb and processor.

Reply all
Reply to author
Forward
0 new messages