deep_sort icon indicating copy to clipboard operation
deep_sort copied to clipboard

tracking feature

Open Phoebe-star opened this issue 6 years ago • 28 comments

HI if when t = 1, the deep sort detect the person A and save the feature of the person A , when t = 2, the deep sort detect unknown person ,it will use cnn to match the feature of the person A at t=1 and the feature of unknown person at t=2, if the result is ture (same person ) , the deep sort will save the feature of the person A at t=2 , and the feature of the person A at t=1 will forget , right??

thanks

Phoebe-star avatar Mar 04 '18 05:03 Phoebe-star

@Phoebe-star the feature of the person A at t=1 will not be forgotten. if the person at t=2 and t=1 is matched, feature at t=2 will be added to variable features in class Track and feature at t=1 is still there, which is implemented in update function of class Track as self.features.append(detection.feature)

animebing avatar Mar 05 '18 10:03 animebing

thanks~ so, if "the feature at t=1" and "the feature at t= 2" are same , but "the position of person at t=1" and "the position of person at t=2" are not same , the Deep Sort will let the person at t=1 and person at t=2 are different

Phoebe-star avatar Mar 07 '18 11:03 Phoebe-star

@Phoebe-star when a person is moving, the position can't be same and the feature at t=1 and t=2 can't be exactly same, they are just similar under a pre-defined threshold which indicates these two person are a same person(with a same id)

animebing avatar Mar 07 '18 11:03 animebing

sorry ~ my mean is "the position of person at t=1" and "the position of person at t=2" , are large distance ( like 200 pixel distance ) , because bounding box tracking fail. so even the features are same (for tracking success , it have already saved different view features ,like forward and back ) ,but the position are largely different , the Deep Sort will let the person at t=1 and person at t=2 are different , right? or it just similar under a pre-defined threshold which indicates these two person are a same person(with a same id)

Phoebe-star avatar Mar 07 '18 12:03 Phoebe-star

@Phoebe-star The tracking result is determined by both feature similarity and the bounding box similarity (such as distance or IOU) in deep_sort, so you can't decide whether they are a same person just by either one of them. And for a new object, in the first n_init frame, feature similarity is not used, just bounding box IOU is used to determine whether they are a same person, you can get the idea by reading the code.

animebing avatar Mar 07 '18 13:03 animebing

ok! thank you very much ~ but I have another problem In, generate_detections.py image in line 175, the tracking will get the "feature (dim 128) " and use the feature to compare cosine distance, if I design another cnn to exact the feature( dim 1024) , is it available for current code (generate_detections.py) ?

P.S. I take away the features of line175 , and add the code ,
like features = my_network(bgr_image, rows[:, 2:6].copy()) and the features is dim (batch , 1024) is the program still running? or it have to the features dim (batch, 128)

Phoebe-star avatar Mar 08 '18 01:03 Phoebe-star

@Phoebe-star The program still can run, because the feature dimension is not hard-coded in the tracking code

animebing avatar Mar 08 '18 02:03 animebing

thanks~

Phoebe-star avatar Mar 08 '18 10:03 Phoebe-star

why? for a new object, in the first n_init frame, feature similarity is not used. You mean first use IOU to determine whether they are a same person, if the IOU is small,then use cnn to get feature similarity.

If ,the person A is at the (10,20) of image , then she disappear in the next frame , and next frame she appear,but the person A is at the (600,500) of image. So the deep sort will let the person is not the same. Because it first use IOU, not feature.

Phoebe-star avatar Mar 19 '18 00:03 Phoebe-star

@Phoebe-star three things you need to consider

  1. in the deep sort code, there are 3 types of tracks: tentative, confirmed and deleted. For a new object, it is classified as tentative in the first n_init frames
  2. only the tracks which are classified as confirmed will use feature similarity, other tracks will use IOU similarity
  3. for a new object, if it can't be matched using IOU similarity in every frame of the first n_init frames, it will be classified as deleted

you can find all the things above in the paper and code

animebing avatar Mar 19 '18 02:03 animebing

do you know in the paper "SIMPLE ONLINE AND REALTIME TRACKING WITH A DEEP ASSOCIATION METRIC" listing1 image

after step 5 , I can not understand, QQ

Phoebe-star avatar Mar 21 '18 03:03 Phoebe-star

In line 5 the loop goes over all n=1 ... max_age. Inside the loop, line 6 matches measurements against all tracks with age n. Lines 8 and 9 remove the matched tracks and measurements from the set to be matched in future iterations. Thus, the code matches tracks to measurements, giving priority to tracks of with lower age (i.e., tracks that have been seen more frequently).

nwojke avatar Apr 12 '18 06:04 nwojke

thanks, do you know how to change the threshold for association admissible in the code? image is it the NearestNeighborDistanceMetric? matching_threshold, what does it mean?

Phoebe-star avatar May 03 '18 07:05 Phoebe-star

Sorry for the late reply. The threshold is here. Instead of changing the threshold you could also increase the motion model uncertainty of the Kalman filter here.

nwojke avatar Jun 12 '18 20:06 nwojke

How are track_id deleted when track are missing?

tungduongbk avatar Jun 19 '18 02:06 tungduongbk

the
image is "self._std_weight_position = 1. / 20" ?https://github.com/nwojke/deep_sort/blob/master/deep_sort/kalman_filter.py#L52

