{"action":"created","issue":{"url":"https://api.github.com/repos/scanner-research/scanner/issues/142","repository_url":"https://api.github.com/repos/scanner-research/scanner","labels_url":"https://api.github.com/repos/scanner-research/scanner/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/scanner-research/scanner/issues/142/comments","events_url":"https://api.github.com/repos/scanner-research/scanner/issues/142/events","html_url":"https://github.com/scanner-research/scanner/issues/142","id":293681346,"number":142,"title":"Object detection example fails (Caffe with support for Faster-RCNN)","user":{"login":"szekany","id":825879,"avatar_url":"https://avatars3.githubusercontent.com/u/825879?v=4","gravatar_id":"","url":"https://api.github.com/users/szekany","html_url":"https://github.com/szekany","followers_url":"https://api.github.com/users/szekany/followers","following_url":"https://api.github.com/users/szekany/following{/other_user}","gists_url":"https://api.github.com/users/szekany/gists{/gist_id}","starred_url":"https://api.github.com/users/szekany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szekany/subscriptions","organizations_url":"https://api.github.com/users/szekany/orgs","repos_url":"https://api.github.com/users/szekany/repos","events_url":"https://api.github.com/users/szekany/events{/privacy}","received_events_url":"https://api.github.com/users/szekany/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2018-02-01T20:58:52Z","updated_at":"2018-02-06T02:52:49Z","closed_at":"2018-02-06T02:52:49Z","author_association":"NONE","body":"Hi, I'm running into an issue with Scanner's integration with Caffe for object detection. I'm trying to run the example in \"examples/apps/object_detection/main.py\" on a fresh install of Scanner, and it fails with the following output:\r\n\r\n`[libprotobuf ERROR google/protobuf/text_format.cc:288] Error parsing text-format caffe.NetParameter: 483:21: Message type \"caffe.LayerParameter\" has no field named \"roi_pooling_param\".`\r\n\r\nAfter looking into this, it appears that the Intel version of Caffe (which you get if you build Scanner without GPU) supports Faster-RCNN out of the box, while the BVLC version does not. When I build Scanner without GPU support, the object-detection example doesn't run at all.\r\n\r\nI've tried a few different workarounds:\r\n\r\n- Building the (now deprecated) [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn) version of Caffe. This fails because the CUDA compiler interface has changed since this repo was last updated in early 2016.\r\n- Pulling the roi_pooling_layer files from Intel's version of Caffe and [following the instructions](https://github.com/BVLC/caffe/wiki/Development) to add a layer to BVLC Caffe. This seemed like it should work, but I was unable to get it to compile due to errors with undeclared variables.\r\n- Doing a merge of the latest version of BLVC Caffe with py-faster-rcnn. This actually compiled, but still fails with an unhelpful error (\"terminate called after throwing an instance of 'boost::python::error_already_set'\"). I'm still troubleshooting this, but I'm having difficulty just figuring out where this exception is getting thrown from.\r\n\r\nThe \"right\" answer here might be to integrate Scanner with Detectron, but I'm hoping for an easier solution that just to get started. Anyone else run into this or have any ideas?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scanner-research/scanner/issues/comments/363293878","html_url":"https://github.com/scanner-research/scanner/issues/142#issuecomment-363293878","issue_url":"https://api.github.com/repos/scanner-research/scanner/issues/142","id":363293878,"user":{"login":"szekany","id":825879,"avatar_url":"https://avatars3.githubusercontent.com/u/825879?v=4","gravatar_id":"","url":"https://api.github.com/users/szekany","html_url":"https://github.com/szekany","followers_url":"https://api.github.com/users/szekany/followers","following_url":"https://api.github.com/users/szekany/following{/other_user}","gists_url":"https://api.github.com/users/szekany/gists{/gist_id}","starred_url":"https://api.github.com/users/szekany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szekany/subscriptions","organizations_url":"https://api.github.com/users/szekany/orgs","repos_url":"https://api.github.com/users/szekany/repos","events_url":"https://api.github.com/users/szekany/events{/privacy}","received_events_url":"https://api.github.com/users/szekany/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T02:52:49Z","updated_at":"2018-02-06T02:52:49Z","author_association":"NONE","body":"Well... after playing around with it for a bit, I discovered that the output file extension seems to make a difference. Reading online it sounds like the video encoder situation is different depending on your OS, and that some of the defaults in Ubuntu are broken. \r\n\r\nSo all I did was change to the MJPG encoder with a .avi extension, and the object-detection example runs to completion:\r\n\r\n```\r\n    output = cv2.VideoWriter(\r\n        'example_detections.avi',\r\n        cv2.VideoWriter_fourcc('M','J','P','G'),\r\n\r\n```\r\n\r\nThank you so much for the help!"}}
{"actor":{"display_login":"szekany"}}