{
  "id": 298430,
  "title": "Computer vision best practises",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/298430",
  "author_name": "",
  "post_date": "2022-01-02T20:57:20.851978300Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>In my deep learning/machine learning journey so far I have come across a few situations which usually make prediction quite daunting. Perhaps some of these issues may have already been discussed earlier and if so, kindly point me to the right article. If what I mentioned is entirely new as well I would love to know what the lot of you think and perhaps some best practises you stick to that has proven to work time and time again. </p>\n<ol>\n<li><p>In some image classification tasks, there are instances when the dataset contains images of varied sizes. Seeing as the images have to have the same dimensions (height and width) for the machine learning task, how does one determine the appropriate image size to work with?</p></li>\n<li><p>Again in some image classification tasks (which I have encountered mutliple times) parts of the images seem blurry and hard to make out even for the naked eye. In cases like that, is it a advisable to discard the image entirely or are they some image processing techniques that can improve the image quality for use?</p></li>\n<li><p>This has to do with hyper-parameter tuning. Is the entire process of selecting hyperparameters based on a try and error process? With the numerous hyper-parameters present with some being developed day in and day out, is there not a way to narrow down the right ones to use?</p></li>\n</ol>\n<p>Thanks in advance.</p>",
  "messages": [
    {
      "id": "1636407",
      "postDate": "01/02/2022 20:57:20",
      "content": "<p>In my deep learning/machine learning journey so far I have come across a few situations which usually make prediction quite daunting. Perhaps some of these issues may have already been discussed earlier and if so, kindly point me to the right article. If what I mentioned is entirely new as well I would love to know what the lot of you think and perhaps some best practises you stick to that has proven to work time and time again. </p>\n<ol>\n<li><p>In some image classification tasks, there are instances when the dataset contains images of varied sizes. Seeing as the images have to have the same dimensions (height and width) for the machine learning task, how does one determine the appropriate image size to work with?</p></li>\n<li><p>Again in some image classification tasks (which I have encountered mutliple times) parts of the images seem blurry and hard to make out even for the naked eye. In cases like that, is it a advisable to discard the image entirely or are they some image processing techniques that can improve the image quality for use?</p></li>\n<li><p>This has to do with hyper-parameter tuning. Is the entire process of selecting hyperparameters based on a try and error process? With the numerous hyper-parameters present with some being developed day in and day out, is there not a way to narrow down the right ones to use?</p></li>\n</ol>\n<p>Thanks in advance.</p>",
      "rawMarkdown": "In my deep learning/machine learning journey so far I have come across a few situations which usually make prediction quite daunting. Perhaps some of these issues may have already been discussed earlier and if so, kindly point me to the right article. If what I mentioned is entirely new as well I would love to know what the lot of you think and perhaps some best practises you stick to that has proven to work time and time again. \n\n1. In some image classification tasks, there are instances when the dataset contains images of varied sizes. Seeing as the images have to have the same dimensions (height and width) for the machine learning task, how does one determine the appropriate image size to work with?\n\n2. Again in some image classification tasks (which I have encountered mutliple times) parts of the images seem blurry and hard to make out even for the naked eye. In cases like that, is it a advisable to discard the image entirely or are they some image processing techniques that can improve the image quality for use?\n\n3. This has to do with hyper-parameter tuning. Is the entire process of selecting hyperparameters based on a try and error process? With the numerous hyper-parameters present with some being developed day in and day out, is there not a way to narrow down the right ones to use?\n\nThanks in advance.",
      "votes": null
    },
    {
      "id": "1638257",
      "postDate": "01/04/2022 15:12:46",
      "content": "<p>Hey, my answers are not perfect as I am a novice too, but this is how I would look at it:<br>\n1) Look for a common size pattern, or select a size that is a bit lower than what the common image size range is and then resize all your images to that size while loading the data. Better yet, you can use a Data Loader (check Image Data Generator), which will have arguments to resize all your images. <br>\n2) I think there are a lot of details that may not be apparent to us, but might get picked up by the model. We actually introduce some noise on purpose, so that the model generalizes well (Image Augmentation). But if you are sure that there is a problem with the Image, like say for digit classification your 1 looks like a 7, then it would make sense to remove those types of images.<br>\n3) You can use transfer learning for most of the tasks, where you can use a pre-trained model(or only the architecture).<br>\nWhen I used a Custom CNN, I try to use an architecture that I have used previously and make some changes based on the complexity(perceived complexity) of the problem.</p>",
      "rawMarkdown": "Hey, my answers are not perfect as I am a novice too, but this is how I would look at it:\n1) Look for a common size pattern, or select a size that is a bit lower than what the common image size range is and then resize all your images to that size while loading the data. Better yet, you can use a Data Loader (check Image Data Generator), which will have arguments to resize all your images. \n2) I think there are a lot of details that may not be apparent to us, but might get picked up by the model. We actually introduce some noise on purpose, so that the model generalizes well (Image Augmentation). But if you are sure that there is a problem with the Image, like say for digit classification your 1 looks like a 7, then it would make sense to remove those types of images.\n3) You can use transfer learning for most of the tasks, where you can use a pre-trained model(or only the architecture).\nWhen I used a Custom CNN, I try to use an architecture that I have used previously and make some changes based on the complexity(perceived complexity) of the problem.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1638257,
      "author_name": "virajkadam",
      "author_url": "",
      "post_date": "01/04/2022 15:12:46",
      "content": "<p>Hey, my answers are not perfect as I am a novice too, but this is how I would look at it:<br>\n1) Look for a common size pattern, or select a size that is a bit lower than what the common image size range is and then resize all your images to that size while loading the data. Better yet, you can use a Data Loader (check Image Data Generator), which will have arguments to resize all your images. <br>\n2) I think there are a lot of details that may not be apparent to us, but might get picked up by the model. We actually introduce some noise on purpose, so that the model generalizes well (Image Augmentation). But if you are sure that there is a problem with the Image, like say for digit classification your 1 looks like a 7, then it would make sense to remove those types of images.<br>\n3) You can use transfer learning for most of the tasks, where you can use a pre-trained model(or only the architecture).<br>\nWhen I used a Custom CNN, I try to use an architecture that I have used previously and make some changes based on the complexity(perceived complexity) of the problem.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1636407": "In my deep learning/machine learning journey so far I have come across a few situations which usually make prediction quite daunting. Perhaps some of these issues may have already been discussed earlier and if so, kindly point me to the right article. If what I mentioned is entirely new as well I would love to know what the lot of you think and perhaps some best practises you stick to that has proven to work time and time again. \n\n1. In some image classification tasks, there are instances when the dataset contains images of varied sizes. Seeing as the images have to have the same dimensions (height and width) for the machine learning task, how does one determine the appropriate image size to work with?\n\n2. Again in some image classification tasks (which I have encountered mutliple times) parts of the images seem blurry and hard to make out even for the naked eye. In cases like that, is it a advisable to discard the image entirely or are they some image processing techniques that can improve the image quality for use?\n\n3. This has to do with hyper-parameter tuning. Is the entire process of selecting hyperparameters based on a try and error process? With the numerous hyper-parameters present with some being developed day in and day out, is there not a way to narrow down the right ones to use?\n\nThanks in advance.",
    "1638257": "Hey, my answers are not perfect as I am a novice too, but this is how I would look at it:\n1) Look for a common size pattern, or select a size that is a bit lower than what the common image size range is and then resize all your images to that size while loading the data. Better yet, you can use a Data Loader (check Image Data Generator), which will have arguments to resize all your images. \n2) I think there are a lot of details that may not be apparent to us, but might get picked up by the model. We actually introduce some noise on purpose, so that the model generalizes well (Image Augmentation). But if you are sure that there is a problem with the Image, like say for digit classification your 1 looks like a 7, then it would make sense to remove those types of images.\n3) You can use transfer learning for most of the tasks, where you can use a pre-trained model(or only the architecture).\nWhen I used a Custom CNN, I try to use an architecture that I have used previously and make some changes based on the complexity(perceived complexity) of the problem."
  },
  "source": "meta"
}