def main(): name = sys.argv[1][sys.argv[1].rfind('/') + 1:] dest = './samples/' + utils.getMarksName(name) src = sys.argv[1] app = QApplication(sys.argv) sampler = Sampler(src, dest) sys.exit(app.exec_())
def main(): original = sys.argv[1] segmented = sys.argv[2] marksFolder = sys.argv[3] stats = sys.argv[4] # read each image errors = [] for f in os.listdir(original): img = segmented + f[:f.rfind('.')] + '.png' print('Processing image ' + img) marks = marksFolder + utils.getMarksName(f) err = utils.calculateError(stats, marks, img) if err != -1: print('\terror: ' + str(err)) errors.append(err) mean = numpy.mean(errors) std = numpy.std(errors) print('mean: ' + str(mean) + ' - std: ' + str(std)) print('Finished')