"Tracking error" in OpenCV TrackerMIL tracker when tracking many concurrently moving objects

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

On Google Chrome:

  • Create a dataset with several objects moving in frame
  • Load OpenCV and start tracking it with TrackerMIL as per docs
  • Repeat frame by frame
  • For each new tracked object add a TrackerMIL tracker and continue frame by frame
  • Error starts appearing from around 6 objects being tracked simultaneously (maybe it's my Chrome though, could happen later)
  • Also, already with a smaller number of objects, TrackerMIL gets buggy while an object is leaving the frame or some shapes start lagging behind their objects (this was also an issue in https://github.com/cvat-ai/cvat/pull/7399)

telegram-cloud-photo-size-2-5449446186269405091-y telegram-cloud-photo-size-2-5449446186269404791-y

Expected Behavior

No tracker lags and no 'Tracking errors' pop up

Possible Solution

No response

Context

No response

Environment

No response