Skip to content

Commit

Permalink
final submission
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-sayed-mahdy committed Jan 19, 2021
1 parent 3b4b6e2 commit 39fe272
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ or you can use conda to create a virtual environment and install packages using
data/001/3/2.png
data/001/test.png
and so on...
3- run: python src/main.py
4- check results at results.txt and timing at time.txt
3- run: `python src/main.py`
4- check results at `results.txt` and timing at `time.txt`
20 changes: 10 additions & 10 deletions results.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
2
3
3
3
3
3
3
3
3
3
1
1
1
1
3
1
1
1
1
1
24 changes: 13 additions & 11 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
# evaluations.eval_perfomance_lbph_svm(MODE, VERBOSE)
# evaluations.eval_ada()
# evaluations.eval_pca(VERBOSE)
# while True:
# evaluations.seperable()

# evaluations.final_eval()

VERBOSE = False
MODE = 'deliver'
data_path = 'data/'
Expand All @@ -23,15 +22,18 @@
if os.path.exists('time.txt'):
os.remove('time.txt')

results_file = open('results.txt',"a+")
time_file = open('time.txt',"a+")

for test_folder in test_folders:
res,time = pipeline.pipe(feature='cslbcop', clf='svm',_verbose=VERBOSE, _mode=MODE, test_folder=test_folder)
time = "{:.2f}".format(time)
results_file.write(str(res))
results_file.write('\n')
results_file.flush()
time_file.write(str(time))
time_file.write('\n')
time_file.flush()

f = open('results.txt',"a+")
f.write(str(res))
f.write('\n')
f.close()
f = open('time.txt',"a+")
f.write(str(time))
f.write('\n')
f.close()
results_file.close()
time_file.close()
4 changes: 2 additions & 2 deletions src/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def step_1(images, VERBOSE=False, test_label=None, feat = 'cslbcop'):
coeffs = features.waveletTransform(img,'db4')
cA ,(cH,cV,cD) = coeffs

hist_of_line = []
hist_of_line = None
if feat == 'cslbcop':
hist_of_line = features.CSLBCoP(cA)
elif feat == 'lpbh':
elif feat == 'lbph':
hist_of_line = features.LPBH(cA,1,8)

#hist_of_line_horizontal = features.LPBH(cH,1,8)
Expand Down
16 changes: 8 additions & 8 deletions time.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
2.74
2.11
1.94
2.10
1.95
1.89
1.66
1.90
2.00
2.08
2.17
2.00
1.87
2.11
2.33
1.98
2.29
2.21

0 comments on commit 39fe272

Please sign in to comment.