Phoebe-star avatar Jun 26 '18 03:06 Phoebe-star

@Phoebe-star the \lambda is set to 0 in the paper

animebing avatar Jun 26 '18 03:06 animebing

@tungduongbk When one track is missing, the state of this track is set to TrackState.Deleted, then this track won't be considered in following tracking process, but the track_id won't be deleted and it can't be used again.

animebing avatar Jun 26 '18 03:06 animebing

do you know the mean of the math ? "/" and " . " and "U" ,and so on image

Phoebe-star avatar Jun 26 '18 04:06 Phoebe-star

and do you know the code ? what is the S? I know it is a covariance image

Phoebe-star avatar Jun 29 '18 03:06 Phoebe-star

Sorry for the late reply. S is the covariance of the (predicted) track state, projected into measurement space. It is denoted as S_k on Wikipedia.

nwojke avatar Apr 30 '19 08:04 nwojke

Instead of IOU matching can we use feature similarity throughout the video. It may improve the accuracy of the system. Is it right?

why? for a new object, in the first n_init frame, feature similarity is not used. You mean first use IOU to determine whether they are a same person, if the IOU is small,then use cnn to get feature similarity.

If ,the person A is at the (10,20) of image , then she disappear in the next frame , and next frame she appear,but the person A is at the (600,500) of image. So the deep sort will let the person is not the same. Because it first use IOU, not feature.

jcthink avatar Dec 10 '19 04:12 jcthink

@Phoebe-star The tracking result is determined by both feature similarity and the bounding box similarity (such as distance or IOU) in deep_sort, so you can't decide whether they are a same person just by either one of them. And for a new object, in the first n_init frame, feature similarity is not used, just bounding box IOU is used to determine whether they are a same person, you can get the idea by reading the code.

how can we use only feature similarity from the start of the frame?

Asrix-AI avatar Dec 10 '19 05:12 Asrix-AI

currently i am facing the issue of id switching frequently when two persons cross each other. How can i improve the accuracy?


From: chutki [email protected] Sent: 10 December 2019 10:39 To: nwojke/deep_sort [email protected] Cc: Jini Cherian [email protected]; Comment [email protected] Subject: Re: [nwojke/deep_sort] tracking feature (#48)

@Phoebe-starhttps://github.com/Phoebe-star The tracking result is determined by both feature similarity and the bounding box similarity (such as distance or IOU) in deep_sort, so you can't decide whether they are a same person just by either one of them. And for a new object, in the first n_init frame, feature similarity is not used, just bounding box IOU is used to determine whether they are a same person, you can get the idea by reading the code.

how can we use only feature similarity from the start of the frame?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/nwojke/deep_sort/issues/48?email_source=notifications&email_token=AJWEPKFNLN33XOTUNTHMFPDQX4QAZA5CNFSM4ETM3AEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGNTMKQ#issuecomment-563820074, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJWEPKARCGHP3N6NO7HHVATQX4QAZANCNFSM4ETM3AEA.

jcthink avatar Dec 10 '19 05:12 jcthink

@Phoebe-star the \lambda is set to 0 in the paper

hi do you know where can I change the lambda in the code? Thanks.

qiumei1101 avatar Jun 13 '20 17:06 qiumei1101

HI I am having the following issues: 1.In deep sort tracker if a Person -A is assigned an id 1. The person then leaves the frame. After few second the Person-A re-enters again. The tracker assigns the same id 1 to the person A. Is this the right behavior of the tracker. If not how to handle this? 2.The other case person-A is assigned an id -1,He leaves the frame and nobody in the frame for a few seconds. Then a new person B enters after few seconds. The same id -1 is assigned to the person -B. How to resolve this issue? Thanks in advance

sowmiyadharmalingam86 avatar Mar 19 '21 07:03 sowmiyadharmalingam86

Hii @sowmiyadharmalingam86

I am using deepSort for the vehicle tracking. I am having the same issue as you described in point 2. How can we not repeat the track id. Can anyone has any idea where to change in the algorithm so that track id wont be repeated. Thank you.

rashmi-learning avatar Nov 29 '21 05:11 rashmi-learning

currently i am facing the issue of id switching frequently when two persons cross each other. How can i improve the accuracy? ________________________________ From: chutki [email protected] Sent: 10 December 2019 10:39 To: nwojke/deep_sort [email protected] Cc: Jini Cherian [email protected]; Comment [email protected] Subject: Re: [nwojke/deep_sort] tracking feature (#48) @Phoebe-starhttps://github.com/Phoebe-star The tracking result is determined by both feature similarity and the bounding box similarity (such as distance or IOU) in deep_sort, so you can't decide whether they are a same person just by either one of them. And for a new object, in the first n_init frame, feature similarity is not used, just bounding box IOU is used to determine whether they are a same person, you can get the idea by reading the code. how can we use only feature similarity from the start of the frame? — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#48?email_source=notifications&email_token=AJWEPKFNLN33XOTUNTHMFPDQX4QAZA5CNFSM4ETM3AEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGNTMKQ#issuecomment-563820074>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJWEPKARCGHP3N6NO7HHVATQX4QAZANCNFSM4ETM3AEA.

I'm facing this issue too, were you able to resolve this?

parvathikp avatar Apr 04 '23 06:04 parvathikp