Research Article

Large-Scale Coarse-to-Fine Object Retrieval Ontology and Deep Local Multitask Learning

Algorithm 3

Query expansion for image retrieval.
Procedure: QUERY_EXPANSION
Input:
inputImgFeat: query image features
startRetrievedImgFeatList: retrieved image feature list
k: the number of retrieved images
numOfExpansion: the number of query expansion applying times. Even though retrieval performance is better, it will have a trade-off with retrieval time. Recommended value: 3.
Output:
finalRetrievedImgFeatList: retrieved image feature list after moving over query expansion
Goal:
Enhance retrieval results
BEGIN
finalRetrievedImgFeatList = startRetrievedImgFeatList    #assignment retrieval feature list
#do query expansion
for i = 0 to numOfExpansion do:
begin
    meanImgFeat = mean(finalRetrievedImgFeatList, inputImgFeat)  #compute mean vector from the retrieval feature list; this vector contains the most general features between all retrieval results and can be used to compute distance to all input features. The distance helps identify outliers and downrank them using an appropriate threshold.
    finalRetrievedImgFeatList=retrieve(meanImgFeat, k)  #compute the distance between mean vector and features of each retrieved image; reranking is applied based on the computed distances. Finally, take k first similar images as retrieval results.
end
END