{
  "id": 305384,
  "title": "Albumentations (Augmentation) don't work with YOLOV5 on Colab (by default)",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/305384",
  "author_name": "",
  "post_date": "2022-02-05T05:22:31.255870300Z",
  "votes": 7,
  "comment_count": 5,
  "views": 0,
  "content": "<p>If you have been using colab to train a YOLOV5 model, you may have noticed this during training:</p>\n<p><code>albumentations: version 1.0.3 required by YOLOv5, but version 0.1.12 is currently installed</code></p>\n<p>Colab by default has 'albumentations==0.1.12'. You must update albumentations (and its dependencies) with the following code:</p>\n<p><code>!pip install albumentations==1.0.3</code><br>\n<code>!pip uninstall opencv-python-headless==4.5.5.62</code><br>\n<code>!pip install opencv-python-headless==4.5.2.52</code></p>\n<p><strong>Put this at the top of your notebook so that the correct version is installed with requirements.txt</strong></p>",
  "messages": [
    {
      "id": "1676578",
      "postDate": "02/05/2022 05:22:31",
      "content": "<p>If you have been using colab to train a YOLOV5 model, you may have noticed this during training:</p>\n<p><code>albumentations: version 1.0.3 required by YOLOv5, but version 0.1.12 is currently installed</code></p>\n<p>Colab by default has 'albumentations==0.1.12'. You must update albumentations (and its dependencies) with the following code:</p>\n<p><code>!pip install albumentations==1.0.3</code><br>\n<code>!pip uninstall opencv-python-headless==4.5.5.62</code><br>\n<code>!pip install opencv-python-headless==4.5.2.52</code></p>\n<p><strong>Put this at the top of your notebook so that the correct version is installed with requirements.txt</strong></p>",
      "rawMarkdown": "If you have been using colab to train a YOLOV5 model, you may have noticed this during training:\n\n`albumentations: version 1.0.3 required by YOLOv5, but version 0.1.12 is currently installed`\n\nColab by default has 'albumentations==0.1.12'. You must update albumentations (and its dependencies) with the following code:\n\n`!pip install albumentations==1.0.3`\n`!pip uninstall opencv-python-headless==4.5.5.62`\n`!pip install opencv-python-headless==4.5.2.52`\n\n**Put this at the top of your notebook so that the correct version is installed with requirements.txt**",
      "votes": null
    },
    {
      "id": "1677748",
      "postDate": "02/06/2022 00:40:59",
      "content": "<p>Yes. You may have noticed in my notebook: <a href=\"https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations\" target=\"_blank\">https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations</a> , I have commented out the line that checks Albumentations v1.0.3 so it no longer checks the version. </p>\n<p>After removing the version restriction, you should be free to use the latest version of Albumentations (1.1.0).</p>",
      "rawMarkdown": "Yes. You may have noticed in my notebook: https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations , I have commented out the line that checks Albumentations v1.0.3 so it no longer checks the version. \n\nAfter removing the version restriction, you should be free to use the latest version of Albumentations (1.1.0).",
      "votes": null
    },
    {
      "id": "1677760",
      "postDate": "02/06/2022 01:06:43",
      "content": "<p>Thanks for the info. <br>\nIt's very annoying that the OpenCV package will be broken after updating the Albumentations package in Colab. But this workaround saves our time.</p>",
      "rawMarkdown": "Thanks for the info. \nIt's very annoying that the OpenCV package will be broken after updating the Albumentations package in Colab. But this workaround saves our time.",
      "votes": null
    },
    {
      "id": "1678762",
      "postDate": "02/06/2022 19:10:52",
      "content": "<p>ah, so commenting out that line solves the problem?</p>",
      "rawMarkdown": "ah, so commenting out that line solves the problem?",
      "votes": null
    },
    {
      "id": "1679112",
      "postDate": "02/07/2022 01:54:31",
      "content": "<p>Yes, although obviously I would use version &gt;=1.0.3</p>",
      "rawMarkdown": "Yes, although obviously I would use version >=1.0.3",
      "votes": null
    },
    {
      "id": "1679954",
      "postDate": "02/07/2022 13:49:57",
      "content": "<p>thank for sharing.  It seems that training with Albumentations would boost the model performance.</p>",
      "rawMarkdown": "thank for sharing.  It seems that training with Albumentations would boost the model performance.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1677748,
      "author_name": "alexchwong",
      "author_url": "",
      "post_date": "02/06/2022 00:40:59",
      "content": "<p>Yes. You may have noticed in my notebook: <a href=\"https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations\" target=\"_blank\">https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations</a> , I have commented out the line that checks Albumentations v1.0.3 so it no longer checks the version. </p>\n<p>After removing the version restriction, you should be free to use the latest version of Albumentations (1.1.0).</p>",
      "votes": null,
      "replies": [
        {
          "id": 1678762,
          "author_name": "kennyxie",
          "author_url": "",
          "post_date": "02/06/2022 19:10:52",
          "content": "<p>ah, so commenting out that line solves the problem?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1679112,
          "author_name": "alexchwong",
          "author_url": "",
          "post_date": "02/07/2022 01:54:31",
          "content": "<p>Yes, although obviously I would use version &gt;=1.0.3</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1677760,
      "author_name": "kuohsintu",
      "author_url": "",
      "post_date": "02/06/2022 01:06:43",
      "content": "<p>Thanks for the info. <br>\nIt's very annoying that the OpenCV package will be broken after updating the Albumentations package in Colab. But this workaround saves our time.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1679954,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "02/07/2022 13:49:57",
      "content": "<p>thank for sharing.  It seems that training with Albumentations would boost the model performance.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1676578": "If you have been using colab to train a YOLOV5 model, you may have noticed this during training:\n\n`albumentations: version 1.0.3 required by YOLOv5, but version 0.1.12 is currently installed`\n\nColab by default has 'albumentations==0.1.12'. You must update albumentations (and its dependencies) with the following code:\n\n`!pip install albumentations==1.0.3`\n`!pip uninstall opencv-python-headless==4.5.5.62`\n`!pip install opencv-python-headless==4.5.2.52`\n\n**Put this at the top of your notebook so that the correct version is installed with requirements.txt**",
    "1677748": "Yes. You may have noticed in my notebook: https://www.kaggle.com/alexchwong/yolov5-training-with-albumentations , I have commented out the line that checks Albumentations v1.0.3 so it no longer checks the version. \n\nAfter removing the version restriction, you should be free to use the latest version of Albumentations (1.1.0).",
    "1677760": "Thanks for the info. \nIt's very annoying that the OpenCV package will be broken after updating the Albumentations package in Colab. But this workaround saves our time.",
    "1678762": "ah, so commenting out that line solves the problem?",
    "1679112": "Yes, although obviously I would use version >=1.0.3",
    "1679954": "thank for sharing.  It seems that training with Albumentations would boost the model performance."
  },
  "source": "meta"
}