{
  "id": 173881,
  "title": "Is L2 normalization important and why",
  "url": "/competitions/landmark-retrieval-2020/discussion/173881",
  "author_name": "",
  "post_date": "2020-08-11T06:53:16.448489500Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I'm new to this field, so I'm a still confused about the following question:</p>\n<p>Is L2 normalization still necessary for retreival model after whitening layer? More specifically, consider the following two settings</p>\n<ol>\n<li><p>image -&gt; resize to fixed size -&gt; feature extraction -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)</p></li>\n<li><p>image -&gt; feature extraction with ad-hoc size -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)</p></li>\n</ol>\n<p>It seems to me that in setting 1, l2 norm of interest does not matter as long as the index vectors are processed in the same manner as the query vectors, but is l2 norm necessary for setting 2?</p>",
  "messages": [
    {
      "id": "966130",
      "postDate": "08/11/2020 06:53:16",
      "content": "<p>I'm new to this field, so I'm a still confused about the following question:</p>\n<p>Is L2 normalization still necessary for retreival model after whitening layer? More specifically, consider the following two settings</p>\n<ol>\n<li><p>image -&gt; resize to fixed size -&gt; feature extraction -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)</p></li>\n<li><p>image -&gt; feature extraction with ad-hoc size -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)</p></li>\n</ol>\n<p>It seems to me that in setting 1, l2 norm of interest does not matter as long as the index vectors are processed in the same manner as the query vectors, but is l2 norm necessary for setting 2?</p>",
      "rawMarkdown": "I'm new to this field, so I'm a still confused about the following question:\n\nIs L2 normalization still necessary for retreival model after whitening layer? More specifically, consider the following two settings\n\n1. image -&gt; resize to fixed size -&gt; feature extraction -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)\n\n2. image -&gt; feature extraction with ad-hoc size -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)\n\nIt seems to me that in setting 1, l2 norm of interest does not matter as long as the index vectors are processed in the same manner as the query vectors, but is l2 norm necessary for setting 2?",
      "votes": null
    },
    {
      "id": "966386",
      "postDate": "08/11/2020 11:38:05",
      "content": "<p>IMHO, it all depends on which distance is used during the NN search. If you use Euclidian for instance it does not matter if it's normalized or not. However, people usually L2-normalize their descriptors because then you can simply compute cosine similarity with a <code>np.dot</code> call. </p>\n<p>Whitening, on the other hand, is more important because it down-weights co-occurring features. </p>",
      "rawMarkdown": "IMHO, it all depends on which distance is used during the NN search. If you use Euclidian for instance it does not matter if it's normalized or not. However, people usually L2-normalize their descriptors because then you can simply compute cosine similarity with a `np.dot` call. \n\nWhitening, on the other hand, is more important because it down-weights co-occurring features.",
      "votes": null
    },
    {
      "id": "966946",
      "postDate": "08/11/2020 19:27:19",
      "content": "<p>Very interesting question. Since I am new to image retrieval, do you mind sharing where you get the ideas for the two setups? Or is it something you came up with? Cheers!</p>",
      "rawMarkdown": "Very interesting question. Since I am new to image retrieval, do you mind sharing where you get the ideas for the two setups? Or is it something you came up with? Cheers!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 966386,
      "author_name": "arc144",
      "author_url": "",
      "post_date": "08/11/2020 11:38:05",
      "content": "<p>IMHO, it all depends on which distance is used during the NN search. If you use Euclidian for instance it does not matter if it's normalized or not. However, people usually L2-normalize their descriptors because then you can simply compute cosine similarity with a <code>np.dot</code> call. </p>\n<p>Whitening, on the other hand, is more important because it down-weights co-occurring features. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 966946,
      "author_name": "yassinealouini",
      "author_url": "",
      "post_date": "08/11/2020 19:27:19",
      "content": "<p>Very interesting question. Since I am new to image retrieval, do you mind sharing where you get the ideas for the two setups? Or is it something you came up with? Cheers!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "966130": "I'm new to this field, so I'm a still confused about the following question:\n\nIs L2 normalization still necessary for retreival model after whitening layer? More specifically, consider the following two settings\n\n1. image -&gt; resize to fixed size -&gt; feature extraction -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)\n\n2. image -&gt; feature extraction with ad-hoc size -&gt; pool -&gt; (optional l2 norm) -&gt; whiten -&gt; (l2 norm of interest)\n\nIt seems to me that in setting 1, l2 norm of interest does not matter as long as the index vectors are processed in the same manner as the query vectors, but is l2 norm necessary for setting 2?",
    "966386": "IMHO, it all depends on which distance is used during the NN search. If you use Euclidian for instance it does not matter if it's normalized or not. However, people usually L2-normalize their descriptors because then you can simply compute cosine similarity with a `np.dot` call. \n\nWhitening, on the other hand, is more important because it down-weights co-occurring features.",
    "966946": "Very interesting question. Since I am new to image retrieval, do you mind sharing where you get the ideas for the two setups? Or is it something you came up with? Cheers!"
  },
  "source": "meta"
}