{
  "id": 134216,
  "title": "Paperswithcode for deepfake",
  "url": "/competitions/deepfake-detection-challenge/discussion/134216",
  "author_name": "",
  "post_date": "2020-03-06T16:59:11.775760Z",
  "votes": 6,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Paperswithcode is a great website to get the code associated with articles. </p>\n\n<p>Search: <a href=\"https://paperswithcode.com/search?q_meta=&amp;q=deepfake\">https://paperswithcode.com/search?q_meta=&amp;q=deepfake</a> </p>\n\n<p>Best (matching) results (no order): </p>\n\n<ul>\n<li><a href=\"https://github.com/HongguLiu/MesoNet-Pytorch\">https://github.com/HongguLiu/MesoNet-Pytorch</a> </li>\n<li><a href=\"https://github.com/ondyari/FaceForensics\">https://github.com/ondyari/FaceForensics</a> </li>\n<li><a href=\"https://github.com/ApGa/adversarial_deepfakes\">https://github.com/ApGa/adversarial_deepfakes</a> </li>\n<li><a href=\"https://github.com/cc-hpc-itwm/DeepFakeDetection\">https://github.com/cc-hpc-itwm/DeepFakeDetection</a> </li>\n</ul>",
  "messages": [
    {
      "id": "765475",
      "postDate": "03/06/2020 16:59:11",
      "content": "<p>Paperswithcode is a great website to get the code associated with articles. </p>\n\n<p>Search: <a href=\"https://paperswithcode.com/search?q_meta=&amp;q=deepfake\">https://paperswithcode.com/search?q_meta=&amp;q=deepfake</a> </p>\n\n<p>Best (matching) results (no order): </p>\n\n<ul>\n<li><a href=\"https://github.com/HongguLiu/MesoNet-Pytorch\">https://github.com/HongguLiu/MesoNet-Pytorch</a> </li>\n<li><a href=\"https://github.com/ondyari/FaceForensics\">https://github.com/ondyari/FaceForensics</a> </li>\n<li><a href=\"https://github.com/ApGa/adversarial_deepfakes\">https://github.com/ApGa/adversarial_deepfakes</a> </li>\n<li><a href=\"https://github.com/cc-hpc-itwm/DeepFakeDetection\">https://github.com/cc-hpc-itwm/DeepFakeDetection</a> </li>\n</ul>",
      "rawMarkdown": "Paperswithcode is a great website to get the code associated with articles. \n\nSearch: https://paperswithcode.com/search?q_meta=&amp;q=deepfake \n\nBest (matching) results (no order): \n\n- https://github.com/HongguLiu/MesoNet-Pytorch \n- https://github.com/ondyari/FaceForensics \n- https://github.com/ApGa/adversarial_deepfakes \n- https://github.com/cc-hpc-itwm/DeepFakeDetection",
      "votes": null
    },
    {
      "id": "765479",
      "postDate": "03/06/2020 17:03:52",
      "content": "<p>One interesting idea that caught my attention: computing azimuthally averaged radial profile from the <strong>Unmasking DeepFake with simple Features</strong> paper. </p>\n\n<p>Here is the function (source: <a href=\"https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py\">https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py</a>):  </p>\n\n<p>```\nimport numpy as np</p>\n\n<p>def azimuthalAverage(image, center=None):\n    \"\"\"\n    Calculate the azimuthally averaged radial profile.\n    image - The 2D image\n    center - The [x,y] pixel coordinates used as the center. The default is \n             None, which then uses the center of the image (including \n             fracitonal pixels).</p>\n\n<pre><code>\"\"\"\n# Calculate the indices from the image\ny, x = np.indices(image.shape)\n\nif not center:\n    center = np.array([(x.max()-x.min())/2.0, (y.max()-y.min())/2.0])\n\nr = np.hypot(x - center[0], y - center[1])\n\n# Get sorted radii\nind = np.argsort(r.flat)\nr_sorted = r.flat[ind]\ni_sorted = image.flat[ind]\n\n# Get the integer part of the radii (bin size = 1)\nr_int = r_sorted.astype(int)\n\n# Find all pixels that fall within each radial bin.\ndeltar = r_int[1:] - r_int[:-1]  # Assumes all radii represented\nrind = np.where(deltar)[0]       # location of changed radius\nnr = rind[1:] - rind[:-1]        # number of radius bin\n\n# Cumulative sum to figure out sums for each radius bin\ncsim = np.cumsum(i_sorted, dtype=float)\ntbin = csim[rind[1:]] - csim[rind[:-1]]\n\nradial_prof = tbin / nr\n\nreturn radial_prof\n</code></pre>\n\n<p>```</p>",
      "rawMarkdown": "One interesting idea that caught my attention: computing azimuthally averaged radial profile from the **Unmasking DeepFake with simple Features** paper. \n\nHere is the function (source: https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py):  \n\n```\nimport numpy as np\n\ndef azimuthalAverage(image, center=None):\n    \"\"\"\n    Calculate the azimuthally averaged radial profile.\n    image - The 2D image\n    center - The [x,y] pixel coordinates used as the center. The default is \n             None, which then uses the center of the image (including \n             fracitonal pixels).\n    \n    \"\"\"\n    # Calculate the indices from the image\n    y, x = np.indices(image.shape)\n\n    if not center:\n        center = np.array([(x.max()-x.min())/2.0, (y.max()-y.min())/2.0])\n\n    r = np.hypot(x - center[0], y - center[1])\n\n    # Get sorted radii\n    ind = np.argsort(r.flat)\n    r_sorted = r.flat[ind]\n    i_sorted = image.flat[ind]\n\n    # Get the integer part of the radii (bin size = 1)\n    r_int = r_sorted.astype(int)\n\n    # Find all pixels that fall within each radial bin.\n    deltar = r_int[1:] - r_int[:-1]  # Assumes all radii represented\n    rind = np.where(deltar)[0]       # location of changed radius\n    nr = rind[1:] - rind[:-1]        # number of radius bin\n    \n    # Cumulative sum to figure out sums for each radius bin\n    csim = np.cumsum(i_sorted, dtype=float)\n    tbin = csim[rind[1:]] - csim[rind[:-1]]\n\n    radial_prof = tbin / nr\n\n    return radial_prof\n\n```",
      "votes": null
    },
    {
      "id": "768859",
      "postDate": "03/11/2020 09:13:52",
      "content": "<p>I think not very separable with low resolution picture \nBelow is average 10000 image from <a href=\"https://www.kaggle.com/dagnelies/deepfake-faces\">https://www.kaggle.com/dagnelies/deepfake-faces</a>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F0b82c4e15c56ac09e24b3c58831dda75%2F10k_avg.png?generation=1583921611945437&amp;alt=media\" alt=\"\">\nversus facehq (1024 x 1024 resolution)\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F4d429be27df8d5e4a1bcab0d8a08d0c1%2F1khq_avg.png?generation=1583921665784387&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I think not very separable with low resolution picture \nBelow is average 10000 image from https://www.kaggle.com/dagnelies/deepfake-faces\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F0b82c4e15c56ac09e24b3c58831dda75%2F10k_avg.png?generation=1583921611945437&amp;alt=media)\nversus facehq (1024 x 1024 resolution)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F4d429be27df8d5e4a1bcab0d8a08d0c1%2F1khq_avg.png?generation=1583921665784387&amp;alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 765479,
      "author_name": "yassinealouini",
      "author_url": "",
      "post_date": "03/06/2020 17:03:52",
      "content": "<p>One interesting idea that caught my attention: computing azimuthally averaged radial profile from the <strong>Unmasking DeepFake with simple Features</strong> paper. </p>\n\n<p>Here is the function (source: <a href=\"https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py\">https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py</a>):  </p>\n\n<p>```\nimport numpy as np</p>\n\n<p>def azimuthalAverage(image, center=None):\n    \"\"\"\n    Calculate the azimuthally averaged radial profile.\n    image - The 2D image\n    center - The [x,y] pixel coordinates used as the center. The default is \n             None, which then uses the center of the image (including \n             fracitonal pixels).</p>\n\n<pre><code>\"\"\"\n# Calculate the indices from the image\ny, x = np.indices(image.shape)\n\nif not center:\n    center = np.array([(x.max()-x.min())/2.0, (y.max()-y.min())/2.0])\n\nr = np.hypot(x - center[0], y - center[1])\n\n# Get sorted radii\nind = np.argsort(r.flat)\nr_sorted = r.flat[ind]\ni_sorted = image.flat[ind]\n\n# Get the integer part of the radii (bin size = 1)\nr_int = r_sorted.astype(int)\n\n# Find all pixels that fall within each radial bin.\ndeltar = r_int[1:] - r_int[:-1]  # Assumes all radii represented\nrind = np.where(deltar)[0]       # location of changed radius\nnr = rind[1:] - rind[:-1]        # number of radius bin\n\n# Cumulative sum to figure out sums for each radius bin\ncsim = np.cumsum(i_sorted, dtype=float)\ntbin = csim[rind[1:]] - csim[rind[:-1]]\n\nradial_prof = tbin / nr\n\nreturn radial_prof\n</code></pre>\n\n<p>```</p>",
      "votes": null,
      "replies": [
        {
          "id": 768859,
          "author_name": "nyleve",
          "author_url": "",
          "post_date": "03/11/2020 09:13:52",
          "content": "<p>I think not very separable with low resolution picture \nBelow is average 10000 image from <a href=\"https://www.kaggle.com/dagnelies/deepfake-faces\">https://www.kaggle.com/dagnelies/deepfake-faces</a>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F0b82c4e15c56ac09e24b3c58831dda75%2F10k_avg.png?generation=1583921611945437&amp;alt=media\" alt=\"\">\nversus facehq (1024 x 1024 resolution)\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F4d429be27df8d5e4a1bcab0d8a08d0c1%2F1khq_avg.png?generation=1583921665784387&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "765475": "Paperswithcode is a great website to get the code associated with articles. \n\nSearch: https://paperswithcode.com/search?q_meta=&amp;q=deepfake \n\nBest (matching) results (no order): \n\n- https://github.com/HongguLiu/MesoNet-Pytorch \n- https://github.com/ondyari/FaceForensics \n- https://github.com/ApGa/adversarial_deepfakes \n- https://github.com/cc-hpc-itwm/DeepFakeDetection",
    "765479": "One interesting idea that caught my attention: computing azimuthally averaged radial profile from the **Unmasking DeepFake with simple Features** paper. \n\nHere is the function (source: https://github.com/cc-hpc-itwm/DeepFakeDetection/blob/master/Experiments_DeepFakeDetection/radialProfile.py):  \n\n```\nimport numpy as np\n\ndef azimuthalAverage(image, center=None):\n    \"\"\"\n    Calculate the azimuthally averaged radial profile.\n    image - The 2D image\n    center - The [x,y] pixel coordinates used as the center. The default is \n             None, which then uses the center of the image (including \n             fracitonal pixels).\n    \n    \"\"\"\n    # Calculate the indices from the image\n    y, x = np.indices(image.shape)\n\n    if not center:\n        center = np.array([(x.max()-x.min())/2.0, (y.max()-y.min())/2.0])\n\n    r = np.hypot(x - center[0], y - center[1])\n\n    # Get sorted radii\n    ind = np.argsort(r.flat)\n    r_sorted = r.flat[ind]\n    i_sorted = image.flat[ind]\n\n    # Get the integer part of the radii (bin size = 1)\n    r_int = r_sorted.astype(int)\n\n    # Find all pixels that fall within each radial bin.\n    deltar = r_int[1:] - r_int[:-1]  # Assumes all radii represented\n    rind = np.where(deltar)[0]       # location of changed radius\n    nr = rind[1:] - rind[:-1]        # number of radius bin\n    \n    # Cumulative sum to figure out sums for each radius bin\n    csim = np.cumsum(i_sorted, dtype=float)\n    tbin = csim[rind[1:]] - csim[rind[:-1]]\n\n    radial_prof = tbin / nr\n\n    return radial_prof\n\n```",
    "768859": "I think not very separable with low resolution picture \nBelow is average 10000 image from https://www.kaggle.com/dagnelies/deepfake-faces\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F0b82c4e15c56ac09e24b3c58831dda75%2F10k_avg.png?generation=1583921611945437&amp;alt=media)\nversus facehq (1024 x 1024 resolution)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1440116%2F4d429be27df8d5e4a1bcab0d8a08d0c1%2F1khq_avg.png?generation=1583921665784387&amp;alt=media)"
  },
  "source": "meta"
}