Compare commits
1
Commits
main
...
fix-merged-bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
657f4f80d9 |
No files matched your search
@@ -441,6 +441,7 @@ class ByteTracker:
|
|||||||
cost_mat = 1.0 - iou_mat
|
cost_mat = 1.0 - iou_mat
|
||||||
matches = _greedy_match(cost_mat, threshold=1.0 - self.match_thresh)
|
matches = _greedy_match(cost_mat, threshold=1.0 - self.match_thresh)
|
||||||
|
|
||||||
|
matched_det_idx = set()
|
||||||
for di, ti in matches:
|
for di, ti in matches:
|
||||||
det_global = int(high_idx[di])
|
det_global = int(high_idx[di])
|
||||||
orig_idx = int(remain_orig_idx[det_global])
|
orig_idx = int(remain_orig_idx[det_global])
|
||||||
@@ -450,6 +451,30 @@ class ByteTracker:
|
|||||||
det_to_track[orig_idx] = track_pool[ti].track_id
|
det_to_track[orig_idx] = track_pool[ti].track_id
|
||||||
tracked_map[track_pool[ti].track_id] = (track_pool[ti].get_cx(), track_pool[ti].get_cy())
|
tracked_map[track_pool[ti].track_id] = (track_pool[ti].get_cx(), track_pool[ti].get_cy())
|
||||||
match_pairs_high.append((det_global, ti))
|
match_pairs_high.append((det_global, ti))
|
||||||
|
matched_det_idx.add(di)
|
||||||
|
|
||||||
|
# --- second pass: any unmatched high-score detection tries to
|
||||||
|
# pair with ANY track that overlaps above threshold, even one
|
||||||
|
# that already has a match. This prevents a close/overlapping
|
||||||
|
# object from spawning a spurious new ID when the greedy 1:1
|
||||||
|
# match paired its detection elsewhere. ---
|
||||||
|
for di in range(len(high_dets)):
|
||||||
|
if di in matched_det_idx:
|
||||||
|
continue
|
||||||
|
best_ti = None
|
||||||
|
best_iou = 0.0
|
||||||
|
for ti in range(num_tracks):
|
||||||
|
if iou_mat[di, ti] > best_iou and iou_mat[di, ti] >= self.match_thresh:
|
||||||
|
best_iou = iou_mat[di, ti]
|
||||||
|
best_ti = ti
|
||||||
|
if best_ti is not None:
|
||||||
|
det_global = int(high_idx[di])
|
||||||
|
orig_idx = int(remain_orig_idx[det_global])
|
||||||
|
track_pool[best_ti].update(dets[det_global])
|
||||||
|
track_pool[best_ti].hit_streak = max(1, track_pool[best_ti].hit_streak)
|
||||||
|
matched_track_idx.add(best_ti)
|
||||||
|
det_to_track[orig_idx] = track_pool[best_ti].track_id
|
||||||
|
tracked_map[track_pool[best_ti].track_id] = (track_pool[best_ti].get_cx(), track_pool[best_ti].get_cy())
|
||||||
|
|
||||||
unmatched_tracks = [
|
unmatched_tracks = [
|
||||||
t for t in range(num_tracks) if t not in matched_track_idx
|
t for t in range(num_tracks) if t not in matched_track_idx
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Jul 14 22:15:51 frigate-karung-masuk-tuang-dev python[2390681]: , 5806, 5808, 5809, 5810, 5811, 5812, 5813, 5814, 5815, 5816, 5817, 5818, 5819, 5820, 5821, 5822, 5824, 5825, 5826, 5827, 5828, 5829, 5830, 5831, 5832, 5833, 5834, 5835, 5837, 5838, 5839, 5840, 5843, 5844, 5845, 5846, 5847, 5848, 5849, 5854, 5855, 5856, 5857, 5858, 5860, 5861, 5862, 5863, 5864, 5865, 5866, 5867, 5868, 5870, 5871, 5872, 5873, 5874, 5876, 5877, 5878, 5879, 5880, 5881, 5882, 5883, 5884, 5885, 5886, 5887, 5888, 5889, 5892, 5893, 5894, 5895, 5896, 5897, 5899, 5900, 5901, 5902, 5903, 5904, 5907, 5908, 5909, 5910, 5911, 5912, 5913, 5914, 5915, 5916, 5917, 5918, 5919, 5920, 5921, 5922, 5923, 5925, 5926, 5927, 5928, 5929, 5930, 5931, 5932, 5935, 5936, 5937, 5938, 5939, 5942, 5943, 5944, 5945, 5946, 5947, 5948, 5949, 5950, 5951, 5953, 5954, 5955, 5956, 5957, 5958, 5959, 5961, 5962, 5963, 5964, 5965, 5966, 5967, 5968, 5969, 5970, 5971, 5972, 5974, 5975, 5976, 5977, 5978, 5979, 5980, 5982, 5983, 5985, 5986, 5987, 5988, 5989, 5990, 5991, 5992, 5993, 5995, 5996, 5997, 5998, 5999, 6000, 6001, 6002, 6003, 6004, 6005, 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6020, 6021, 6022, 6023, 6024, 6025, 6026, 6030, 6031, 6032, 6033, 6034, 6035, 6036, 6037, 6038, 6042, 6043, 6044, 6045, 6046, 6047, 6048, 6050, 6051, 6052, 6056, 6057, 6058, 6059, 6060, 6061, 6062, 6063, 6064, 6065, 6068, 6069, 6070, 6071, 6072, 6073, 6074, 6075, 6076, 6080, 6081, 6082, 6083, 6084, 6085, 6087, 6088, 6089, 6090, 6091, 6092, 6093, 6094, 6095, 6096, 6097, 6098, 6099, 6100, 6102, 6103, 6104, 6105, 6106, 6107, 6108, 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6122, 6123, 6124, 6131, 6132, 6133, 6134, 6135, 6136, 6137, 6138, 6139, 6140, 6141, 6142, 6143, 6144, 6145, 6146, 6147, 6148, 6149, 6150, 6151, 6152, 6154, 6155, 6156, 6157, 6158, 6159, 6160, 6161, 6162, 6163, 6164, 6165, 6166, 6168, 6169, 6170, 6171, 6172, 6173, 6175, 6176, 6177, 6178, 6179, 6180, 6181, 6183, 6184, 6185, 6186, 6190, 6191, 6192, 6193, 6194, 6195, 6196, 6197, 6198, 6199, 6200, 6201, 6202, 6203, 6204, 6205, 6206, 6207, 6208, 6209, 6210, 6212, 6213, 6214, 6215, 6216, 6217, 6218, 6219, 6220, 6227, 6228, 6229, 6230, 6231, 6232, 6233, 6234, 6235, 6236, 6237, 6239, 6240, 6241, 6242, 6243, 6244, 6245, 6246, 6247, 6250, 6251, 6252, 6253, 6254, 6255, 6256, 6257, 6258, 6259, 6260, 6261, 6267, 6268, 6269, 6270, 6271, 6272, 6273, 6274, 6275, 6276, 6277, 6278, 6280, 6281, 6282, 6283, 6284, 6285, 6286, 6287, 6288, 6290, 6291, 6292, 6293, 6294, 6295, 6296, 6297, 6298, 6303, 6304, 6305, 6306, 6307, 6308, 6309, 6310, 6311, 6312, 6313, 6314, 6315, 6316, 6317, 6318, 6319, 6320, 6321, 6322, 6323, 6324, 6325, 6327, 6328, 6329, 6330, 6331, 6332, 6333, 6334, 6335, 6336, 6338, 6339, 6340, 6341, 6342, 6344, 6345, 6346, 6347, 6348, 6349, 6350, 6351, 6352, 6353, 6355, 6356, 6357, 6358, 6359, 6360, 6361, 6366, 6367, 6368, 6369, 6370, 6371, 6372, 6373, 6374, 6375, 6376, 6377, 6378, 6379, 6380, 6381, 6382, 6383, 6384, 6385, 6386, 6387, 6388, 6389, 6390, 6391, 6392, 6393, 6394, 6395, 6396, 6397, 6398, 6401, 6402, 6403, 6404, 6405, 6406, 6407, 6408, 6409, 6410, 6411, 6412, 6415, 6416, 6417, 6418, 6419, 6420, 6421, 6422, 6428, 6429, 6430, 6431, 6440, 6441, 6442, 6443, 6444, 6445, 6446, 6447, 6450, 6451, 6452, 6453, 6454, 6455, 6456, 6457, 6458, 6459, 6460, 6461, 6464, 6465, 6466, 6467, 6468, 6469, 6470, 6471, 6472, 6475, 6476, 6477, 6478, 6479, 6480, 6481, 6482, 6483, 6484, 6485, 6486, 6487, 6488, 6489, 6490, 6491, 6492, 6493, 6494, 6495, 6496, 6498, 6499, 6500, 6502, 6503, 6504, 6505, 6506, 6507, 6508, 6509, 6510, 6511, 6512, 6513, 6514, 6515, 6516, 6517, 6518, 6519, 6520, 6521, 6522, 6523, 6528, 6529, 6530, 6531, 6532, 6533, 6534, 6535, 6538, 6539, 6540, 6541, 6542, 6546, 6547, 6548, 6549, 6550, 6551, 6552, 6553, 6554, 6555, 6556, 6557, 6558, 6559, 6560, 6561, 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6570, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6580, 6581, 6582, 6583, 6584, 6585, 6586, 6587, 6588, 6589, 6590, 6591, 6592, 6593, 6594, 6595, 6596, 6597, 6598, 6599, 6600, 6601, 6602, 6603, 6605, 6606, 6607, 6608, 6609, 6610, 6611, 6614, 6615, 6616, 6617, 6619, 6620, 6621, 6622, 6623, 6624, 6625, 6626, 6627, 6628, 6630, 6631, 6632, 6633, 6634, 6636, 6642, 6643, 6644, 6645, 6646, 6647, 6648, 6649, 6650, 6652, 6653, 6654, 6655, 6656, 6657, 6658, 6659, 6660, 6661, 6662, 6663, 6664, 6668, 6669, 6670, 6671, 6672, 6673, 6674, 6676, 6677, 6678, 6679, 6680, 6681, 6682, 6683, 6684, 6685, 6686, 6687, 6688, 6694, 6695, 6696, 6697, 6698, 6699, 6700, 6701, 6702, 6703, 6704, 6705, 6706, 6707, 6708, 6709, 6710, 6711, 6712, 6713, 6714, 6722, 6723, 6724, 6725, 6726, 6727, 6728, 6729, 6730, 6731, 6732, 6733, 6738, 6739, 6740, 6741, 6742, 6743, 6744, 6745, 6746, 6747, 6748, 6749, 6750, 6754, 6755, 6756, 6757, 6758, 6759, 6760, 6761, 6762, 6763, 6764, 6765, 6766, 6767, 6768, 6769, 6772, 6773, 6774, 6777, 6778, 6779, 6780, 6781, 6782, 6788, 6789, 6790, 6791, 6792, 6793, 6794, 6795, 6797, 6798, 6799, 6800, 6801, 6802, 6803, 6804, 6805, 6806, 6Line truncated
|
||||||
Reference in new issue
Block a user