diff --git a/create_result_figures.py b/create_result_figures.py new file mode 100644 index 0000000..235efd9 --- /dev/null +++ b/create_result_figures.py @@ -0,0 +1,21 @@ +import numpy as np +import matplotlib as mpl +import matplotlib.pyplot as plt +import pandas as pd + +# Data extraction +data = pd.read_excel("/Users/dguera/Desktop/test.xlsx") +pr_crowd = data["Precision (crowd)"].as_matrix(range(len(data["Precision (crowd)"]))) +r_crowd = data["Recall (crowd)"].as_matrix(range(len(data["Recall (crowd)"]))) +r = data["r"].as_matrix(range(len(data["r"]))) + +# Create the figure for "Crowd" Dataset +fig, ax = plt.subplots() +precision = ax.plot(r, pr_crowd, 'r--',label='Precision') +recall = ax.plot(r, r_crowd, 'b:',label='Recall') +ax.legend() +ax.set_ylabel('Percentatge') +ax.set_xlabel(r'$r$ (in pixels)') +ax.grid(True) +fig.savefig('/Users/dguera/Desktop/plot.eps') +#plt.show() diff --git a/generate_csv.py b/generate_csv.py index bb4cce0..e047097 100644 --- a/generate_csv.py +++ b/generate_csv.py @@ -22,8 +22,10 @@ os.makedirs('validate') dirs = [i for i in range(1, 18)] +dirs.pop(11) -for dirnum in tqdm(dirs): +filecounter = 0 +for dirnum in dirs: dirname = 'dataset' + str(dirnum).zfill(2) fd = open(os.path.join(dirname,'gt.txt')) @@ -88,4 +90,3 @@ validate_df.to_csv('validate.csv') shutil.move('validate.csv', 'validate') -