bochinski / iou-tracker

Python implementation of the IOU Tracker
http://www.nue.tu-berlin.de
MIT License
691 stars 174 forks source link

could you modified your code for tracking on next frame while not all frames? #19

Open eeric opened 3 years ago

eeric commented 3 years ago

thanks

tkamkb commented 3 years ago

Hi eeric! I may have the same question with you. Is this iou-tracker code tracks frame by frame? I feel it does iou tracking by loading all frames detections.

tkamkb commented 3 years ago

My solution is loading my detection result every "mint" frames, then get tracks of "mint" frames.

load_dection = []
mint = 2 
  while(True):
     # read a frame
     id = 0
     for c in contours:
        (x, y, w, h) = cv2.boundingRect(c)  
         load_dection = np.concatenate((load_dection, np.array([[cap.get(cv2.CAP_PROP_POS_FRAMES), id, x, y, w, h, 1]])), axis = 0)
         id += 1
    minT += 1
    if minT == mint: 
        detections = load_mot(load_dection, nms_overlap_thresh=None, with_classes=False)
        tracks = track_iou(detections, 0, 0.5, 0.5, mint)
        load_dection = []
        minT = 0
DataXujing commented 3 years ago

I have the same question too!!!

Chainesh commented 1 year ago

@DataXujing @tkamkb any lead on this?