{"action":"created","issue":{"url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/34","repository_url":"https://api.github.com/repos/fizyr/keras-maskrcnn","labels_url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/34/comments","events_url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/34/events","html_url":"https://github.com/fizyr/keras-maskrcnn/pull/34","id":370540425,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMTkzMDk0","number":34,"title":"Optimize architecture","user":{"login":"hgaiser","id":716138,"node_id":"MDQ6VXNlcjcxNjEzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/716138?v=4","gravatar_id":"","url":"https://api.github.com/users/hgaiser","html_url":"https://github.com/hgaiser","followers_url":"https://api.github.com/users/hgaiser/followers","following_url":"https://api.github.com/users/hgaiser/following{/other_user}","gists_url":"https://api.github.com/users/hgaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/hgaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgaiser/subscriptions","organizations_url":"https://api.github.com/users/hgaiser/orgs","repos_url":"https://api.github.com/users/hgaiser/repos","events_url":"https://api.github.com/users/hgaiser/events{/privacy}","received_events_url":"https://api.github.com/users/hgaiser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-16T10:18:50Z","updated_at":"2018-10-16T13:30:51Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/fizyr/keras-maskrcnn/pulls/34","html_url":"https://github.com/fizyr/keras-maskrcnn/pull/34","diff_url":"https://github.com/fizyr/keras-maskrcnn/pull/34.diff","patch_url":"https://github.com/fizyr/keras-maskrcnn/pull/34.patch"},"body":"This PR changes the architecture to match more closely the architecture as described in the original paper. Basically, the main difference is that before we were estimating the masks on the top 1k anchors, whereas now we estimate the masks on the top 100 detections (so NMS is applied already). This is in correspondence with their paper:\r\n\r\n```\r\nThe  mask  branch  is  then applied to the highest scoring 100 detection boxes.\r\n```\r\n\r\nEffectively this means processing times go down slightly (in my tests, from roughly 180msec to 150msec) and the memory usage goes down a lot. Before it was using roughly 12gb of memory and complaining that it couldn't acquire enough, now it uses 8.5gb of memory without complaints.\r\n\r\nOld models can be updated as follows:\r\n\r\n```python\r\nfrom keras_maskrcnn.models import backbone\r\nmodel = backbone('resnet50').maskrcnn(<num_classes>)\r\nmodel.load_weights(\"/path/to/old/model.h5\", by_name=True)\r\nmodel.save(\"/path/to/updated/model.h5\")\r\n```\r\n\r\nThis change doesn't affect weights, so theoretically old models work comparable to new models. However, I believe we should bump the version of this package after merging this PR (we should do the same for retinanet btw)."},"comment":{"url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/comments/430238096","html_url":"https://github.com/fizyr/keras-maskrcnn/pull/34#issuecomment-430238096","issue_url":"https://api.github.com/repos/fizyr/keras-maskrcnn/issues/34","id":430238096,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDIzODA5Ng==","user":{"login":"hgaiser","id":716138,"node_id":"MDQ6VXNlcjcxNjEzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/716138?v=4","gravatar_id":"","url":"https://api.github.com/users/hgaiser","html_url":"https://github.com/hgaiser","followers_url":"https://api.github.com/users/hgaiser/followers","following_url":"https://api.github.com/users/hgaiser/following{/other_user}","gists_url":"https://api.github.com/users/hgaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/hgaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgaiser/subscriptions","organizations_url":"https://api.github.com/users/hgaiser/orgs","repos_url":"https://api.github.com/users/hgaiser/repos","events_url":"https://api.github.com/users/hgaiser/events{/privacy}","received_events_url":"https://api.github.com/users/hgaiser/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T13:30:51Z","updated_at":"2018-10-16T13:30:51Z","author_association":"MEMBER","body":"> Everything seems fine, did not expected this boost in accuracy, but is nice to have it!\r\n\r\nMe neither, but more likely it is just caused by restarting the training process.. :)"}}
{"actor":{"display_login":"hgaiser"}}