Skip to content

Commit

Permalink
Merge pull request #2 from achalddave/master
Browse files Browse the repository at this point in the history
Create combinations/ directory if it doesn't exist
  • Loading branch information
gsig committed Dec 19, 2017
2 parents 7517bdf + f7acbcd commit abad32c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion oracles/oraclesplot.py
Expand Up @@ -4,6 +4,8 @@
import sys
import math
import combine_submissions
import os
import os.path
sys.path.insert(0, '../tool/') # for charades evaluator
from charades import LocalizationEvaluator
from charades import ClassificationEvaluator
Expand Down Expand Up @@ -89,7 +91,10 @@ def make_data():
newdata[i].append(score)
else:
for sub in submission_files:
out = 'combinations/{}_{}.txt'.format(name(oracle['file']),name(sub))
output_dir = 'combinations'
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
out = '{}/{}_{}.txt'.format(output_dir, name(oracle['file']),name(sub))
combine_submissions.main(oracle['file'],sub,out)
print('Combination of {} and {} written to {}'.format(oracle['file'],sub,out))
score = mAP(out)
Expand Down

0 comments on commit abad32c

Please sign in to comment.