{
  "id": 168506,
  "title": "It's over! What did we learn?",
  "url": "/competitions/alaska2-image-steganalysis/discussion/168506",
  "author_name": "",
  "post_date": "2020-07-21T00:02:38.881719400Z",
  "votes": 8,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi everyone,</p>\n\n<p>First of all I want to congratulate everyone for the hard work and the effort put in this challenge. So, It is a fact that when we do research there are tons of approaches that we try and do not work and there are only a few that actually improves the State of the Art. That’s why I have always thought that it is important to share our achievements but also our failures. That’s why I want to share with you my failed ideas and what I have learnt during these months. So, let’s discuss my approaches and what I learnt during this journey. </p>\n\n<p>I highly recommend checking this <a href=\"https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/155392\">post</a> as it gives the first notions to tackle this challenge.</p>\n\n<p><strong>What I have learnt:</strong>\n1. Do not modify the frequencies of the image. That means: do not resize, do not crop, do not perform any augmentation that might affect the frequencies of the image. Rotations and flips are ok. Why? Basically some steganography uses high frequencies to hide their message.\n2. Steganalysis seems to perform better in RGB space in pre-trained NN. YCbCr and DCT do not perform as well with the same pretrained network. Maybe training the same network with ImageNet but with YCbCr/DCT spaces would improve?\n3. Big batch size is important in order to allow batch normalization work correctly. If the network is too big to fit in the GPU/TPU we need to find other approaches.\n4. TTA always helped me, giving more importance to the original image than the other transformation. Isometry improved my score a bit.\n5. Using KFold worked for me. The most important part is separating the data not randomly but including the same image (Cover + 3 algorithms) improves a lot. Not all folds were useful though.\n6. Balancing the batch with BalanceClassSampler was positive\n7. MSE with a binary approach did not really work. It seems that pixel difference is not enough. I would have liked to check which algorithms were more prone to be detected with pixel difference and which not.\n8. Multiclass using 10 classes did not provide a good baseline result. It seems that it is an extra effort to separate the features by JPEG quality factor. It seems that using only 4 classes is enough to separate better the features.</p>\n\n<p><strong>What I implemented and did not worked for me:</strong>\n1. My idea was that attention might focus on regions of the image where possible hidden data might be in it. For instance, the data might be hidden in high frequency regions but it seems that is not always like this. I tried implementing it, it seemed good at the beginning but it ended up overfitting. Selecting the layers to extract the attention was the worst part. The paper did not mention anything so I tried to tune it manually but of course did not work. This is the <a href=\"https://arxiv.org/abs/1804.02391\">paper</a>. </p>\n\n<p>I’ll leave here my <a href=\"https://github.com/guillemdelgado/ALASKA2-Image-Steganalysis\">GitHub</a> in case anyone wants to give it a look!</p>\n\n<p>Cheers!</p>",
  "messages": [
    {
      "id": "937335",
      "postDate": "07/21/2020 00:02:38",
      "content": "<p>Hi everyone,</p>\n\n<p>First of all I want to congratulate everyone for the hard work and the effort put in this challenge. So, It is a fact that when we do research there are tons of approaches that we try and do not work and there are only a few that actually improves the State of the Art. That’s why I have always thought that it is important to share our achievements but also our failures. That’s why I want to share with you my failed ideas and what I have learnt during these months. So, let’s discuss my approaches and what I learnt during this journey. </p>\n\n<p>I highly recommend checking this <a href=\"https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/155392\">post</a> as it gives the first notions to tackle this challenge.</p>\n\n<p><strong>What I have learnt:</strong>\n1. Do not modify the frequencies of the image. That means: do not resize, do not crop, do not perform any augmentation that might affect the frequencies of the image. Rotations and flips are ok. Why? Basically some steganography uses high frequencies to hide their message.\n2. Steganalysis seems to perform better in RGB space in pre-trained NN. YCbCr and DCT do not perform as well with the same pretrained network. Maybe training the same network with ImageNet but with YCbCr/DCT spaces would improve?\n3. Big batch size is important in order to allow batch normalization work correctly. If the network is too big to fit in the GPU/TPU we need to find other approaches.\n4. TTA always helped me, giving more importance to the original image than the other transformation. Isometry improved my score a bit.\n5. Using KFold worked for me. The most important part is separating the data not randomly but including the same image (Cover + 3 algorithms) improves a lot. Not all folds were useful though.\n6. Balancing the batch with BalanceClassSampler was positive\n7. MSE with a binary approach did not really work. It seems that pixel difference is not enough. I would have liked to check which algorithms were more prone to be detected with pixel difference and which not.\n8. Multiclass using 10 classes did not provide a good baseline result. It seems that it is an extra effort to separate the features by JPEG quality factor. It seems that using only 4 classes is enough to separate better the features.</p>\n\n<p><strong>What I implemented and did not worked for me:</strong>\n1. My idea was that attention might focus on regions of the image where possible hidden data might be in it. For instance, the data might be hidden in high frequency regions but it seems that is not always like this. I tried implementing it, it seemed good at the beginning but it ended up overfitting. Selecting the layers to extract the attention was the worst part. The paper did not mention anything so I tried to tune it manually but of course did not work. This is the <a href=\"https://arxiv.org/abs/1804.02391\">paper</a>. </p>\n\n<p>I’ll leave here my <a href=\"https://github.com/guillemdelgado/ALASKA2-Image-Steganalysis\">GitHub</a> in case anyone wants to give it a look!</p>\n\n<p>Cheers!</p>",
      "rawMarkdown": "Hi everyone,\n\nFirst of all I want to congratulate everyone for the hard work and the effort put in this challenge. So, It is a fact that when we do research there are tons of approaches that we try and do not work and there are only a few that actually improves the State of the Art. That’s why I have always thought that it is important to share our achievements but also our failures. That’s why I want to share with you my failed ideas and what I have learnt during these months. So, let’s discuss my approaches and what I learnt during this journey. \n\nI highly recommend checking this [post](https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/155392) as it gives the first notions to tackle this challenge.\n\n**What I have learnt:**\n1. Do not modify the frequencies of the image. That means: do not resize, do not crop, do not perform any augmentation that might affect the frequencies of the image. Rotations and flips are ok. Why? Basically some steganography uses high frequencies to hide their message.\n2. Steganalysis seems to perform better in RGB space in pre-trained NN. YCbCr and DCT do not perform as well with the same pretrained network. Maybe training the same network with ImageNet but with YCbCr/DCT spaces would improve?\n3. Big batch size is important in order to allow batch normalization work correctly. If the network is too big to fit in the GPU/TPU we need to find other approaches.\n4. TTA always helped me, giving more importance to the original image than the other transformation. Isometry improved my score a bit.\n5. Using KFold worked for me. The most important part is separating the data not randomly but including the same image (Cover + 3 algorithms) improves a lot. Not all folds were useful though.\n6. Balancing the batch with BalanceClassSampler was positive\n7. MSE with a binary approach did not really work. It seems that pixel difference is not enough. I would have liked to check which algorithms were more prone to be detected with pixel difference and which not.\n8. Multiclass using 10 classes did not provide a good baseline result. It seems that it is an extra effort to separate the features by JPEG quality factor. It seems that using only 4 classes is enough to separate better the features.\n\n**What I implemented and did not worked for me:**\n1. My idea was that attention might focus on regions of the image where possible hidden data might be in it. For instance, the data might be hidden in high frequency regions but it seems that is not always like this. I tried implementing it, it seemed good at the beginning but it ended up overfitting. Selecting the layers to extract the attention was the worst part. The paper did not mention anything so I tried to tune it manually but of course did not work. This is the [paper](https://arxiv.org/abs/1804.02391). \n\nI’ll leave here my [GitHub](https://github.com/guillemdelgado/ALASKA2-Image-Steganalysis) in case anyone wants to give it a look!\n\nCheers!",
      "votes": null
    },
    {
      "id": "937842",
      "postDate": "07/21/2020 07:31:37",
      "content": "<p>Thanks for sharing your learning <a href=\"https://www.kaggle.com/guillemdelgado\" target=\"_blank\">@guillemdelgado</a> </p>",
      "rawMarkdown": "Thanks for sharing your learning @guillemdelgado",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 937842,
      "author_name": "vishnurapps",
      "author_url": "",
      "post_date": "07/21/2020 07:31:37",
      "content": "<p>Thanks for sharing your learning <a href=\"https://www.kaggle.com/guillemdelgado\" target=\"_blank\">@guillemdelgado</a> </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "937335": "Hi everyone,\n\nFirst of all I want to congratulate everyone for the hard work and the effort put in this challenge. So, It is a fact that when we do research there are tons of approaches that we try and do not work and there are only a few that actually improves the State of the Art. That’s why I have always thought that it is important to share our achievements but also our failures. That’s why I want to share with you my failed ideas and what I have learnt during these months. So, let’s discuss my approaches and what I learnt during this journey. \n\nI highly recommend checking this [post](https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/155392) as it gives the first notions to tackle this challenge.\n\n**What I have learnt:**\n1. Do not modify the frequencies of the image. That means: do not resize, do not crop, do not perform any augmentation that might affect the frequencies of the image. Rotations and flips are ok. Why? Basically some steganography uses high frequencies to hide their message.\n2. Steganalysis seems to perform better in RGB space in pre-trained NN. YCbCr and DCT do not perform as well with the same pretrained network. Maybe training the same network with ImageNet but with YCbCr/DCT spaces would improve?\n3. Big batch size is important in order to allow batch normalization work correctly. If the network is too big to fit in the GPU/TPU we need to find other approaches.\n4. TTA always helped me, giving more importance to the original image than the other transformation. Isometry improved my score a bit.\n5. Using KFold worked for me. The most important part is separating the data not randomly but including the same image (Cover + 3 algorithms) improves a lot. Not all folds were useful though.\n6. Balancing the batch with BalanceClassSampler was positive\n7. MSE with a binary approach did not really work. It seems that pixel difference is not enough. I would have liked to check which algorithms were more prone to be detected with pixel difference and which not.\n8. Multiclass using 10 classes did not provide a good baseline result. It seems that it is an extra effort to separate the features by JPEG quality factor. It seems that using only 4 classes is enough to separate better the features.\n\n**What I implemented and did not worked for me:**\n1. My idea was that attention might focus on regions of the image where possible hidden data might be in it. For instance, the data might be hidden in high frequency regions but it seems that is not always like this. I tried implementing it, it seemed good at the beginning but it ended up overfitting. Selecting the layers to extract the attention was the worst part. The paper did not mention anything so I tried to tune it manually but of course did not work. This is the [paper](https://arxiv.org/abs/1804.02391). \n\nI’ll leave here my [GitHub](https://github.com/guillemdelgado/ALASKA2-Image-Steganalysis) in case anyone wants to give it a look!\n\nCheers!",
    "937842": "Thanks for sharing your learning @guillemdelgado"
  },
  "source": "meta"
}