Does changing nvinfer.interval at runtime affect nvtracker (NvDCF) tracking quality afterward?

DeepStream 8.0. Pipeline: nvinfer (PGIE) → nvtracker (NvDCF) → nvdsanalytics (line-crossing).

We switch nvinfer’s interval property once during a running pipeline (from a large bypass value down to 0), then leave it at 0 for the rest of the stream. Compared to a control run where interval is 0 from the start and never touched, the run that had interval changed shows noticeably worse tracking for the rest of the stream — more tracker IDs created, shorter average track lifetime — even though both runs are configured identically afterward.

│ Case │native line-crossing count│distinct track IDs │median track lifetime │
│ interval always 0 │ ~9945 │ 13,278 │ 37 frames │
│ toggled MAX→0 once, early │ ~9820 │ 16,567 │ 19 frames │

Is changing interval at runtime known to affect nvtracker’s internal state in a lasting way? Is there anything needed to fully reset the tracker after doing this?

Please upgrade to the latest DeepStream 9.1. nvtracker will predict the object position if the PGIE skip the detection. It will cause nvtracker accuracy decrease if the PGIE interval is large. Why you need set large PGIE interval at the begin and change the interval later?

The reason we set a large interval at the beginning and only lower it later is that we’re implementing pause/resume of counting without restarting the pipeline (same live RTSP/camera source must keep streaming during the “paused” state). We followed the pattern from this thread, where interval=2147483647 at pause / interval=0 at resume was suggested as the way to do this without a pipeline restart:

Given what you confirmed (large interval degrades tracker accuracy afterward, since it’s just predicting without detection input), is that pattern actually not recommended? Is there a better-supported way to pause/resume inference on a live pipeline without a restart that doesn’t leave the tracker in a degraded state once inference resumes? Also, is this specific to nvtracker’s current implementation, or is it improved in 9.1?

Seems you need check nvdsanalytics for counting instead of change interval of nvinfer.

Thanks. Just to make sure I understand correctly — are you saying that adjusting nvinfer’s interval at runtime is itself what causes the tracking degradation (i.e. it’s not recommended to touch it dynamically at all), and that pausing/resuming should be done at the nvdsanalytics counting level instead?

If so, a couple of follow-up questions:

  1. Is there a way to pause/resume nvdsanalytics’s counting (e.g. via enable property or similar) without touching nvinfer or nvtracker at all?
  2. To be clear, I’m not looking to just pause nvdsanalytics’s counting while nvinfer/nvtracker keep running underneath — I want to pause the actual detection and tracking work itself (to save GPU during idle), without leaving the tracker degraded once it resumes. Is that possible?

nvtracker will keep history of tracklets. You can have a try with tracking-id-reset-mode in: Gst-nvtracker — DeepStream documentation when app resume to track from “Paused” state.

We implemented your suggestion exactly (tracking-id-reset-mode=3 + GST_NVEVENT_STREAM_RESET sent via pyds.gst_element_send_nvevent_new_stream_reset at resume) — ran without errors. The result is identical to before this change.

We traced why: in our test, the “frozen” period (large interval) happens before any object ever appears in the scene — so at the moment we send STREAM_RESET, nvtracker has zero active tracks to terminate (confirmed via per-frame tracking logs: 0 tracks exist before that point). So tracking-id-reset-mode’s “terminate existing trackers” action is structurally a no-op here.

Yet we still see a persistent, reproducible gap for the rest of the stream afterward (vs. a control where interval is never touched): fewer native line-crossing detections, ~25% more distinct track IDs, about half the median track lifetime. Since there’s no pre-existing tracklet state at the moment of reset, what else could explain a lasting tracking-quality difference that starts exactly when interval transitions from a bypass value down to 0, and persists afterward even though both configurations are identical from that point onward?

Changing visualTrackerType from 2 to 0 eliminates the difference caused by changing the interval.

What should we change in the tracker to avoid this issue when using visualTrackerType=2?

Can you have a try with below:

  1. Keep visual tracking, drop VPI.
    Try visualTrackerType: 1 Type 2 is Alpha; type 1 is the mature DCF path.

  2. Probe between nvinfer and nvtracker during the pause and set frame_meta->bInferDone = TRUE on skipped frames.

Finally, we can have a try GST_NVEVENT_NVTRACKER_CONFIG_UPDATE to update the nvtracker config dynamically to workaround the issue. Set visualTrackerType to 0 during “PAUSED” state and set to ‘2’ during running state.