modify pipeline.py
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user