{
  "id": 506834,
  "title": "Second place solution",
  "url": "/competitions/ibiohash-2024-fgvc11/writeups/duong-anh-kiet-second-place-solution",
  "author_name": "",
  "post_date": "2024-05-23T13:02:20.163Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I appreciate the organizers for the engaging competition. To achieve this result, I have tried many methods, which has been a valuable experience for me.<br>\n<strong>Summary</strong>:</p>\n<ol>\n<li>First, I developed a model to extract features as a 48-bit hash using the method <em>round</em>(sigmoid(scale*norm(feature))) with a large scale, len(feature)=48, and trained it using ArcFace [1], LMCot [2], and DistanceLayer [3]. However, the results were only around 0.1-0.12. I suspected that 48 bits were too short, so I experimented with increasing it to 128, 512, 1024, etc. The results improved with longer feature lengths, reaching 0.2-0.23 in iBioHash 2023 [4].</li>\n<li>We decided to use 1024-dimensional features and apply KMeans to cluster the gallery and query images, generating a random 48-bit hash for each cluster using MD5 [5].</li>\n<li>We also tried re-ranking with local features (DELG) [6] after clustering with KMeans. Due to insufficient time, we didn't conduct too many experiments, but with the current ones, there was no improvement in the results.</li>\n</ol>\n<p><strong>Code</strong>: (I'm working on cleaning up the code)<br>\n<a href=\"https://github.com/ffyyytt/ibio2024\" target=\"_blank\">https://github.com/ffyyytt/ibio2024</a><br>\nI appreciate Google Colab Free TPU for allowing me to run my code.</p>\n<p><strong>Reference</strong>:<br>\n[1] Deng, Jiankang, et al. \"Arcface: Additive angular margin loss for deep face recognition.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019.<br>\n[2] Duong, Anh-Kiet, Hoang-Lan Nguyen, and Toan-Thinh Truong. \"Large margin cotangent loss for deep similarity learning.\" 2022 International Conference on Advanced Computing and Analytics (ACOMPA). IEEE, 2022.<br>\n[3] <a href=\"https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer\" target=\"_blank\">https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer</a><br>\n[4] axx, Venti, Wilson. (2023). iBioHash 2023 - FGVC10. Kaggle. <a href=\"https://kaggle.com/competitions/ibiohash-2023-fgvc10\" target=\"_blank\">https://kaggle.com/competitions/ibiohash-2023-fgvc10</a><br>\n[5] <a href=\"https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160\" target=\"_blank\">https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160</a><br>\n[6] Cao, Bingyi, Andre Araujo, and Jack Sim. \"Unifying deep local and global features for image search.\" Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XX 16. Springer International Publishing, 2020.</p>",
  "messages": [
    {
      "id": "2830915",
      "postDate": "05/23/2024 12:39:27",
      "content": "<p>I appreciate the organizers for the engaging competition. To achieve this result, I have tried many methods, which has been a valuable experience for me.<br>\n<strong>Summary</strong>:</p>\n<ol>\n<li>First, I developed a model to extract features as a 48-bit hash using the method <em>round</em>(sigmoid(scale*norm(feature))) with a large scale, len(feature)=48, and trained it using ArcFace [1], LMCot [2], and DistanceLayer [3]. However, the results were only around 0.1-0.12. I suspected that 48 bits were too short, so I experimented with increasing it to 128, 512, 1024, etc. The results improved with longer feature lengths, reaching 0.2-0.23 in iBioHash 2023 [4].</li>\n<li>We decided to use 1024-dimensional features and apply KMeans to cluster the gallery and query images, generating a random 48-bit hash for each cluster using MD5 [5].</li>\n<li>We also tried re-ranking with local features (DELG) [6] after clustering with KMeans. Due to insufficient time, we didn't conduct too many experiments, but with the current ones, there was no improvement in the results.</li>\n</ol>\n<p><strong>Code</strong>: (I'm working on cleaning up the code)<br>\n<a href=\"https://github.com/ffyyytt/ibio2024\" target=\"_blank\">https://github.com/ffyyytt/ibio2024</a><br>\nI appreciate Google Colab Free TPU for allowing me to run my code.</p>\n<p><strong>Reference</strong>:<br>\n[1] Deng, Jiankang, et al. \"Arcface: Additive angular margin loss for deep face recognition.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019.<br>\n[2] Duong, Anh-Kiet, Hoang-Lan Nguyen, and Toan-Thinh Truong. \"Large margin cotangent loss for deep similarity learning.\" 2022 International Conference on Advanced Computing and Analytics (ACOMPA). IEEE, 2022.<br>\n[3] <a href=\"https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer\" target=\"_blank\">https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer</a><br>\n[4] axx, Venti, Wilson. (2023). iBioHash 2023 - FGVC10. Kaggle. <a href=\"https://kaggle.com/competitions/ibiohash-2023-fgvc10\" target=\"_blank\">https://kaggle.com/competitions/ibiohash-2023-fgvc10</a><br>\n[5] <a href=\"https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160\" target=\"_blank\">https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160</a><br>\n[6] Cao, Bingyi, Andre Araujo, and Jack Sim. \"Unifying deep local and global features for image search.\" Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XX 16. Springer International Publishing, 2020.</p>",
      "rawMarkdown": "I appreciate the organizers for the engaging competition. To achieve this result, I have tried many methods, which has been a valuable experience for me.\n**Summary**:\n1. First, I developed a model to extract features as a 48-bit hash using the method *round*(sigmoid(scale*norm(feature))) with a large scale, len(feature)=48, and trained it using ArcFace [1], LMCot [2], and DistanceLayer [3]. However, the results were only around 0.1-0.12. I suspected that 48 bits were too short, so I experimented with increasing it to 128, 512, 1024, etc. The results improved with longer feature lengths, reaching 0.2-0.23 in iBioHash 2023 [4].\n2. We decided to use 1024-dimensional features and apply KMeans to cluster the gallery and query images, generating a random 48-bit hash for each cluster using MD5 [5].\n3. We also tried re-ranking with local features (DELG) [6] after clustering with KMeans. Due to insufficient time, we didn't conduct too many experiments, but with the current ones, there was no improvement in the results.\n\n**Code**: (I'm working on cleaning up the code)\nhttps://github.com/ffyyytt/ibio2024\nI appreciate Google Colab Free TPU for allowing me to run my code.\n\n**Reference**:\n[1] Deng, Jiankang, et al. \"Arcface: Additive angular margin loss for deep face recognition.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019.\n[2] Duong, Anh-Kiet, Hoang-Lan Nguyen, and Toan-Thinh Truong. \"Large margin cotangent loss for deep similarity learning.\" 2022 International Conference on Advanced Computing and Analytics (ACOMPA). IEEE, 2022.\n[3] https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer\n[4] axx, Venti, Wilson. (2023). iBioHash 2023 - FGVC10. Kaggle. https://kaggle.com/competitions/ibiohash-2023-fgvc10\n[5] https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160\n[6] Cao, Bingyi, Andre Araujo, and Jack Sim. \"Unifying deep local and global features for image search.\" Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XX 16. Springer International Publishing, 2020.",
      "votes": null
    },
    {
      "id": "2832929",
      "postDate": "05/24/2024 00:52:06",
      "content": "<p>Thanks for the GitHub, the  reference \"Large margin cotangent loss for deep similarity learning\" (On the 2022 ACOMPA IEEE. And Congratulations!</p>",
      "rawMarkdown": "Thanks for the GitHub, the  reference \"Large margin cotangent loss for deep similarity learning\" (On the 2022 ACOMPA IEEE. And Congratulations!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2832929,
      "author_name": "mpwolke",
      "author_url": "",
      "post_date": "05/24/2024 00:52:06",
      "content": "<p>Thanks for the GitHub, the  reference \"Large margin cotangent loss for deep similarity learning\" (On the 2022 ACOMPA IEEE. And Congratulations!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2830915": "I appreciate the organizers for the engaging competition. To achieve this result, I have tried many methods, which has been a valuable experience for me.\n**Summary**:\n1. First, I developed a model to extract features as a 48-bit hash using the method *round*(sigmoid(scale*norm(feature))) with a large scale, len(feature)=48, and trained it using ArcFace [1], LMCot [2], and DistanceLayer [3]. However, the results were only around 0.1-0.12. I suspected that 48 bits were too short, so I experimented with increasing it to 128, 512, 1024, etc. The results improved with longer feature lengths, reaching 0.2-0.23 in iBioHash 2023 [4].\n2. We decided to use 1024-dimensional features and apply KMeans to cluster the gallery and query images, generating a random 48-bit hash for each cluster using MD5 [5].\n3. We also tried re-ranking with local features (DELG) [6] after clustering with KMeans. Due to insufficient time, we didn't conduct too many experiments, but with the current ones, there was no improvement in the results.\n\n**Code**: (I'm working on cleaning up the code)\nhttps://github.com/ffyyytt/ibio2024\nI appreciate Google Colab Free TPU for allowing me to run my code.\n\n**Reference**:\n[1] Deng, Jiankang, et al. \"Arcface: Additive angular margin loss for deep face recognition.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019.\n[2] Duong, Anh-Kiet, Hoang-Lan Nguyen, and Toan-Thinh Truong. \"Large margin cotangent loss for deep similarity learning.\" 2022 International Conference on Advanced Computing and Analytics (ACOMPA). IEEE, 2022.\n[3] https://www.kaggle.com/code/motono0223/guie-tensorflow-clip-distancelayer-sub-dim64#Distance-Margin-Layer\n[4] axx, Venti, Wilson. (2023). iBioHash 2023 - FGVC10. Kaggle. https://kaggle.com/competitions/ibiohash-2023-fgvc10\n[5] https://www.kaggle.com/competitions/ibiohash-2023-fgvc10/discussion/412160\n[6] Cao, Bingyi, Andre Araujo, and Jack Sim. \"Unifying deep local and global features for image search.\" Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XX 16. Springer International Publishing, 2020.",
    "2832929": "Thanks for the GitHub, the  reference \"Large margin cotangent loss for deep similarity learning\" (On the 2022 ACOMPA IEEE. And Congratulations!"
  },
  "source": "meta"
}