Skip to content

Commit

Permalink
Merge branch 'master' of lorenz.ecn.purdue.edu:PhenoSorg/plant-locati…
Browse files Browse the repository at this point in the history
…on-cvpr2018
  • Loading branch information
Javi Ribera committed Nov 21, 2017
2 parents f2f14cd + 4b18016 commit 512e8a7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
21 changes: 21 additions & 0 deletions create_result_figures.py
Original file line number Diff line number Diff line change
@@ -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()
5 changes: 3 additions & 2 deletions generate_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -88,4 +90,3 @@
validate_df.to_csv('validate.csv')
shutil.move('validate.csv', 'validate')


0 comments on commit 512e8a7

Please sign in to comment.