Skip to content

Commit

Permalink
chore: add evaluation result
Browse files Browse the repository at this point in the history
  • Loading branch information
nrhevu committed Oct 13, 2024
1 parent 9d85785 commit c5614d4
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,6 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

out/
# out/
data/
content-based-*.ipynb
6 changes: 6 additions & 0 deletions histogram_knn_eval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gc
import warnings
from time import time

Expand Down Expand Up @@ -153,4 +154,9 @@
"avg_indexing_time: ", avg_indexing_time,
"avg_retrieval_time: ", avg_retrieval_time,
)

# Cleanup
del cbir
del array_store
gc.collect()
eval.to_csv("out/histogram_knn_eval.csv", index=False)
11 changes: 11 additions & 0 deletions out/resnet_knn_gpu_eval.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
model,metric,map@1,map@5,map@10,hit_rate@1,hit_rate@5,hit_rate@10,avg_indexing_time,avg_retrieval_time
resnet18,euclidean,0.798635,0.745256,0.704573,0.798635,0.912628,0.939249,0.001167,0.001714
resnet18,cosine,0.830034,0.773788,0.73802,0.830034,0.931741,0.949488,0.001512,0.00385
resnet34,euclidean,0.838908,0.787577,0.750444,0.838908,0.931058,0.957679,0.001295,0.001853
resnet34,cosine,0.853925,0.813515,0.777884,0.853925,0.948123,0.967235,0.001321,0.00369
resnet50,euclidean,0.845051,0.786212,0.75058,0.845051,0.933106,0.957679,0.003602,0.006347
resnet50,cosine,0.864164,0.807918,0.775085,0.864164,0.942662,0.963823,0.003118,0.014355
resnet101,euclidean,0.867577,0.817201,0.783959,0.867577,0.948805,0.967918,0.003789,0.004908
resnet101,cosine,0.875085,0.838362,0.803891,0.875085,0.956997,0.970648,0.003773,0.014962
resnet152,euclidean,0.865529,0.80901,0.773379,0.865529,0.959044,0.972696,0.004443,0.005201
resnet152,cosine,0.881911,0.828259,0.797884,0.881911,0.965188,0.975427,0.005106,0.012254
31 changes: 31 additions & 0 deletions out/sift_eval.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
,k,type,metric,map@1,map@5,map@10,hit_rate@1,hit_rate@5,hit_rate@10,avg_indexing_time,avg_retrieval_time,fitting_time
0,32,tfidf,cosine 0.203413,0.164778,0.149898,0.203413,0.388396,0.482594,0.012015,0.005872,39.218171
1,32,tfidf,euclidean,0.203413,0.164778,0.149898,0.203413,0.388396,0.482594,0.013845,0.008116,39.218171
2,32,tfidf,manhattan,0.210922,0.165051,0.148942,0.210922,0.391809,0.491468,0.010756,0.016009,39.218171
3,32,bow,cosine,0.203413,0.164778,0.149898,0.203413,0.388396,0.482594,0.010984,0.005783,39.218171
4,32,bow,euclidean,0.203413,0.164778,0.149898,0.203413,0.388396,0.482594,0.013033,0.002493,39.218171
5,32,bow,manhattan,0.210922,0.165051,0.148942,0.210922,0.391809,0.491468,0.008344,0.002482,39.218171
6,64,tfidf,cosine,0.200683,0.168191,0.15215,0.200683,0.397952,0.500341,0.008405,0.00495,30.675927
7,64,tfidf,euclidean,0.200683,0.168191,0.15215,0.200683,0.397952,0.500341,0.008564,0.002555,30.675927
8,64,tfidf,manhattan,0.216382,0.172969,0.155358,0.216382,0.408191,0.515358,0.00861,0.002516,30.675927
9,64,bow,cosine,0.200683,0.168191,0.15215,0.200683,0.397952,0.500341,0.008593,0.005197,30.675927
10,64,bow,euclidean,0.200683,0.168191,0.15215,0.200683,0.397952,0.500341,0.008544,0.002587,30.675927
11,64,bow,manhattan,0.216382,0.172969,0.155358,0.216382,0.408191,0.515358,0.008531,0.00259,30.675927
12,96,tfidf,cosine,0.206826,0.164778,0.144232,0.206826,0.384983,0.498294,0.008435,0.006431,47.389109
13,96,tfidf,euclidean,0.206826,0.164778,0.144232,0.206826,0.384983,0.498294,0.010369,0.006314,47.389109
14,96,tfidf,manhattan,0.220478,0.177884,0.155631,0.220478,0.415017,0.523549,0.012404,0.007115,47.389109
15,96,bow,cosine,0.206826,0.164778,0.144232,0.206826,0.384983,0.498294,0.012995,0.006122,47.389109
16,96,bow,euclidean,0.206826,0.164778,0.144232,0.206826,0.384983,0.498294,0.013576,0.009111,47.389109
17,96,bow,manhattan,0.220478,0.177884,0.155631,0.220478,0.415017,0.523549,0.011367,0.0031,47.389109
18,128,tfidf,cosine,0.204778,0.167782,0.144642,0.204778,0.391809,0.481911,0.009457,0.005496,60.313378
19,128,tfidf,euclidean,0.204778,0.167782,0.144642,0.204778,0.391809,0.481911,0.009248,0.003268,60.313378
20,128,tfidf,manhattan,0.2157,0.174744,0.155563,0.2157,0.408874,0.507167,0.00955,0.003182,60.313378
21,128,bow,cosine,0.204778,0.167782,0.144642,0.204778,0.391809,0.481911,0.009386,0.005659,60.313378
22,128,bow,euclidean,0.204778,0.167782,0.144642,0.204778,0.391809,0.481911,0.009565,0.00324,60.313378
23,128,bow,manhattan,0.2157,0.174744,0.155563,0.2157,0.408874,0.507167,0.009611,0.00319,60.313378
24,256,tfidf,cosine,0.182935,0.149488,0.132491,0.182935,0.352901,0.463481,0.009773,0.006358,98.383649
25,256,tfidf,euclidean,0.182935,0.149488,0.132491,0.182935,0.352901,0.463481,0.009611,0.003448,98.383649
26,256,tfidf,manhattan,0.191126,0.15372,0.135768,0.191126,0.353584,0.449147,0.009583,0.003227,98.383649
27,256,bow,cosine,0.182935,0.149488,0.132491,0.182935,0.352901,0.463481,0.00957,0.006315,98.383649
28,256,bow,euclidean,0.182935,0.149488,0.132491,0.182935,0.352901,0.463481,0.00968,0.003421,98.383649
29,256,bow,manhattan,0.191126,0.15372,0.135768,0.191126,0.353584,0.449147,0.009712,0.003154,98.383649
6 changes: 6 additions & 0 deletions resnet_knn_gpu_eval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gc
import warnings
from time import time

Expand Down Expand Up @@ -149,4 +150,9 @@
"avg_indexing_time: ", avg_indexing_time,
"avg_retrieval_time: ", avg_retrieval_time,
)

# Cleanup
del cbir
del array_store
gc.collect()
eval.to_csv("out/resnet_knn_gpu_eval.csv", index=False)
9 changes: 8 additions & 1 deletion sift_knn_eval.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gc
import warnings
from time import time

Expand Down Expand Up @@ -148,6 +149,7 @@
{
"k": [k],
"type": [vector_type],
"metric" : [metric],
"map@1": [map1],
"map@5": [map5],
"map@10": [map10],
Expand All @@ -171,4 +173,9 @@
"avg_retrieval_time: ", avg_retrieval_time,
"fitting_time: ", fitting_time
)
eval.to_csv("out/sift_eval.csv")

# Cleanup
del cbir
del array_store
gc.collect()
eval.to_csv("out/sift_knn_eval.csv", index=False)

0 comments on commit c5614d4

Please sign in to comment.