Object crossing a line


I’ve followed docs and watched the latest webinar etc but can’t figure out how to achieve this. What I’m trying to build is a relatively simple app that recognises objects and counts them as they cross a line, defined in app configuration. I got as far as processing 2 camera inputs using RTSP and applying object detection on them, based on the sample DeepStream apps. I’ve built the entire app in python already but we realised we’ll need realtime capability so we’re moving to DeepStream but I cannot find any reference or starting point that would help me get going with the development.

Any advice would be really useful.


How many models you have? What’s the models output ?

Hi ChrisDing, sorry I’m not sure I understand your question. What model do you mean?

What I mean is deeplearning traning model.

Ah sorry, I’m using the ResNet model for Jetson Nano. Happy to use a different model though if that makes life easier.


I think it should be a detection network.

You pipeline is easy for deepstream 4.0.
You can refer to test1 sample.

I appreciate your response and am glad you’re trying to help me out. But is there any chance you could be a bit more specific? The part that I’m struggling with is the detection of an object crossing a line. I understand that I should be able to retrieve the metadata from the tracker plugin (bounding box coordinates) in theory, and then use that to determine whether a given object passed it or not. Is there an existing plugin that could be used as a base for this or do I have to write one on my own? If I do have to write my own (as I haven’t done this before), any chance you could give me some pointers as to how to get started?

Appreciate your help!

Read documents. Read code.

That’s a great answer, thanks a lot man. Wow.

Any luck with this?