Task 1
a) For example, when you will write one or more words :
Cloud , slide , table , boy , girl, owl .........................58 tags.
The code will find out that images which content on these words.
In the figure there are 500 images define by names.
B , C , D , E , F , G , H , I ............................................................58 . This is tags.
B = helicopter
C= hotairballoon
D= cloud
E= sun
F= lightning
G= rain
H= rocket
I= airplane
J= bouncy
K= slide
.
.
BG = fire.
This method ignores input words that are not part of the predefined tag list(58).
Hint: you should test these words:
1- appletree cat.
2- baseballglove.
3- tree hat duck.
And list top 5 answers (images).
b) Method 2 extends method 1 , for example if you write wrong word as appeltree balloon will find the images have these words.
Hint: you should test these words:
1. appletree cat.
2. baseballglove.
3. tree hat duck.
And list top 5 answers (images).
c) Method 3: extends method 2 using the diagram in task 1. For example, I defined dog and cat as mammal this known synonyms. When I will write mammal should find the images contents dog and cat.
Hint: you should test these words:
1. appletree cat.
2. baseballglove.
3. tree hat duck.
And list top 5 answers (images).
d) Method 4 extends method 3 .For instance, given query "oaktree pie owl", pictures with these three objects should be ranked higher than pictures with an oak tree, a pizza and an owl, which in turn should be ranked higher than pictures with an oak tree and an owl, but no food at all.
Hint: you should test these words:
1. appletree cat.
2. baseballglove.
3. tree hat duck.
And list top 5 answers (images).
Task 2
a) As a first step in Task 2, write a method that, given an image identifier, constructs a textual query from that image's tags and uses the best method you developed in Task 2 to find similar images.
Hint :list the top 5 answers (image identifier and similarity) of each method for the images Scene339_0, Scene335_0 and Scene313_0, as well as precision and recall for the top 5 answers, using the image class as the ground truth, i.e., for image SceneX_Y, all images SceneX_* are considered similar, and all other images not similar.
b) Write a method that, for a given image identifier, combines the text-based similarity used in 3a) with a second similarity measure based on the spatial information. For instance, if the crown in the input image is close to the girl's head, the spatial similarity measure (on its own) should prefer images where the crown is close to the girl's head over those where it is far away. ?Hint: have a look at the closeness values of sunglasses and hats to get a better idea of the range of these values before defining your similarity measure.
Hint : list the top 5 answers (image identifier and similarity) of each method for the images Scene339_0, Scene335_0 and Scene313_0, as well as precision and recall for the top 5 answers, using the image class as the ground truth, i.e., for image SceneX_Y, all images SceneX_* are considered similar, and all other images not similar.
The file boy_hand.csv provides for each image a list of objects and their closeness to the boy's hands. Closeness is a number between 0 and 1, with 1 being the closest. Objects with closeness 0 are omitted from the file. The columns are: Scene Identifier, Object, Closeness.
Files boy_ head.csv, girl_hand.csv and girl_head.csv provide the same information with respect to the boy's head, girl's hands and girl's head, respectively.
Attachment:- Tasks.zip