{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/gluon-cv/issues/302","repository_url":"https://api.github.com/repos/dmlc/gluon-cv","labels_url":"https://api.github.com/repos/dmlc/gluon-cv/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/gluon-cv/issues/302/comments","events_url":"https://api.github.com/repos/dmlc/gluon-cv/issues/302/events","html_url":"https://github.com/dmlc/gluon-cv/issues/302","id":357926606,"node_id":"MDU6SXNzdWUzNTc5MjY2MDY=","number":302,"title":"anchor.py in ssd.py","user":{"login":"uran209","id":26733796,"node_id":"MDQ6VXNlcjI2NzMzNzk2","avatar_url":"https://avatars1.githubusercontent.com/u/26733796?v=4","gravatar_id":"","url":"https://api.github.com/users/uran209","html_url":"https://github.com/uran209","followers_url":"https://api.github.com/users/uran209/followers","following_url":"https://api.github.com/users/uran209/following{/other_user}","gists_url":"https://api.github.com/users/uran209/gists{/gist_id}","starred_url":"https://api.github.com/users/uran209/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uran209/subscriptions","organizations_url":"https://api.github.com/users/uran209/orgs","repos_url":"https://api.github.com/users/uran209/repos","events_url":"https://api.github.com/users/uran209/events{/privacy}","received_events_url":"https://api.github.com/users/uran209/received_events","type":"User","site_admin":false},"labels":[{"id":848349661,"node_id":"MDU6TGFiZWw4NDgzNDk2NjE=","url":"https://api.github.com/repos/dmlc/gluon-cv/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-07T05:40:32Z","updated_at":"2018-09-16T08:10:26Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n    Hi. Now i am trying to implement a SSD model using my own images.\r\n    And I think there may be a bug in the anchor.py.\r\n\r\n    for r in ratios[1:]:\r\n    must be\r\n    for _ in r[1:]:\r\n    in the _generate_anchors function below?\r\n\r\n---------------------------------------------------------------------------------------------------\r\n      def _generate_anchors(self, sizes, ratios, step, alloc_size, offsets):\r\n        \"\"\"Generate anchors for once.\"\"\"\r\n        assert len(sizes) == 2, \"SSD requires sizes to be (size_min, size_max)\"\r\n        anchors = []\r\n        for i in range(alloc_size[0]):\r\n            for j in range(alloc_size[1]):\r\n                cy = (i + offsets[0]) * step\r\n                cx = (j + offsets[1]) * step\r\n                # ratio = ratios[0], size = size_min or sqrt(size_min * size_max)\r\n                r = ratios[0]\r\n                anchors.append([cx, cy, sizes[0], sizes[0]])\r\n                anchors.append([cx, cy, sizes[1], sizes[1]])\r\n                # size = sizes[0], ratio = ...\r\n                for r in ratios[1:]:\r\n                    sr = np.sqrt(r)\r\n                    w = sizes[0] * sr\r\n                    h = sizes[0] / sr\r\n                    anchors.append([cx, cy, w, h])\r\n        return np.array(anchors).reshape(1, 1, alloc_size[0], alloc_size[1], -1)"},"comment":{"url":"https://api.github.com/repos/dmlc/gluon-cv/issues/comments/421720932","html_url":"https://github.com/dmlc/gluon-cv/issues/302#issuecomment-421720932","issue_url":"https://api.github.com/repos/dmlc/gluon-cv/issues/302","id":421720932,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTcyMDkzMg==","user":{"login":"uran209","id":26733796,"node_id":"MDQ6VXNlcjI2NzMzNzk2","avatar_url":"https://avatars1.githubusercontent.com/u/26733796?v=4","gravatar_id":"","url":"https://api.github.com/users/uran209","html_url":"https://github.com/uran209","followers_url":"https://api.github.com/users/uran209/followers","following_url":"https://api.github.com/users/uran209/following{/other_user}","gists_url":"https://api.github.com/users/uran209/gists{/gist_id}","starred_url":"https://api.github.com/users/uran209/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uran209/subscriptions","organizations_url":"https://api.github.com/users/uran209/orgs","repos_url":"https://api.github.com/users/uran209/repos","events_url":"https://api.github.com/users/uran209/events{/privacy}","received_events_url":"https://api.github.com/users/uran209/received_events","type":"User","site_admin":false},"created_at":"2018-09-16T08:10:26Z","updated_at":"2018-09-16T08:10:26Z","author_association":"NONE","body":"@zhreshold \r\nNice suggetion. I could understand the anchors are the center mode at this stage and they are converted to the corner mode in the model in modelzoo.ssd.target.py.\r\nI could modify the anchor generation algorithm successfully, thanks to you."}}
{"actor":{"display_login":"uran209"}}