{
  "id": 234758,
  "title": "Always get score 0.000 although I did my best with some different models",
  "url": "/competitions/hotel-id-2021-fgvc8/discussion/234758",
  "author_name": "",
  "post_date": "2021-04-26T04:23:07.266748900Z",
  "votes": 4,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I am beginner and this is the first time I have participated in competition on Kaggle so my purpose is able to learn from competition.<br>\nWith this competition I tried to build classification models VGG16; RestNet50, EfficientNetB0 but It is not efficient (Score 0.000 in leaderboard with epochs = 5). Initially, I thought that the reason is we have 7770 classes and 97000+ images (avg 13-14 images/class) so machine could not learn and loss function I used is \"categorical_crossentropy\".<br>\nRecently, I read some articles about Image Retrieval, so I tried to build model with Triplet loss(loss function is not much decreased). However, I still get Score 0.000.<br>\nNowadays, I am really confused because I do not know what model I can build to improve and where am I wrong<br>\nPlease tell me some advices for my problem.<br>\nThis is my notebook:</p>\n<ul>\n<li>Triplet loss from scratch<br>\n<a href=\"https://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing\" target=\"_blank\">https://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing</a></li>\n<li>Using SemiTriplet loss in keras<br>\n<a href=\"https://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing\" target=\"_blank\">https://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing</a></li>\n</ul>",
  "messages": [
    {
      "id": "1284542",
      "postDate": "04/26/2021 04:23:07",
      "content": "<p>I am beginner and this is the first time I have participated in competition on Kaggle so my purpose is able to learn from competition.<br>\nWith this competition I tried to build classification models VGG16; RestNet50, EfficientNetB0 but It is not efficient (Score 0.000 in leaderboard with epochs = 5). Initially, I thought that the reason is we have 7770 classes and 97000+ images (avg 13-14 images/class) so machine could not learn and loss function I used is \"categorical_crossentropy\".<br>\nRecently, I read some articles about Image Retrieval, so I tried to build model with Triplet loss(loss function is not much decreased). However, I still get Score 0.000.<br>\nNowadays, I am really confused because I do not know what model I can build to improve and where am I wrong<br>\nPlease tell me some advices for my problem.<br>\nThis is my notebook:</p>\n<ul>\n<li>Triplet loss from scratch<br>\n<a href=\"https://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing\" target=\"_blank\">https://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing</a></li>\n<li>Using SemiTriplet loss in keras<br>\n<a href=\"https://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing\" target=\"_blank\">https://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing</a></li>\n</ul>",
      "rawMarkdown": "I am beginner and this is the first time I have participated in competition on Kaggle so my purpose is able to learn from competition.\nWith this competition I tried to build classification models VGG16; RestNet50, EfficientNetB0 but It is not efficient (Score 0.000 in leaderboard with epochs = 5). Initially, I thought that the reason is we have 7770 classes and 97000+ images (avg 13-14 images/class) so machine could not learn and loss function I used is \"categorical_crossentropy\".\nRecently, I read some articles about Image Retrieval, so I tried to build model with Triplet loss(loss function is not much decreased). However, I still get Score 0.000.\nNowadays, I am really confused because I do not know what model I can build to improve and where am I wrong\nPlease tell me some advices for my problem.\nThis is my notebook:\n- Triplet loss from scratch\nhttps://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing\n- Using SemiTriplet loss in keras\nhttps://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing",
      "votes": null
    },
    {
      "id": "1285786",
      "postDate": "04/27/2021 08:59:30",
      "content": "<p>I have the same problem, but I think it might be due to an incorrect submission format. It isn't fully clear to me why they want us to provide the 5 most likely matches, maybe someone can shed some light on that. Clearly stating how the score is computed would also be beneficial. Anyways, please update if you manage to get a non zero submission !</p>\n<p>Cheers !</p>",
      "rawMarkdown": "I have the same problem, but I think it might be due to an incorrect submission format. It isn't fully clear to me why they want us to provide the 5 most likely matches, maybe someone can shed some light on that. Clearly stating how the score is computed would also be beneficial. Anyways, please update if you manage to get a non zero submission !\n\nCheers !",
      "votes": null
    },
    {
      "id": "1790364",
      "postDate": "05/14/2022 20:24:55",
      "content": "<p>Hi I am just visiting this late and came across this post. Personally experienced the same issue just a week ago. But my problem was that I used different libraries for image reading. Specifically, I used a supposedly fastest library called jpeg4py to read images in the training notebooks. And because the internet has to be off for notebooks that you used to submit predictions, I used OpenCV (cv2) which is pre-installed in a kaggle kernel in my final submission notebook. Now, the key difference between jpeg4py and OpenCV is that the third axis of an image numpy array is different. It is red, green, and blue (RGB) for jpeg4py, and BGR for OpenCV. So if you messed up the input channels, your model might just give random outputs. </p>\n<p>That's my take but I also thought of other possible reasons to get 0 scores, such as having different mappings between real hotel ids and your training labels, so making the mapping identical across different notebooks might help. </p>\n<p>Hopefully my ideas help you guys in your future work. </p>",
      "rawMarkdown": "Hi I am just visiting this late and came across this post. Personally experienced the same issue just a week ago. But my problem was that I used different libraries for image reading. Specifically, I used a supposedly fastest library called jpeg4py to read images in the training notebooks. And because the internet has to be off for notebooks that you used to submit predictions, I used OpenCV (cv2) which is pre-installed in a kaggle kernel in my final submission notebook. Now, the key difference between jpeg4py and OpenCV is that the third axis of an image numpy array is different. It is red, green, and blue (RGB) for jpeg4py, and BGR for OpenCV. So if you messed up the input channels, your model might just give random outputs. \n\nThat's my take but I also thought of other possible reasons to get 0 scores, such as having different mappings between real hotel ids and your training labels, so making the mapping identical across different notebooks might help. \n\nHopefully my ideas help you guys in your future work.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1285786,
      "author_name": "nicolasdutly",
      "author_url": "",
      "post_date": "04/27/2021 08:59:30",
      "content": "<p>I have the same problem, but I think it might be due to an incorrect submission format. It isn't fully clear to me why they want us to provide the 5 most likely matches, maybe someone can shed some light on that. Clearly stating how the score is computed would also be beneficial. Anyways, please update if you manage to get a non zero submission !</p>\n<p>Cheers !</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1790364,
      "author_name": "jaredfeng",
      "author_url": "",
      "post_date": "05/14/2022 20:24:55",
      "content": "<p>Hi I am just visiting this late and came across this post. Personally experienced the same issue just a week ago. But my problem was that I used different libraries for image reading. Specifically, I used a supposedly fastest library called jpeg4py to read images in the training notebooks. And because the internet has to be off for notebooks that you used to submit predictions, I used OpenCV (cv2) which is pre-installed in a kaggle kernel in my final submission notebook. Now, the key difference between jpeg4py and OpenCV is that the third axis of an image numpy array is different. It is red, green, and blue (RGB) for jpeg4py, and BGR for OpenCV. So if you messed up the input channels, your model might just give random outputs. </p>\n<p>That's my take but I also thought of other possible reasons to get 0 scores, such as having different mappings between real hotel ids and your training labels, so making the mapping identical across different notebooks might help. </p>\n<p>Hopefully my ideas help you guys in your future work. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1284542": "I am beginner and this is the first time I have participated in competition on Kaggle so my purpose is able to learn from competition.\nWith this competition I tried to build classification models VGG16; RestNet50, EfficientNetB0 but It is not efficient (Score 0.000 in leaderboard with epochs = 5). Initially, I thought that the reason is we have 7770 classes and 97000+ images (avg 13-14 images/class) so machine could not learn and loss function I used is \"categorical_crossentropy\".\nRecently, I read some articles about Image Retrieval, so I tried to build model with Triplet loss(loss function is not much decreased). However, I still get Score 0.000.\nNowadays, I am really confused because I do not know what model I can build to improve and where am I wrong\nPlease tell me some advices for my problem.\nThis is my notebook:\n- Triplet loss from scratch\nhttps://colab.research.google.com/drive/1NQkHuKAXj2vAyB-KcpVs4a42CfFuc39b?usp=sharing\n- Using SemiTriplet loss in keras\nhttps://colab.research.google.com/drive/1911mPLwYaC2GC_QHcIbdGFrGb0PCsOLj?usp=sharing",
    "1285786": "I have the same problem, but I think it might be due to an incorrect submission format. It isn't fully clear to me why they want us to provide the 5 most likely matches, maybe someone can shed some light on that. Clearly stating how the score is computed would also be beneficial. Anyways, please update if you manage to get a non zero submission !\n\nCheers !",
    "1790364": "Hi I am just visiting this late and came across this post. Personally experienced the same issue just a week ago. But my problem was that I used different libraries for image reading. Specifically, I used a supposedly fastest library called jpeg4py to read images in the training notebooks. And because the internet has to be off for notebooks that you used to submit predictions, I used OpenCV (cv2) which is pre-installed in a kaggle kernel in my final submission notebook. Now, the key difference between jpeg4py and OpenCV is that the third axis of an image numpy array is different. It is red, green, and blue (RGB) for jpeg4py, and BGR for OpenCV. So if you messed up the input channels, your model might just give random outputs. \n\nThat's my take but I also thought of other possible reasons to get 0 scores, such as having different mappings between real hotel ids and your training labels, so making the mapping identical across different notebooks might help. \n\nHopefully my ideas help you guys in your future work."
  },
  "source": "meta"
}