sort
sort copied to clipboard
Tracking id change with a gap
Hello! I have an issue tracking id of an object change with a gap at one frame id is 2 or 3 in the next frame new object assigned with id 12 13 any suggestion?
tracklets needs to wait [min_hits] frame before appearing. If you want to remove the gap, you need to reset id's of tracklet that die before min_hits !
@MaloM-CVision I was searching the way of reseting id's (Whic I use Sort with Coral Dev board's object detection demo) Sort is embeded app. Please let me know how to reset the tracking Id while detection and tracking running.
Id are defined l. 116 and incremented l. 117 :
self.id = KalmanBoxTracker.count KalmanBoxTracker.count += 1
you can try to decrement it when sort remove dead tracklet l. 249
@MaloM-CVision Thanks for quick reply. I have implemented bread counting (speed 1m/min [video] - means quite slow- (https://photos.app.goo.gl/3eXRtdsy7DWPcBZE6)) 1250x720:10 fpc usb web cam. Seams good but sometime object detection is not detecting one or two bread. for a sec. but dectecting at all while between counting area (two red line at wideo). At this time may getting new id numbers. and this makes double counting. Now I am searching way of implementation: Options: Increase camera quality or adjustment at Sort Api. What's your opinium? Here the code:
#Object detections max 50 results
objs = detect.get_objects(interpreter, args.threshold)[:args.top_k]
#Filtering the big or small sized detections.
objs = [obj for obj in objs \
if args.min_area <= obj.bbox.scale(1.0 / width, 1.0 / height).area <= args.max_area]
#Adding to the tracking object
detections = [] # np.array([])
for n in range(0, len(objs)):
element = [] # np.array([])
element.append(objs[n].bbox.xmin)
element.append(objs[n].bbox.ymin)
element.append(objs[n].bbox.xmax)
element.append(objs[n].bbox.ymax)
element.append(objs[n].score)
detections.append(element)
detections = np.array(detections)
trdata = []
trackerFlag = False
if detections.any():
if mot_tracker != None:
trdata = mot_tracker.update(detections)
trackerFlag = True
#draw the boxes with tracking data(trdata)
output = overlay(layout, objs, trdata, trackerFlag, args.axis, args.roi, inference_time )
else:
output = None
your detector should detect bread all the time, your detection problem is quite simple. for me the solution is to enhance your faster training. best, Malo
Le ven. 17 sept. 2021 à 11:20, Hakan Çetin @.***> a écrit :
@MaloM-CVision https://github.com/MaloM-CVision Thanks for quick reply. I have implemented bread counting (speed 1m/min [video] - means quite slow- (https://photos.app.goo.gl/3eXRtdsy7DWPcBZE6)) 1250x720:10 fpc usb web cam. Seams good but sometime object detection is not detecting one or two bread. for a sec. but dectecting at all while between counting area (two red line at wideo). At this time may getting new id numbers. and this makes double counting. Now I am searching way of implementation: Options: Increase camera quality or adjustment at Sort Api. What's your opinium? Here the code:
#Object detections max 50 results objs = detect.get_objects(interpreter, args.threshold)[:args.top_k] #Filtering the big or small sized detections. objs = [obj for obj in objs \ if args.min_area <= obj.bbox.scale(1.0 / width, 1.0 / height).area <= args.max_area] #Adding to the tracking object detections = [] # np.array([]) for n in range(0, len(objs)): element = [] # np.array([]) element.append(objs[n].bbox.xmin) element.append(objs[n].bbox.ymin) element.append(objs[n].bbox.xmax) element.append(objs[n].bbox.ymax) element.append(objs[n].score) detections.append(element) detections = np.array(detections) trdata = [] trackerFlag = False if detections.any(): if mot_tracker != None: trdata = mot_tracker.update(detections) trackerFlag = True #draw the boxes with tracking data(trdata) output = overlay(layout, objs, trdata, trackerFlag, args.axis, args.roi, inference_time ) else: output = None
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abewley/sort/issues/137#issuecomment-921644991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZDF57D46BAQDAIEJ2JYGLUCMB5JANCNFSM46FTUWWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Malo Morice Ingénieur IA R&D Calipro, 22400 Lamballe
-- *"Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l’expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion *ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'intégrité de ce message, nous déclinons toute responsabilité au titre de ce message, dans l’hypothèse où il aurait été modifié." * *
@MaloM-CVision, Sorry again disturbing. actually model is very fast. And I use Google Coral device. Lite Tensorflow model also optimized for Coral's fast detection options. I think I came to the end for this options. (When I trained more, getting overfitting problem). Now infrence time fast. Model seams quite good working. I can reduce more the detection threshold level (Now %30, ~I guess its quite low) Thinking now I have 2 options one is camera, another is adjusting with Sort Api.
yes, maybe camera, i can't tell because you recorded your screen but that can be an option.
Le ven. 17 sept. 2021 à 11:48, Hakan Çetin @.***> a écrit :
@MaloM-CVision https://github.com/MaloM-CVision, Sorry again disturbing. actually model is very fast. And I use Google Coral device. Lite Tensorflow model also optimized for Coral's fast detection options. I think I came to the end for this options. (When I trained more, getting overfitting problem). Now infrence time fast. Model seams quite good working. I can reduce more the detection threshold level (Now %30, ~I guess its quite low) Thinking now I have 2 options one is camera, another is adjusting with Sort Api.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abewley/sort/issues/137#issuecomment-921663087, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZDF54VKRSVXOA7XBSTFADUCMFFDANCNFSM46FTUWWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Malo Morice Ingénieur IA R&D Calipro, 22400 Lamballe
-- *"Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l’expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion *ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'intégrité de ce message, nous déclinons toute responsabilité au titre de ce message, dans l’hypothèse où il aurait été modifié." * *
@MaloM-CVision Thanks again for your effort. I think I can solve the problem with --max_age
argument in sort.py. (Means if not detect at next frame, kill the tracklet (default =1)