def verify(filename): def results_fun(frame_data): results = 50*min(len(frame_data[0]),5) / 5.0 results -= 50*(max(len(frame_data[0]),5) - 5) results += 50*min(len(frame_data[1]),5) / 5.0 results -= 50*(max(len(frame_data[1]),5) - 5) results = max(results,0) return results utils.getresults(filename, errorstring, results_fun)
def verify(filename): def results_fun(frame_data): results = 50 * min(len(frame_data[0]), 5) / 5.0 results -= 50 * (max(len(frame_data[0]), 5) - 5) results += 50 * min(len(frame_data[1]), 5) / 5.0 results -= 50 * (max(len(frame_data[1]), 5) - 5) results = max(results, 0) return results utils.getresults(filename, errorstring, results_fun)
def verify(filename): def results_fun(frame_data): results = 0 if frame_data is not None: guitar = frame_data[0] if guitar["available"]: results += 60*len(guitar["locations"]["strings"])/float(NUM_STRINGS) results += 40*len(guitar["locations"]["frets"])/float(NUM_FRETS) return int(results) utils.getresults(filename, errorstring, results_fun)
def verify(filename): def results_fun(frame_data): results = 0 if frame_data is not None: guitar = frame_data[0] if guitar["available"]: results += 60 * len( guitar["locations"]["strings"]) / float(NUM_STRINGS) results += 40 * len( guitar["locations"]["frets"]) / float(NUM_FRETS) return int(results) utils.getresults(filename, errorstring, results_fun)
def verify(filename): def results_fun(frame_data): results = 100*int(len(frame_data[0]) == 4) return results utils.getresults(filename, errorstring, results_fun)