def main(args): if not args.dataset_augmented: # Only for BIPED dataset # dm.augment_data(args) print("Please visit the webpage of BIPED in:") print("https://xavysp.github.io/MBIPED/") print("and run the code") sys.exit() if args.model_state == 'train' or args.model_state == 'test': sess = get_session(args.gpu_limit) # sess =tf.Session() else: print("The model state is None, so it will exit...") sys.exit() if args.model_state == 'train': trainer = m_trainer(args) trainer.setup() trainer.run(sess) sess.close() if args.model_state == 'test': if args.test_dataset == "BIPED": if args.image_width > 700: pass else: print(' image size is not setted in non augmented data') sys.exit() tester = m_tester(args) tester.setup(sess) #Dexi Start Time #startDexi = time.time() tester.run(sess) #Dexi End Time #endDexi = time.time() #secondsDexi = endDexi - startDexi #print("Time taken for DexiNED: "+ str(secondsDexi) + " seconds.") if args.model_state == "None": print("Sorry the model state is {}".format(args.model_state)) sys.exit()
def getEdge(args): sess = get_session(args.gpu_limit) tester = m_tester(args) tester.setup(sess) tester.run(sess)