How make inference with Basler camera

Hello,

I am trying make inference with a Basler acA5472-17UC using the examples of this repository
https://github.com/dusty-nv/jetson-inference

Moreover, i have installed all the required drivers from pypylon repsitory and the camera works ok
https://github.com/basler/pypylon

I just need make inference with pretrained models using the basler but i don’t know how get it. Could someone share with me how to get it?

Hi,

Jetson-inference use GStreamer for the camera input.
Would you mind to check if your camera can be opened with GStreamer first?

We found several GStreamer plugin for basler.
But we don’t have a basler camera to verify on our side.

Thanks.

You can use https://gitlab.com/zingmars/gst-pylonsrc.git and adopt deepstream-test2 example for this one.

I have been trying both solution but i think i am not understanding what should I do.
I can use the examples of pypylon repository like this

https://github.com/basler/pypylon/blob/master/samples/opencv.py

And the basler works fine. The problem is the format of the image because jetson-inference expect RGBA images in a ppycapsule format and then, when I want reverse the process the image is printed in white color.

It would ne great if i can make inference with camera = jetson.utils.gstCamera(1280, 720, “/dev/video0”) or something like that but it do nothing and It’s crashing my jetson.
I can see my basler camera with lsusb but it doesn’t appear with v4l2-ctl --list-formats-ext.
In fact with this last comand i can see

Index       : 0
	Type        : Video Capture
	Pixel Format: 'BG10'
	Name        : 10-bit Bayer BGBG/GRGR
		Size: Discrete 2592x1944
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 2592x1458
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.008s (120.000 fps)

which make me think this is the wecam integrated on my jetson

Finally I solved the problem

https://github.com/mjack3/jetson-inference/blob/master/detectnet-basler3.py

Anyway i would like know whether exist a way of make it works with something silimar to

camera = jetson.utils.gstCamera(1280, 720, "/dev/video0")

I think this is the best way

Hi camprosromeromiguel, unless Basler camera provides V4L2 interface (e.g. /dev/video* device), I don’t think it’s possible. The Basler cameras seemed to be accessed through the Pylon library they use.