{"action":"created","issue":{"url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/63","labels_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/63/comments","events_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/63/events","html_url":"https://github.com/rbgirshick/py-faster-rcnn/issues/63","id":126579438,"number":63,"title":"error: \"only keep anchors inside the image\",  with ImageNet as train datasets.","user":{"login":"leejiajun","id":7312830,"avatar_url":"https://avatars.githubusercontent.com/u/7312830?v=3","gravatar_id":"","url":"https://api.github.com/users/leejiajun","html_url":"https://github.com/leejiajun","followers_url":"https://api.github.com/users/leejiajun/followers","following_url":"https://api.github.com/users/leejiajun/following{/other_user}","gists_url":"https://api.github.com/users/leejiajun/gists{/gist_id}","starred_url":"https://api.github.com/users/leejiajun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leejiajun/subscriptions","organizations_url":"https://api.github.com/users/leejiajun/orgs","repos_url":"https://api.github.com/users/leejiajun/repos","events_url":"https://api.github.com/users/leejiajun/events{/privacy}","received_events_url":"https://api.github.com/users/leejiajun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T05:17:02Z","updated_at":"2016-01-25T14:43:32Z","closed_at":"2016-01-25T14:43:32Z","body":"i trained with ImageNet, but met an error in /lib/rpn/anchor_target_layer.py.\r\n\r\n```\r\nProcess Process-1:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/multiprocessing/process.py\", line 258, in _bootstrap\r\n    self.run()\r\n  File \"/usr/lib/python2.7/multiprocessing/process.py\", line 114, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"./tools/train_faster_rcnn_alt_opt.py\", line 132, in train_rpn\r\n    max_iters=max_iters)\r\n  File \"/home/lijiajun/py-faster-rcnn/tools/../lib/fast_rcnn/train.py\", line 136, in train_net\r\n    model_paths = sw.train_model(max_iters)\r\n  File \"/home/lijiajun/py-faster-rcnn/tools/../lib/fast_rcnn/train.py\", line 104, in train_model\r\n    self.solver.step(1)\r\n  File \"/home/lijiajun/py-faster-rcnn/tools/../lib/rpn/anchor_target_layer.py\", line 137, in forward\r\n    gt_argmax_overlaps = overlaps.argmax(axis=0)\r\nValueError: attempt to get argmax of an empty sequence\r\n```\r\nwhen run at \"only keep anchors inside the image\", len(ids_inside) is equal to 0.\r\n\r\n    # only keep anchors inside the image\r\n    inds_inside = np.where(\r\n        (all_anchors[:, 0] >= -self._allowed_border) &\r\n        (all_anchors[:, 1] >= -self._allowed_border) &\r\n        (all_anchors[:, 2] < im_info[1] + self._allowed_border) &  # width\r\n        (all_anchors[:, 3] < im_info[0] + self._allowed_border)    # height\r\n    )[0]\r\nhow to solver?"},"comment":{"url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/comments/174527159","html_url":"https://github.com/rbgirshick/py-faster-rcnn/issues/63#issuecomment-174527159","issue_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/63","id":174527159,"user":{"login":"leejiajun","id":7312830,"avatar_url":"https://avatars.githubusercontent.com/u/7312830?v=3","gravatar_id":"","url":"https://api.github.com/users/leejiajun","html_url":"https://github.com/leejiajun","followers_url":"https://api.github.com/users/leejiajun/followers","following_url":"https://api.github.com/users/leejiajun/following{/other_user}","gists_url":"https://api.github.com/users/leejiajun/gists{/gist_id}","starred_url":"https://api.github.com/users/leejiajun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leejiajun/subscriptions","organizations_url":"https://api.github.com/users/leejiajun/orgs","repos_url":"https://api.github.com/users/leejiajun/repos","events_url":"https://api.github.com/users/leejiajun/events{/privacy}","received_events_url":"https://api.github.com/users/leejiajun/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T14:43:32Z","updated_at":"2016-01-25T14:43:32Z","body":"imagenet dataset have some unusual size of image and  size of object so that RPN can not generate final anchors."}}