{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/2724","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/2724/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/2724/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/2724/events","html_url":"https://github.com/BVLC/caffe/issues/2724","id":93929276,"number":2724,"title":"RCNN tutorial Selective_search issue","user":{"login":"LarsHH","id":7560290,"avatar_url":"https://avatars.githubusercontent.com/u/7560290?v=3","gravatar_id":"","url":"https://api.github.com/users/LarsHH","html_url":"https://github.com/LarsHH","followers_url":"https://api.github.com/users/LarsHH/followers","following_url":"https://api.github.com/users/LarsHH/following{/other_user}","gists_url":"https://api.github.com/users/LarsHH/gists{/gist_id}","starred_url":"https://api.github.com/users/LarsHH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LarsHH/subscriptions","organizations_url":"https://api.github.com/users/LarsHH/orgs","repos_url":"https://api.github.com/users/LarsHH/repos","events_url":"https://api.github.com/users/LarsHH/events{/privacy}","received_events_url":"https://api.github.com/users/LarsHH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T01:38:56Z","updated_at":"2015-07-10T15:48:42Z","closed_at":null,"body":"Hi\r\nI'm going through the tutorial for setting up the R-CNN with Selective Search (http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/detection.ipynb)\r\n\r\nWhen I run this step\r\n\r\n../python/detect.py --crop_mode=selective_search --pretrained_model=../models/bvlc_reference_rcnn_ilsvrc13/bvlc_reference_rcnn_ilsvrc13.caffemodel --model_def=../models/bvlc_reference_rcnn_ilsvrc13/deploy.prototxt --gpu --raw_scale=255 _temp/det_input.txt _temp/det_output.h5\r\n\r\nI first received the error \r\n\r\n[... caffe layer output ...]\r\ncnn_ilsvrc13.caffemodel\r\nI0708 17:57:06.162698  5843 upgrade_proto.cpp:626] Successfully upgraded file specified using deprecated V1LayerParameter\r\nLoading input...\r\nTraceback (most recent call last):\r\n  File \"/usr/local/caffe/python/detect.py\", line 173, in <module>\r\n    main(sys.argv)\r\n  File \"/usr/local/caffe/python/detect.py\", line 144, in main\r\n    detections = detector.detect_selective_search(inputs)\r\n  File \"/usr/local/caffe/python/caffe/detector.py\", line 115, in detect_selective_search\r\n    import selective_search_ijcv_with_python as selective_search\r\nImportError: No module named selective_search_ijcv_with_python\r\n\r\nThis error actually makes sense since the .py file in the selective_search_ijcv_with_python directory is not called \"selective_search_ijcv_with_python.py\" but just \"selective_search.py\".\r\nSince I don't have the permission to change the code in the detector.py I tried just changing the name of the \"selective_search.py\" to \"selective_search_ijcv_with_python.py\".\r\n\r\nHowever now when I run the detect.py again I get a different error:\r\n\r\nselective_search_rcnn({'/home/cvg/lhertel/caffe/examples/images/fish-bike.jpg'}, '/tmp/tmpOu7hGx.mat')\r\nTraceback (most recent call last):\r\n  File \"/usr/local/caffe/python/detect.py\", line 173, in <module>\r\n    main(sys.argv)\r\n  File \"/usr/local/caffe/python/detect.py\", line 144, in main\r\n    detections = detector.detect_selective_search(inputs)\r\n  File \"/usr/local/caffe/python/caffe/detector.py\", line 123, in detect_selective_search\r\n    return self.detect_windows(zip(image_fnames, windows_list))\r\n  File \"/usr/local/caffe/python/caffe/detector.py\", line 86, in detect_windows\r\n    predictions = out[self.outputs[0]].squeeze(axis=(2, 3))\r\nValueError: 'axis' entry 2 is out of bounds [-2, 2)\r\n\r\nHas anybody else come across this error or do you have suggestions how to deal with it? I am starting to doubt that just changing the filename would be the right thing to do. However, I also don't want to start messing with files that are also being used by other people here (i.e. the detector.py)\r\n\r\nThanks,\r\n\r\nLars"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/120441788","html_url":"https://github.com/BVLC/caffe/issues/2724#issuecomment-120441788","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/2724","id":120441788,"user":{"login":"seanbell","id":1844189,"avatar_url":"https://avatars.githubusercontent.com/u/1844189?v=3","gravatar_id":"","url":"https://api.github.com/users/seanbell","html_url":"https://github.com/seanbell","followers_url":"https://api.github.com/users/seanbell/followers","following_url":"https://api.github.com/users/seanbell/following{/other_user}","gists_url":"https://api.github.com/users/seanbell/gists{/gist_id}","starred_url":"https://api.github.com/users/seanbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanbell/subscriptions","organizations_url":"https://api.github.com/users/seanbell/orgs","repos_url":"https://api.github.com/users/seanbell/repos","events_url":"https://api.github.com/users/seanbell/events{/privacy}","received_events_url":"https://api.github.com/users/seanbell/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T15:48:42Z","updated_at":"2015-07-10T15:48:42Z","body":"It looks like this is using the old API, when all blobs were 4D.  Blobs are now N-dimensional, and commands like `.squeeze(axis=(2, 3))` are no longer necessary.  The file `detector.py` (and possibly others) needs to be updated to the new API.\r\n\r\nMy guess is that nobody is using that particular file, which is why the issue wasn't raised until now.  If you want to do object detection, I recommend using Fast R-CNN (https://github.com/rbgirshick/fast-rcnn) which is both faster and more accurate."}}