{
  "id": 47553,
  "title": "Any success using Gram matrix?",
  "url": "/competitions/sp-society-camera-model-identification/discussion/47553",
  "author_name": "",
  "post_date": "2018-01-16T06:38:06.481949300Z",
  "votes": 5,
  "comment_count": 12,
  "views": 0,
  "content": "<p>Does anyone here has successfully used the Gram matrix of the images as additional features? I think it can be helpful.</p>",
  "messages": [
    {
      "id": "269079",
      "postDate": "01/16/2018 06:38:06",
      "content": "<p>Does anyone here has successfully used the Gram matrix of the images as additional features? I think it can be helpful.</p>",
      "rawMarkdown": "Does anyone here has successfully used the Gram matrix of the images as additional features? I think it can be helpful.",
      "votes": null
    },
    {
      "id": "269097",
      "postDate": "01/16/2018 07:32:03",
      "content": "<p>I've tried, single model was somewhere on the level of 0.8</p>",
      "rawMarkdown": "I've tried, single model was somewhere on the level of 0.8",
      "votes": null
    },
    {
      "id": "269168",
      "postDate": "01/16/2018 11:23:51",
      "content": "<p>Was it helpful or not? I mean, using the Gram matrix resulted in higher validation accuracy?</p>",
      "rawMarkdown": "Was it helpful or not? I mean, using the Gram matrix resulted in higher validation accuracy?",
      "votes": null
    },
    {
      "id": "269567",
      "postDate": "01/17/2018 02:11:47",
      "content": "<p>Hi, I want to use Gram matrix too, but I have less clues how to use it. Can u provide some projects or material about how to use gram matrix? thx a lot.</p>",
      "rawMarkdown": "Hi, I want to use Gram matrix too, but I have less clues how to use it. Can u provide some projects or material about how to use gram matrix? thx a lot.",
      "votes": null
    },
    {
      "id": "269608",
      "postDate": "01/17/2018 02:55:21",
      "content": "<p>The concept is really simple. if X is an image, then the Gram matrix which represents the correlation between pixels (which I think is something related to the camera device), can be computed as X * XT. where XT is the transpose of X. in which environment do you want to implement? I mean, python, keras, torch, tensorflow and etc.</p>",
      "rawMarkdown": "The concept is really simple. if X is an image, then the Gram matrix which represents the correlation between pixels (which I think is something related to the camera device), can be computed as X * XT. where XT is the transpose of X. in which environment do you want to implement? I mean, python, keras, torch, tensorflow and etc.",
      "votes": null
    },
    {
      "id": "269610",
      "postDate": "01/17/2018 02:59:01",
      "content": "<p>You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.</p>",
      "rawMarkdown": "You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.",
      "votes": null
    },
    {
      "id": "269611",
      "postDate": "01/17/2018 02:59:40",
      "content": "<p>You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.</p>",
      "rawMarkdown": "You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.",
      "votes": null
    },
    {
      "id": "269762",
      "postDate": "01/17/2018 08:46:04",
      "content": "<p>The framework I use is Tensorflow. And to implement the gram matrix, maybe I will use python or tensor flow. I think both is ok.\nThx a lot, I get the idea indeed and maybe I will try. Same as u, I also think that gram matrix can help to improve the identification model.\nActually, now my model gets about 100 acc both in train and val, which means the model is hard to train and learn anything new, but test is not so good as val, still a big gap. So I want find some features from the image and the gram matrix u mention actually inspire me.</p>",
      "rawMarkdown": "The framework I use is Tensorflow. And to implement the gram matrix, maybe I will use python or tensor flow. I think both is ok.\nThx a lot, I get the idea indeed and maybe I will try. Same as u, I also think that gram matrix can help to improve the identification model.\nActually, now my model gets about 100 acc both in train and val, which means the model is hard to train and learn anything new, but test is not so good as val, still a big gap. So I want find some features from the image and the gram matrix u mention actually inspire me.",
      "votes": null
    },
    {
      "id": "269765",
      "postDate": "01/17/2018 08:53:01",
      "content": "<p>I am happy to hear that. Go ahead and please share with us any improvement in your results. Good Luck!</p>",
      "rawMarkdown": "I am happy to hear that. Go ahead and please share with us any improvement in your results. Good Luck!",
      "votes": null
    },
    {
      "id": "269843",
      "postDate": "01/17/2018 11:35:45",
      "content": "<p>100 percent accuracy on validation is increadible. I couldn't go beyond 97.8 percent. May I ask you about your method? For example, How did you choose your validation set? How many samples are in it? and perhaps which architecture did you use? </p>",
      "rawMarkdown": "100 percent accuracy on validation is increadible. I couldn't go beyond 97.8 percent. May I ask you about your method? For example, How did you choose your validation set? How many samples are in it? and perhaps which architecture did you use?",
      "votes": null
    },
    {
      "id": "271001",
      "postDate": "01/19/2018 12:31:16",
      "content": "<p>The architecture I use is InceptionV3, In val data, I just use all the manic op on it, and crop the center of the img. Although 100 percent acc, but the test acc is just 85.9%, a big gap.</p>",
      "rawMarkdown": "The architecture I use is InceptionV3, In val data, I just use all the manic op on it, and crop the center of the img. Although 100 percent acc, but the test acc is just 85.9%, a big gap.",
      "votes": null
    },
    {
      "id": "271023",
      "postDate": "01/19/2018 13:49:21",
      "content": "<p>That's great. I have the same problem.</p>",
      "rawMarkdown": "That's great. I have the same problem.",
      "votes": null
    },
    {
      "id": "271847",
      "postDate": "01/21/2018 16:22:33",
      "content": "<p>So I try to analyse the data in order to find some rules, but I find it is hard to do. Unlike the object, like cat dot and product, we can find some obvious features, in this competition, the features may be some filters, like focal or cfa, but it is hard to analyse it from images. Anyone can provide some ideas?</p>",
      "rawMarkdown": "So I try to analyse the data in order to find some rules, but I find it is hard to do. Unlike the object, like cat dot and product, we can find some obvious features, in this competition, the features may be some filters, like focal or cfa, but it is hard to analyse it from images. Anyone can provide some ideas?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 269097,
      "author_name": "nesterov",
      "author_url": "",
      "post_date": "01/16/2018 07:32:03",
      "content": "<p>I've tried, single model was somewhere on the level of 0.8</p>",
      "votes": null,
      "replies": [
        {
          "id": 269168,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/16/2018 11:23:51",
          "content": "<p>Was it helpful or not? I mean, using the Gram matrix resulted in higher validation accuracy?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 269610,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/17/2018 02:59:01",
          "content": "<p>You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 269567,
      "author_name": "oujiayu",
      "author_url": "",
      "post_date": "01/17/2018 02:11:47",
      "content": "<p>Hi, I want to use Gram matrix too, but I have less clues how to use it. Can u provide some projects or material about how to use gram matrix? thx a lot.</p>",
      "votes": null,
      "replies": [
        {
          "id": 269608,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/17/2018 02:55:21",
          "content": "<p>The concept is really simple. if X is an image, then the Gram matrix which represents the correlation between pixels (which I think is something related to the camera device), can be computed as X * XT. where XT is the transpose of X. in which environment do you want to implement? I mean, python, keras, torch, tensorflow and etc.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 269611,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/17/2018 02:59:40",
          "content": "<p>You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 269762,
          "author_name": "oujiayu",
          "author_url": "",
          "post_date": "01/17/2018 08:46:04",
          "content": "<p>The framework I use is Tensorflow. And to implement the gram matrix, maybe I will use python or tensor flow. I think both is ok.\nThx a lot, I get the idea indeed and maybe I will try. Same as u, I also think that gram matrix can help to improve the identification model.\nActually, now my model gets about 100 acc both in train and val, which means the model is hard to train and learn anything new, but test is not so good as val, still a big gap. So I want find some features from the image and the gram matrix u mention actually inspire me.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 269765,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/17/2018 08:53:01",
          "content": "<p>I am happy to hear that. Go ahead and please share with us any improvement in your results. Good Luck!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 269843,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/17/2018 11:35:45",
          "content": "<p>100 percent accuracy on validation is increadible. I couldn't go beyond 97.8 percent. May I ask you about your method? For example, How did you choose your validation set? How many samples are in it? and perhaps which architecture did you use? </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 271001,
          "author_name": "oujiayu",
          "author_url": "",
          "post_date": "01/19/2018 12:31:16",
          "content": "<p>The architecture I use is InceptionV3, In val data, I just use all the manic op on it, and crop the center of the img. Although 100 percent acc, but the test acc is just 85.9%, a big gap.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 271023,
          "author_name": "hamyadlab",
          "author_url": "",
          "post_date": "01/19/2018 13:49:21",
          "content": "<p>That's great. I have the same problem.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 271847,
          "author_name": "oujiayu",
          "author_url": "",
          "post_date": "01/21/2018 16:22:33",
          "content": "<p>So I try to analyse the data in order to find some rules, but I find it is hard to do. Unlike the object, like cat dot and product, we can find some obvious features, in this competition, the features may be some filters, like focal or cfa, but it is hard to analyse it from images. Anyone can provide some ideas?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "269079": "Does anyone here has successfully used the Gram matrix of the images as additional features? I think it can be helpful.",
    "269097": "I've tried, single model was somewhere on the level of 0.8",
    "269168": "Was it helpful or not? I mean, using the Gram matrix resulted in higher validation accuracy?",
    "269567": "Hi, I want to use Gram matrix too, but I have less clues how to use it. Can u provide some projects or material about how to use gram matrix? thx a lot.",
    "269608": "The concept is really simple. if X is an image, then the Gram matrix which represents the correlation between pixels (which I think is something related to the camera device), can be computed as X * XT. where XT is the transpose of X. in which environment do you want to implement? I mean, python, keras, torch, tensorflow and etc.",
    "269610": "You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.",
    "269611": "You can use it as extra features for every image. For example you can compute the image features using a convolutional neural net, and the you can concatenate the image features with the Gram Matrix and then pass them to a linear layer as the last layer of your neural network. I hope you got the idea.",
    "269762": "The framework I use is Tensorflow. And to implement the gram matrix, maybe I will use python or tensor flow. I think both is ok.\nThx a lot, I get the idea indeed and maybe I will try. Same as u, I also think that gram matrix can help to improve the identification model.\nActually, now my model gets about 100 acc both in train and val, which means the model is hard to train and learn anything new, but test is not so good as val, still a big gap. So I want find some features from the image and the gram matrix u mention actually inspire me.",
    "269765": "I am happy to hear that. Go ahead and please share with us any improvement in your results. Good Luck!",
    "269843": "100 percent accuracy on validation is increadible. I couldn't go beyond 97.8 percent. May I ask you about your method? For example, How did you choose your validation set? How many samples are in it? and perhaps which architecture did you use?",
    "271001": "The architecture I use is InceptionV3, In val data, I just use all the manic op on it, and crop the center of the img. Although 100 percent acc, but the test acc is just 85.9%, a big gap.",
    "271023": "That's great. I have the same problem.",
    "271847": "So I try to analyse the data in order to find some rules, but I find it is hard to do. Unlike the object, like cat dot and product, we can find some obvious features, in this competition, the features may be some filters, like focal or cfa, but it is hard to analyse it from images. Anyone can provide some ideas?"
  },
  "source": "meta"
}