run_reconstruction(**kwargs) pathToFrames = os.path.join(kwargs['output_folder'], 'reconstruction') #%% Now take those frames and put them in the right place ... #%% Import frames from bimvee.importAe import importAe containerFrames = importAe(filePathOrName=pathToFrames) #%% You may like to check that the container looks correct from bimvee.info import info info(containerFrames) #%% You may like to visualise the container - Start Mustard cwd = os.getcwd() import threading import mustard app = mustard.Mustard() thread = threading.Thread(target=app.run) thread.daemon = True thread.start() #%% Once mustard is open, undo the change of working directory os.chdir(cwd)
filePathOrName = os.path.join(prefix, 'data', '2020_09_30_Aiko_KitchenVicon', '2020-09-30_calib01') filePathOrName = os.path.join(prefix, 'data', '2020_10_08_AikoSim_KitchenVicon', '2020-10-08_calib00') containerEvents = importAe( filePathOrName=os.path.join(filePathOrName, 'StEFI')) #%% from bimvee.info import info info(containerEvents) #%% Run reconstruction from rpg_e2vid.run_reconstruction import run_reconstruction exportFilePathOrName = os.path.join(filePathOrName, 'frames') kwargs = {} kwargs['input_file'] = filePathOrName = os.path.join(filePathOrName, 'StEFI') kwargs['path_to_model'] = os.path.join( prefix, 'repos/rpg_e2vid/pretrained/E2VID_lightweight.pth.tar') kwargs['output_folder'] = exportFilePathOrName kwargs['auto_hdr'] = True kwargs['display'] = True kwargs['show_events'] = True
''' from bimvee.timestamps import rezeroTimestampsForImportedDicts containers = [containerEvents, containerVicon] rezeroTimestampsForImportedDicts(containers) #%% Combine containers container = containerVicon container['data'].update(containerFrames['data']) # Now that we've used event data for time alignment, we don't need it any more, # so we don't merge in containerEvents # Check that the container looks correct from bimvee.info import info info(container) #%% Visualise the container - Start Mustard cwd = os.getcwd() import threading import mustard app = mustard.Mustard() thread = threading.Thread(target=app.run) thread.daemon = True thread.start() #%% Once mustard is open, undo the change of working directory os.chdir(cwd)
import argparse #### Argument Parsing #### parser = argparse.ArgumentParser( description='To convert into yarp-readable data') parser.add_argument( '--data', type=str, default= '/home/aniket/event-driven-gaze-tracking/Data/Raw_Data/out_2020-10-29_13-46-33.raw', help='path to the raw event-data') args = parser.parse_args() # import matplotlib.pyplot as plt from bimvee.importAe import importAe from bimvee.exportIitYarp import exportIitYarp from bimvee.info import info PATH = os.path.abspath(os.getcwd()) file_path = os.path.join(PATH, args.data) outPath = os.path.join(PATH, "yarp_out") container1 = importAe(filePathOrName=file_path, zeroTime=True) info(container1) exportIitYarp(container1, exportFilePath=os.path.join(outPath, "batch05"), pathForPlayback=os.path.join(outPath, "batch05")) print('Done!')