fidler-lab / polyrnn-pp-pytorch

PyTorch training/tool code for Polygon-RNN++ (CVPR 2018)
703 stars 106 forks source link

something weird about 'Tool' #14

Closed Jacoobr closed 5 years ago

Jacoobr commented 5 years ago

Hi, @amlankar. When I try to run Tool on my own server follow the part tool: There are my command lines that running the backent and frontent separately:

  1. backent python Tool/tool.py --exp /mnt/data/polygonRNN_pluss/code/Experiments/tool.json --reload /mnt/data/polygonRNN_pluss/models/ggnn_epoch5_step14000.pth --port 5001 --image_dir /mnt/data/polygonRNN_pluss/code/Tool/frontend/static/img/
  2. frontent python -m SimpleHTTPServer And then i get the index page as follow: e1

the page above showed when i draw a box around an object like a car. The page just stoped when i draw a box around an object, and the progress bar just rolling endless. the log at frontent terminal like this:

e2

the log at backent as follow:

Building dataloaders
Dataset Options:  {u'img_side': 224, u'random_context': [0.15, 0.15], u'flip': False, u'batch_size': 1, u'random_start': False, u'grid_side': 28, u'max_poly_len': 71}
Building polyrnnpp with opts:
{u'ggnn_n_steps': 5, u'temperature': 0.0, u'ggnn_grid_size': 112, u'ggnn_output_dim': 15, u'use_bn_lstm': True, u'ggnn_state_dim': 1024, u'return_attention': False, u'mode': u'tool', u'use_evaluator': True, u'dataset': {u'train_val': {u'img_side': 224, u'random_context': [0.15, 0.15], u'flip': False, u'batch_size': 1, u'random_start': False, u'grid_side': 28, u'max_poly_len': 71}}, u'use_ggnn': True, u'use_separate_encoder': False, u'max_poly_len': 71}
Building encoder
Building first vertex network
Building convlstm
Building Evaluator
Building GGNN
Building GGNN Feature Encoder
Reloading full model from:  /mnt/data/polygonRNN_pluss/models/ggnn_epoch5_step14000.pth
 * Serving Flask app "tool" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://0.0.0.0:5001/ (Press CTRL+C to quit)
 * Restarting with stat
Building dataloaders
Dataset Options:  {u'img_side': 224, u'random_context': [0.15, 0.15], u'flip': False, u'batch_size': 1, u'random_start': False, u'grid_side': 28, u'max_poly_len': 71}
Building polyrnnpp with opts:
{u'ggnn_n_steps': 5, u'temperature': 0.0, u'ggnn_grid_size': 112, u'ggnn_output_dim': 15, u'use_bn_lstm': True, u'ggnn_state_dim': 1024, u'return_attention': False, u'mode': u'tool', u'use_evaluator': True, u'dataset': {u'train_val': {u'img_side': 224, u'random_context': [0.15, 0.15], u'flip': False, u'batch_size': 1, u'random_start': False, u'grid_side': 28, u'max_poly_len': 71}}, u'use_ggnn': True, u'use_separate_encoder': False, u'max_poly_len': 71}
Building encoder
Building first vertex network
Building convlstm
Building Evaluator
Building GGNN
Building GGNN Feature Encoder
Reloading full model from:  /mnt/data/polygonRNN_pluss/models/ggnn_epoch5_step14000.pth
 * Debugger is active!
 * Debugger PIN: 294-205-619

I can't get the annotation file of the tool and see the polygon on the page when i draw a bbox around an object.Can you give me some advice about this? Much appreciated for your reply.

What's more , when i try to see the backend with chrome browser by localhost:5001, i get 404 respond like bellow: 127.0.0.1 -- "GET / HTTP/1.1" 404 - Does that means the backent not work?

amlankar commented 5 years ago

Hi @Jacoobr, I tried but failed to reproduce this bug.

The only difference I see is that your flask app (backend) is running in development mode with the debugger turned on. Can you try running it in production mode with the debugger turned off?

Jacoobr commented 5 years ago

Hi, @amlankar ,thanks for your reply. i changed the environment mode to production and turned off the debuger mode. but the issue still as the same. Can you tell me what browser you used on your service?, bth, i used google chrome browser with Ubuntu16.04 environment.

amlankar commented 5 years ago

I'm sorry, I still cannot reproduce this issue on my own machine. I followed the exact instructions from the README. Here is a screenshot from running the code from a fresh download.

NOTES

demo_running

UPLOADING AN IMAGE Uploading images also works fine for me, here is a screenshot of me uploading the screenshot I posted above on the tool. You can see there's a upload request on the backend logs.

demo_upload

Jacoobr commented 5 years ago

Hi, @amlankar. Thanks for your patience working throught on my issue. I fixed my problem by runing bakend and frontent separately on different two hosts. My issue of previous may caused by runing bakend and frontent on my distant server and using ssh tools like 'MobaXterm' in my lab host to communicate. So, the frontent didn't work when i called ip:8000 on my lab host.

troylhy1991 commented 5 years ago

Hi, @Jacoobr . Same problem here. The loader logo keeps blinking. How do u fix the problem separating backend and frontend on different hosts. I'm using mobaxterm and ssh to the lab server. Thanks!

Flames60 commented 4 years ago

Hi, @Jacoobr . Same problem here. The loader logo keeps blinking. How do u fix the problem separating backend and frontend on different hosts. I'm using mobaxterm and ssh to the lab server. Thanks!

I have fix it. You just need to edit the value of 'backend' in 'index.html', for example, use the IP address rather than 'localhost'.