last update in 2024

This commit is contained in:
王庆刚
2024-12-31 16:45:04 +08:00
parent dac3b3f2b6
commit 7e13e0f5b4
20 changed files with 1349 additions and 389 deletions

View File

@ -120,9 +120,7 @@ def pipeline(
save_dir_video = save_dir_event / Path(str(Path(vpath).stem))
if not save_dir_video.exists():
save_dir_video.mkdir(parents=True, exist_ok=True)
'''Yolo + Resnet + Tracker'''
optdict["source"] = vpath
@ -212,15 +210,7 @@ def pipeline(
trajpath = os.path.join(save_dir_event, "traj.png")
cv2.imwrite(trajpath, img_cat)
'''前后摄轨迹选择'''
if stdfeat_path is not None:
with open(stdfeat_path, 'rb') as f:
featDict = pickle.load(f)
def main_loop():
bcdpath = r"\\192.168.1.28\share\测试_202406\contrast\std_barcodes_2192"
@ -264,12 +254,12 @@ def main():
'''
函数pipeline(),遍历事件文件夹,选择类型 image 或 video,
'''
evtdir = r"\\192.168.1.28\share\测试视频数据以及日志\算法全流程测试\202412\images"
evtdir = r"D:\全实时\source_data\2024122416"
evtdir = Path(evtdir)
parmDict = {}
parmDict["savepath"] = r"D:\contrast\detect\pipeline"
parmDict["SourceType"] = "image" # video, image
parmDict["savepath"] = r"D:\全实时\result\pipeline"
parmDict["SourceType"] = "video" # video, image
parmDict["stdfeat_path"] = None
k = 0
@ -278,16 +268,16 @@ def main():
if item.is_dir():
# item = r"D:\exhibition\images\images2\images2"
parmDict["eventpath"] = item
pipeline(**parmDict)
# pipeline(**parmDict)
# try:
# pipeline(**parmDict)
# except Exception as e:
# errEvents.append(str(item))
try:
pipeline(**parmDict)
except Exception as e:
errEvents.append(str(item))
k+=1
if k==1:
break
# k+=1
# if k==1:
# break
errfile = os.path.join(parmDict["savepath"], f'error_events.txt')
with open(errfile, 'w', encoding='utf-8') as f: