{
  "id": 154898,
  "title": "Combining Ycbcr Conversion with tf.data.Dataset",
  "url": "/competitions/alaska2-image-steganalysis/discussion/154898",
  "author_name": "Aziz_Belaweid",
  "post_date": "2020-05-30T10:23:21.126000",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>So I'm trying to use a function that reads images from jpg to YcbCr format and I want to use this in my tf.data.Dataset pipeline but I'm having a lot of trouble since the pipeline only takes tf operations I'm trying to use this :\nfunc = tf.py_function(JPEGdecompressYCbCr,[file],[tf.float16,tf.float16,3])\n but it's not working. is there anyone who did it ? Thanks in advance !</p>",
  "messages": [
    {
      "id": 867467,
      "postDate": "2020-05-30T10:23:21.127Z",
      "content": "<p>So I'm trying to use a function that reads images from jpg to YcbCr format and I want to use this in my tf.data.Dataset pipeline but I'm having a lot of trouble since the pipeline only takes tf operations I'm trying to use this :\nfunc = tf.py_function(JPEGdecompressYCbCr,[file],[tf.float16,tf.float16,3])\n but it's not working. is there anyone who did it ? Thanks in advance !</p>",
      "rawMarkdown": "So I'm trying to use a function that reads images from jpg to YcbCr format and I want to use this in my tf.data.Dataset pipeline but I'm having a lot of trouble since the pipeline only takes tf operations I'm trying to use this :\nfunc = tf.py_function(JPEGdecompressYCbCr,[file],[tf.float16,tf.float16,3])\n but it's not working. is there anyone who did it ? Thanks in advance !",
      "votes": 2
    },
    {
      "id": 867785,
      "postDate": "2020-05-30T16:10:50.077Z",
      "content": "<p>maybe this works: <a href=\"https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv\">https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv</a> <strong>tf.image.rgb_to_yuv</strong></p>",
      "rawMarkdown": "maybe this works: https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv **tf.image.rgb_to_yuv**",
      "votes": -1
    },
    {
      "id": 869682,
      "postDate": "2020-06-01T07:43:42.817Z",
      "content": "<p>Maybe you should use JPEGdecompressYCbCr decode jpg file first ,then combine these results into tfrecord file.</p>",
      "rawMarkdown": "Maybe you should use JPEGdecompressYCbCr decode jpg file first ,then combine these results into tfrecord file.",
      "replies": [
        {
          "id": 869720,
          "postDate": "2020-06-01T08:36:46.713Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 868442,
      "postDate": "2020-05-31T08:32:25.690Z",
      "content": "<p>You may want to read Remi's post if you are doing a two step conversion RBG-YCbCr -\n<a href=\"https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167\">https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167</a></p>\n\n<p>Not sure that is what you are proposing but just in case.   </p>",
      "rawMarkdown": "You may want to read Remi's post if you are doing a two step conversion RBG-YCbCr -\nhttps://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167\n\nNot sure that is what you are proposing but just in case.   ",
      "replies": [
        {
          "id": 870750,
          "postDate": "2020-06-01T22:04:02.083Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 867785,
      "author_name": "Nanashi",
      "author_url": "",
      "post_date": "2020-05-30T16:10:50.077000",
      "content": "<p>maybe this works: <a href=\"https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv\">https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv</a> <strong>tf.image.rgb_to_yuv</strong></p>",
      "votes": -1,
      "replies": []
    },
    {
      "id": 869682,
      "author_name": "zheng lv",
      "author_url": "",
      "post_date": "2020-06-01T07:43:42.817000",
      "content": "<p>Maybe you should use JPEGdecompressYCbCr decode jpg file first ,then combine these results into tfrecord file.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 869720,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-06-01T08:36:46.713000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 868442,
      "author_name": "something4kag",
      "author_url": "",
      "post_date": "2020-05-31T08:32:25.690000",
      "content": "<p>You may want to read Remi's post if you are doing a two step conversion RBG-YCbCr -\n<a href=\"https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167\">https://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167</a></p>\n\n<p>Not sure that is what you are proposing but just in case.   </p>",
      "votes": 0,
      "replies": [
        {
          "id": 870750,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-06-01T22:04:02.083000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "867467": "So I'm trying to use a function that reads images from jpg to YcbCr format and I want to use this in my tf.data.Dataset pipeline but I'm having a lot of trouble since the pipeline only takes tf operations I'm trying to use this :\nfunc = tf.py_function(JPEGdecompressYCbCr,[file],[tf.float16,tf.float16,3])\n but it's not working. is there anyone who did it ? Thanks in advance !",
    "867785": "maybe this works: https://www.tensorflow.org/api_docs/python/tf/image/rgb_to_yuv **tf.image.rgb_to_yuv**",
    "869682": "Maybe you should use JPEGdecompressYCbCr decode jpg file first ,then combine these results into tfrecord file.",
    "868442": "You may want to read Remi's post if you are doing a two step conversion RBG-YCbCr -\nhttps://www.kaggle.com/c/alaska2-image-steganalysis/discussion/150359#845167\n\nNot sure that is what you are proposing but just in case.   "
  }
}