def handle(self, *args, **options): init = db_initializer(options['dir']) if options['type'] == 'voc': print('Computing BoW Vocabulary') init.compute_voc(options['limit']) self.stdout.write("Finish Compute BoW Vocabulary\n", ending='') elif options['type'] == 'hist': print('Computing Histogram') init.compute_hist() self.stdout.write("Finish Compute Histogram\n", ending='') else: self.stderr.write("Error Input Argument\n", ending='')
def handle(self, *args, **options): init = db_initializer(options["dir"]) if options["type"] == "voc": print("Computing BoW Vocabulary") init.compute_voc(options["limit"]) self.stdout.write("Finish Compute BoW Vocabulary\n", ending="") elif options["type"] == "hist": print("Computing Histogram") init.compute_hist() self.stdout.write("Finish Compute Histogram\n", ending="") else: self.stderr.write("Error Input Argument\n", ending="")
def handle(self, *args, **options): init = db_initializer(options['dir']) print('Images save to ', os.path.join(options['dir'])) init.getimages() self.stdout.write("Finish Download\n", ending='')