{"action":"created","issue":{"url":"https://api.github.com/repos/cocodataset/cocoapi/issues/36","repository_url":"https://api.github.com/repos/cocodataset/cocoapi","labels_url":"https://api.github.com/repos/cocodataset/cocoapi/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/cocodataset/cocoapi/issues/36/comments","events_url":"https://api.github.com/repos/cocodataset/cocoapi/issues/36/events","html_url":"https://github.com/cocodataset/cocoapi/issues/36","id":207217759,"number":36,"title":"\"area\" in annotations","user":{"login":"nico00","id":24900540,"avatar_url":"https://avatars2.githubusercontent.com/u/24900540?v=4","gravatar_id":"","url":"https://api.github.com/users/nico00","html_url":"https://github.com/nico00","followers_url":"https://api.github.com/users/nico00/followers","following_url":"https://api.github.com/users/nico00/following{/other_user}","gists_url":"https://api.github.com/users/nico00/gists{/gist_id}","starred_url":"https://api.github.com/users/nico00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nico00/subscriptions","organizations_url":"https://api.github.com/users/nico00/orgs","repos_url":"https://api.github.com/users/nico00/repos","events_url":"https://api.github.com/users/nico00/events{/privacy}","received_events_url":"https://api.github.com/users/nico00/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-02-13T13:25:39Z","updated_at":"2018-04-27T07:16:39Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm creating my own dataset but writing the annotations I've found a field called \"area\" that I didn't understand.\r\nAccording to my analysis, it doesn't refer to:\r\n- image area (width x height)\r\n- bounding box area (width x height)\r\n- segmentation area\r\n\r\nAny idea about how I should calculate it ?\r\nThanks\r\nNico\r\n"},"comment":{"url":"https://api.github.com/repos/cocodataset/cocoapi/issues/comments/384886710","html_url":"https://github.com/cocodataset/cocoapi/issues/36#issuecomment-384886710","issue_url":"https://api.github.com/repos/cocodataset/cocoapi/issues/36","id":384886710,"user":{"login":"manketon","id":33149316,"avatar_url":"https://avatars0.githubusercontent.com/u/33149316?v=4","gravatar_id":"","url":"https://api.github.com/users/manketon","html_url":"https://github.com/manketon","followers_url":"https://api.github.com/users/manketon/followers","following_url":"https://api.github.com/users/manketon/following{/other_user}","gists_url":"https://api.github.com/users/manketon/gists{/gist_id}","starred_url":"https://api.github.com/users/manketon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manketon/subscriptions","organizations_url":"https://api.github.com/users/manketon/orgs","repos_url":"https://api.github.com/users/manketon/repos","events_url":"https://api.github.com/users/manketon/events{/privacy}","received_events_url":"https://api.github.com/users/manketon/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T07:16:39Z","updated_at":"2018-04-27T07:16:39Z","author_association":"NONE","body":"@tylin @hazirbas @nico00 \r\n   I have the data as following:\r\n{\r\n\t\"segmentation\": [\r\n\t\t[312.29, 562.89, 402.25, 511.49, 400.96, 425.38, 398.39, 372.69, 388.11, 332.85, 318.71, 325.14, 295.58, 305.86, 269.88, 314.86, 258.31, 337.99, 217.19, 321.29, 182.49, 343.13, 141.37, 348.27, 132.37, 358.55, 159.36, 377.83, 116.95, 421.53, 167.07, 499.92, 232.61, 560.32, 300.72, 571.89]\r\n\t],\r\n\t\"area\": 54652.9556,\r\n\t\"iscrowd\": 0,\r\n\t\"image_id\": 480023,\r\n\t\"bbox\": [116.95, 305.86, 285.3, 266.03],\r\n\t\"category_id\": 58,\r\n\t\"id\": 86\r\n}\r\n How can I calculate the area with maks.py？ \r\nMy code:\r\nbimask = np.array(segmentation, dtype = np.uint8, order = 'F')\r\nprint(\"bimask:\", bimask)\r\nrleObjs = maskUtils.encode(bimask)\r\nprint(\"rleObjs:\", rleObjs)\r\narea = maskUtils.area(rleObjs)\r\nprint(\"area:\", area)\r\nBut the area is 18.  How can I correct it ? Thank you.\r\n\r\n\r\n"}}
{"actor":{"display_login":"manketon"}}