Example #1
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)
Example #2
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)