{
  "id": 154078,
  "title": "Vertical & Horizontal Flip using Albumentation",
  "url": "/competitions/global-wheat-detection/discussion/154078",
  "author_name": "",
  "post_date": "2020-05-27T05:06:46.134436800Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Just wanted to check:\nWhen I tried albumentation provided vertical and horizontal flip on images, bounding box coordinates returned -ve values. Does albumentation not reflect changes in bounding box coordinates ?</p>\n\n<p>As a workaround, I am translating it by 1024 pixels along dimension basis the manner of flip.</p>",
  "messages": [
    {
      "id": "863134",
      "postDate": "05/27/2020 05:06:46",
      "content": "<p>Just wanted to check:\nWhen I tried albumentation provided vertical and horizontal flip on images, bounding box coordinates returned -ve values. Does albumentation not reflect changes in bounding box coordinates ?</p>\n\n<p>As a workaround, I am translating it by 1024 pixels along dimension basis the manner of flip.</p>",
      "rawMarkdown": "Just wanted to check:\nWhen I tried albumentation provided vertical and horizontal flip on images, bounding box coordinates returned -ve values. Does albumentation not reflect changes in bounding box coordinates ?\n\nAs a workaround, I am translating it by 1024 pixels along dimension basis the manner of flip.",
      "votes": null
    },
    {
      "id": "863139",
      "postDate": "05/27/2020 05:13:22",
      "content": "<p>Albumentation uses its own internal box coordinates. By default,  it is normalized pascal-voc (x_min, y_min, x_max, y_max in 0-1 range). If you'd like to use standard pascal-voc or coco, you have to define <code>bbox_params</code>.</p>\n\n<p><code>\nA.Compose([\n        A.Resize(TARGET_IMAGE_SIZE, TARGET_IMAGE_SIZE),\n        ToTensorV2(p=1.0)\n    ], bbox_params=A.BboxParams(format='pascal_voc', label_fields=['labels']))\n</code></p>",
      "rawMarkdown": "Albumentation uses its own internal box coordinates. By default,  it is normalized pascal-voc (x_min, y_min, x_max, y_max in 0-1 range). If you'd like to use standard pascal-voc or coco, you have to define `bbox_params`.\n\n```\nA.Compose([\n        A.Resize(TARGET_IMAGE_SIZE, TARGET_IMAGE_SIZE),\n        ToTensorV2(p=1.0)\n    ], bbox_params=A.BboxParams(format='pascal_voc', label_fields=['labels']))\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 863139,
      "author_name": "pestipeti",
      "author_url": "",
      "post_date": "05/27/2020 05:13:22",
      "content": "<p>Albumentation uses its own internal box coordinates. By default,  it is normalized pascal-voc (x_min, y_min, x_max, y_max in 0-1 range). If you'd like to use standard pascal-voc or coco, you have to define <code>bbox_params</code>.</p>\n\n<p><code>\nA.Compose([\n        A.Resize(TARGET_IMAGE_SIZE, TARGET_IMAGE_SIZE),\n        ToTensorV2(p=1.0)\n    ], bbox_params=A.BboxParams(format='pascal_voc', label_fields=['labels']))\n</code></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "863134": "Just wanted to check:\nWhen I tried albumentation provided vertical and horizontal flip on images, bounding box coordinates returned -ve values. Does albumentation not reflect changes in bounding box coordinates ?\n\nAs a workaround, I am translating it by 1024 pixels along dimension basis the manner of flip.",
    "863139": "Albumentation uses its own internal box coordinates. By default,  it is normalized pascal-voc (x_min, y_min, x_max, y_max in 0-1 range). If you'd like to use standard pascal-voc or coco, you have to define `bbox_params`.\n\n```\nA.Compose([\n        A.Resize(TARGET_IMAGE_SIZE, TARGET_IMAGE_SIZE),\n        ToTensorV2(p=1.0)\n    ], bbox_params=A.BboxParams(format='pascal_voc', label_fields=['labels']))\n```"
  },
  "source": "meta"
}