This commit is contained in:
王庆刚
2024-11-04 18:06:52 +08:00
parent dfb2272a15
commit 5ecc1285d4
41 changed files with 2552 additions and 440 deletions

View File

@ -85,10 +85,8 @@ def have_tracked():
k = 0
gt = Profile()
for filename in os.listdir(trackdict):
# filename = 'test_20240402-173935_6920152400975_back_174037372.pkl'
# filename = '6907149227609_20240508-174733_back_returnGood_70f754088050_425_17327712807.pkl'
# filename = '6907149227609_20240508-174733_front_returnGood_70f754088050_425_17327712807.pkl'
filename = '153112511_0_seek_105.pkl'
file, ext = os.path.splitext(filename)
filepath = os.path.join(trackdict, filename)
TracksDict = np.load(filepath, allow_pickle=True)
@ -97,6 +95,9 @@ def have_tracked():
with gt:
if filename.find("front") >= 0:
vts = doFrontTracks(bboxes, TracksDict)
Intrude = vts.isintrude()
vts.classify()
save_subimgs(vts, file, TracksDict)
@ -113,6 +114,9 @@ def have_tracked():
else:
vts = doBackTracks(bboxes, TracksDict)
Intrude = vts.isintrude()
vts.classify()
alltracks.append(vts)
@ -124,9 +128,9 @@ def have_tracked():
cv2.imwrite(str(trackpath), img_tracking)
print(file+f" need time: {gt.dt:.2f}s")
# k += 1
# if k==1:
# break
k += 1
if k==1:
break
if len(alltracks):
drawFeatures(alltracks, save_dir)