info = list(tvconfig_tb.find({'name': 'w5'}))[0] tvs = info['tvs'] tvs = tvs[3::5] print('tvlist\t', str(tvs)) def clean_tbs(): carinfo_tb.remove({}) obj_tb.remove({}) vis_tb.remove({}) rec_img_tb.remove({}) manager = Manager() def build_provider(): providers = [VideoProvider(i, tv) for i, tv in enumerate(tvs)] #providers = [VideoProvider(i, 'TV%d' %(57+i)) for i in range(7)] for i in providers: manager.add_provider(i) def carmatch_receiver(): for i, tv in enumerate(tvs): picpath = _carmatchsavepath + tv TVID = tv function = SaveCarInfo(i, picpath, TVID) function.span(0.3)
from core.service import Manager, LogReceiver from provider.objvideoprovider import VideoProvider from receiver.objreceiver_original import ObjDetecteReceiver import time import os from core.config import obj_freq, obj_tb #obj_tb.remove({}) manager = Manager() path = '../../assests/ObjVideo/' videos = os.listdir(path) videos.sort() videos = [path + video for video in videos] videos = videos[:1] print(videos) providers = [VideoProvider(0, videos[i]) for i in range(len(videos))] function2 = ObjDetecteReceiver(0, 'TV48') function2.span(obj_freq) for i in providers: manager.add_provider(i) manager.add_receiver(function2) manager.hold(True) input()