modify pipeline.py

This commit is contained in:
王庆刚
2025-01-13 17:35:15 +08:00
parent 3d13b0d9c5
commit a50f777839
12 changed files with 322 additions and 211 deletions

View File

@ -76,7 +76,7 @@ def array2list(bboxes):
class ShoppingEvent:
def __init__(self, eventpath, stype="data"):
'''stype: str, 'source', 'data', '''
'''stype: str, 'source', 'data', 'realtime', 共三种 '''
self.eventpath = eventpath
self.evtname = str(Path(eventpath).stem)
@ -167,20 +167,22 @@ class ShoppingEvent:
def from_source_pkl(self, eventpath):
with open(eventpath, 'rb') as f:
ShoppingDict = pickle.load(f)
self.eventpath = ShoppingDict["eventPath"]
self.evtname = ShoppingDict["eventName"]
self.barcode = ShoppingDict["barcode"]
if len(ShoppingDict["one2n"]):
self.one2n = ShoppingDict["one2n"]
'''=========== path of image and video =========== '''
self.back_videopath = ShoppingDict["backCamera"]["videoPath"]
self.front_videopath = ShoppingDict["frontCamera"]["videoPath"]
self.back_imgpaths = ShoppingDict["backCamera"]["imagePaths"]
self.front_imgpaths = ShoppingDict["frontCamera"]["imagePaths"]
'''===========对应于 0/1_track.data ============================='''
backdata, back_outdata = self.kerndata(ShoppingDict, "backCamera")