예제 #1
0
def main():
	config = parse_config()
	title = config.get('project', 'title')
	try:
		topk = config.getint('data', 'topk')
	except ValueError as e:
		topk = None

	db_result = fetch_annos(title)
	images = refine(db_result)
	output_filename = name_as_datetime(os.path.join(DATA_DIR,'triplelens'))
	with open(output_filename, 'w') as f:
		for image_set in images:
			track_list = cluster_by_frames(image_set, topk=topk)
			format_output(track_list, f)
예제 #2
0
def main():
	config = parse_config()
	title = config.get('project', 'title')
	data = config.get('project', 'data').decode(settings.DEFAULE_DECODING)
	recipients = config.get('project', 'email')

	db_result = fetch_annos(title)
	refine_result = refine(db_result)
	for dirname in os.listdir(data):
		path = os.path.join(data, dirname)
		if os.path.isdir(path):
			process(path, refine_result)

	if recipients:
		NotifyMailSender(recipients).notify(title)
예제 #3
0
def main():
	config = parse_config()
	title = config.get('project', 'title')
	data = config.get('project', 'data').decode(settings.DEFAULT_DECODING)
	img_path = config.get('product', 'image').decode(settings.DEFAULT_DECODING)
	anno_path = config.get('product', 'anno').decode(settings.DEFAULT_DECODING)

	product_path = os.path.join(DATA_DIR, 'cards', title.decode(settings.DEFAULT_DECODING))
	img_path = os.path.join(product_path, img_path)
	if not os.path.exists(img_path):
		os.makedirs(img_path)
	anno_path = os.path.join(product_path, anno_path)
	if not os.path.exists(anno_path):
		os.makedirs(anno_path)
	
	# db_result = fetch_annos(title, check=False)
	db_result = import_static("/Users/imac/Downloads/769images.txt")
	process(db_result, data, img_path, anno_path)