Deepstream for multiple fixed ROI classification: architecture suggestion?

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) 4.4
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

We have an application that is to classify multiple ROIs in a video (CSI) input. These ROIs are user-configured. So they have fixed coordinates for a given camera, and the number of ROIs could be different for different cameras.

Here are some of our thoughts and love to have some guidance on the architecture or which example(s) to start with.

  1. Since the ROIs are given, it doesn’t need any detector. It seems to me that the easiest way to follow sample/deepstream_test2 to have a dummy detector and modify the ROIs with our given ROIs. Then the sgie can classify the multiple ROIs.

input → nvinfer [dummy detector] → nvinfer [classifier for multiple ROIS]

  1. Another option is remove the detetor, but tee the input video into a number of branches (one for each ROI), then nvvideoconvert to crop the frame into that ROI and then classify on this ROI. Obviously this is not efficient at all.

input → tee → nvvideoconvert [roi_1] → nvinfer [classifier for roi_1]
                    |–> nvvideoconvert [roi_2] → nvinfer [classifier for roi_2]

I guess my question is how to use a classifier directly on multiple ROIs.
Any input is highly appreciated!

I think option 1 is good.

Thanks a lot for the confirmation, Ke Song.