Skip to content

Instantly share code, notes, and snippets.

@tomas-wood
Last active December 3, 2018 22:14
Show Gist options
  • Save tomas-wood/cbe3853895a047216f4155e14e8e82a5 to your computer and use it in GitHub Desktop.
Save tomas-wood/cbe3853895a047216f4155e14e8e82a5 to your computer and use it in GitHub Desktop.
Looking at the bugs that crop up in the scene-graph demo

input url: https://cdn.japantimes.2xx.jp/wp-content/uploads/2018/03/p9-masangkay-cathat-a-20180319-870x580.jpg

output error:

scene_graph_1  | Traceback (most recent call last):
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
scene_graph_1  |     response = self.full_dispatch_request()
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
scene_graph_1  |     rv = self.handle_user_exception(e)
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
scene_graph_1  |     reraise(exc_type, exc_value, tb)
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
scene_graph_1  |     rv = self.dispatch_request()
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request
scene_graph_1  |     return self.view_functions[rule.endpoint](**req.view_args)
scene_graph_1  |   File "sg_server.py", line 70, in sg_srvc
scene_graph_1  |     sg_data = gen_sg.gen_scene_graph_data(sg_model, url_path, cls_boxes)
scene_graph_1  |   File "/app/scripts/gen_sg.py", line 434, in gen_scene_graph_data
scene_graph_1  |     sg_result = model.predict(im, boxes)
scene_graph_1  |   File "/app/scripts/gen_sg.py", line 172, in predict
scene_graph_1  |     bbox_reg, [self.inference_iter])
scene_graph_1  |   File "/app/scene-graph-TF-release/tools/../lib/fast_rcnn/test.py", line 146, in im_detect
scene_graph_1  |     ops_value = sess.run(ops, feed_dict=feed_dict)
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 877, in run
scene_graph_1  |     run_metadata_ptr)
scene_graph_1  |   File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1076, in _run
scene_graph_1  |     str(subfeed_t.get_shape())))
scene_graph_1  | ValueError: Cannot feed value of shape (0,) for Tensor u'relations:0', which has shape '(?, 2)'
scene_graph_1  | 172.24.0.2 - - [03/Dec/2018 22:03:43] "POST /sg_srvc HTTP/1.1" 500 -
web_1          | [2018-12-03 22:03:43,460] ERROR in app: Exception on /search [POST]
web_1          | Traceback (most recent call last):
web_1          |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
web_1          |     response = self.full_dispatch_request()
web_1          |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
web_1          |     rv = self.handle_user_exception(e)
web_1          |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
web_1          |     reraise(exc_type, exc_value, tb)
web_1          |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
web_1          |     rv = self.dispatch_request()
web_1          |   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request
web_1          |     return self.view_functions[rule.endpoint](**req.view_args)
web_1          |   File "/app/app/routes.py", line 68, in search
web_1          |     sg_out_dict = json.loads(sg_res.data)
web_1          |   File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
web_1          |     return _default_decoder.decode(s)
web_1          |   File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
web_1          |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
web_1          |   File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
web_1          |     raise ValueError("No JSON object could be decoded")
web_1          | ValueError: No JSON object could be decoded
web_1          | 10.145.16.42 - - [2018-12-03 22:03:43] "POST /search HTTP/1.1" 500 412 4.020920

input url: https://d3d00swyhr67nd.cloudfront.net/w1200h1200/STF/STF_STKMG_030.jpg

output: success. It worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment