{"action":"opened","issue":{"url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/433","repository_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn","labels_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/433/labels{/name}","comments_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/433/comments","events_url":"https://api.github.com/repos/rbgirshick/py-faster-rcnn/issues/433/events","html_url":"https://github.com/rbgirshick/py-faster-rcnn/issues/433","id":194507242,"number":433,"title":"Detection/training for small objects (Question)","user":{"login":"paulomarcos","id":8881414,"avatar_url":"https://avatars.githubusercontent.com/u/8881414?v=3","gravatar_id":"","url":"https://api.github.com/users/paulomarcos","html_url":"https://github.com/paulomarcos","followers_url":"https://api.github.com/users/paulomarcos/followers","following_url":"https://api.github.com/users/paulomarcos/following{/other_user}","gists_url":"https://api.github.com/users/paulomarcos/gists{/gist_id}","starred_url":"https://api.github.com/users/paulomarcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulomarcos/subscriptions","organizations_url":"https://api.github.com/users/paulomarcos/orgs","repos_url":"https://api.github.com/users/paulomarcos/repos","events_url":"https://api.github.com/users/paulomarcos/events{/privacy}","received_events_url":"https://api.github.com/users/paulomarcos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-09T03:46:54Z","updated_at":"2016-12-09T03:46:54Z","closed_at":null,"body":"TLDR: How can I detect small objects using py-faster-rcnn? Which parameters should I change when running the demo or for training?\r\n\r\nI have successfully trained using the ImageNet dataset. It runs fine and it detects the objects as expected. However, when the objects in the scene are small, the detection doesn't work. The next thing I have done is to train the dataset using the ImageNet format but with my own images and annotations, adding a new class to the previous list, which is of different types of cups. The train script runs fine,  it gives the output as expected, but in the demo when I add the new (7th) class to the list, it gives the following error:\r\n```\r\nDetection took 0.052s for 300 object proposals\r\nTraceback (most recent call last):\r\n  File \"./tools/demo.py\", line 201, in <module>\r\n    demo(net, im)\r\n  File \"./tools/demo.py\", line 117, in demo\r\n    cls_scores = scores[:, cls_ind]\r\nIndexError: index 6 is out of bounds for axis 1 with size 6\r\n```\r\nTo be more precise, I would like to detect the cup on this image (original size 1920x1080):\r\n![e_58](https://cloud.githubusercontent.com/assets/8881414/21036629/a9820d70-be0a-11e6-8c98-2e9ba2661fd6.jpg)\r\n\r\nIf the cup is on the table and I crop and resize the frame with OpenCV to the resulting image below, the algorithm detects it, but not as the new class that I have trained.\r\n![e_n00032116_96](https://cloud.githubusercontent.com/assets/8881414/21036667/f8fb1c7a-be0a-11e6-885c-03f55f342a37.jpg)\r\n\r\nSo I would like to know what I am doing wrong and how can I fix it.\r\nThank you."}}
{"actor":{"display_login":"paulomarcos"}}