modify byte.trackerupdate, add list first_finded

This commit is contained in:
王庆刚
2024-05-25 18:35:53 +08:00
parent d6f3693d3f
commit dff029de20
17 changed files with 132 additions and 80 deletions

View File

@ -11,6 +11,7 @@ import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from utils.annotator import TrackAnnotator
from utils.plotting import colors
from pathlib import Path
def plot_frameID_y2(vts):
@ -88,14 +89,18 @@ def draw_all_trajectories(vts, edgeline, save_dir, filename):
# =============================================================================
# '''1. tracks 5点轨迹'''
# trackpth = save_dir.parent /Path("trajectory")/ Path(f"{file}")
# if not trackpth.exists():
# trackpth.mkdir(parents=True, exist_ok=True)
# for track in vts.tracks:
# if track.cls != 0:
# img = edgeline.copy()
# img = draw5points(track, img)
# pth = save_dir.joinpath(f"{file}_{track.tid}.png")
# cv2.imwrite(pth, img)
# # if track.cls != 0:
# img = edgeline.copy()
# img = draw5points(track, img)
#
# pth = trackpth.joinpath(f"{track.tid}.png")
# cv2.imwrite(str(pth), img)
#
# =============================================================================
'''2. all tracks 中心轨迹'''
img1, img2 = edgeline.copy(), edgeline.copy()