fidler-lab / polyrnn-pp-pytorch

PyTorch training/tool code for Polygon-RNN++ (CVPR 2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some questions about tool&trainning

wwll333 opened this issue · comments

Hi 1)when I run the tool.py ,there is alaways a error at "self.model.reload(args.reload, strict=False)" (line 46),
the error is "PermissionError: [Errno 13] Permission denied: 'E:/Work/polyrnnpp-pytorch/models/',Is there something I should pay attention to?
2) And I'm a little confused about the whole process of the project,(train->prediction->tool, is it ?)

Hi, the first error seems like a permission issue, and not really anything to do with the code afaik.

Did you manage to fix it?

Also yes, the project has the usual deep learning project workflow of training -> testing. We've also provided a tool where you could use the trained model in the tool to annotate new data.

Thank you very much, and I want to ask you one more question about the tool. I can open the PolyRNN++ Demo, but I can't see Image in the window when I select a Image,the Image window is always blank.

Could you show screenshots of exactly where the issue is? Could you also show a screenshot of the console output from the backend process?

In fact, I use python3 in windows, when I run the tool.py
the console output :
"
Building dataloaders
Dataset Options: {'flip': False, 'max_poly_len': 71, 'random_context': [0.15, 0.15], 'grid_side': 28, 'batch_size': 1, 'random_start': False, 'img_side': 224}
Building polyrnnpp with opts:
{'ggnn_n_steps': 5, 'mode': 'tool', 'max_poly_len': 71, 'return_attention': False, 'use_separate_encoder': False, 'dataset': {'train_val': {'flip': False, 'max_poly_len': 71, 'random_context': [0.15, 0.15], 'grid_side': 28, 'batch_size': 1, 'random_start': False, 'img_side': 224}}, 'ggnn_state_dim': 1024, 'temperature': 0.0, 'use_ggnn': True, 'ggnn_output_dim': 15, 'use_evaluator': True, 'use_bn_lstm': True, 'ggnn_grid_size': 112}
Building encoder
Building first vertex network
Building convlstm
Building Evaluator
Building GGNN
Building GGNN Feature Encoder
Reloading full model from: E:/Work/polyrnnpp-pytorch/models/ggnn_epoch5_step14000.pth

  • Serving Flask app "tool" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Running on http://0.0.0.0:5001/ (Press CTRL+C to quit) "
    Then , I don' t know how to run the frontend on windows system

This is correct. Next, you need to run a separate server for the frontend: https://github.com/fidler-lab/polyrnn-pp-pytorch#frontend

commented

This is correct. Next, you need to run a separate server for the frontend: https://github.com/fidler-lab/polyrnn-pp-pytorch#frontend

hi @amlankar
i have run servers for backend and frontend, then i can see the page like this https://github.com/fidler-lab/polyrnn-pp-pytorch/blob/master/Docs/tool.png

but when i choose the box , there is no label information but a load.gif for a long time.
when i click the "upload local" button and choose a local image, there is always a error shows: "Error in uploading image! Please try another image."

Could you help me to know how to fix it, thank you!
Appreciative for your reply.

Could you share screenshots of your terminal output (for both the backend and the frontend server)?

commented

Could you share screenshots of your terminal output (for both the backend and the frontend server)?
terminal output for the backend:
ynqexddqx7m20 py9exrmmf
terminal output for the frontedn when i select the box:
v3w4 o7o85pgpwc9h2wibo

the polygon.js that i set
l _9yd obvm l0be58 rv

Could you help me to know what "File not found" means.Thanks a lot!

This is correct. Next, you need to run a separate server for the frontend: https://github.com/fidler-lab/polyrnn-pp-pytorch#frontend

Thanks for your reply, and I run "python -m http.server" in the cmd
and I got this
"Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ..."
1
but when I open the "http://0.0.0.0:8000/", I can't access local server
"um....you can't access this page"
Then, I don't know what went wrong? PC settings?

Hi, I am not very sure you can't access this. My first question would be are you running this on your own machine or are you running the http server and model on some other machine? In that case you would access this using the IP of the other machine.

If this is not the case, then it could be a Firewall setting, I can't think of any other reason.

@P-DX, is that the backend terminal output after you tried annotating on the frontend? It doesn't seem like the backend received any request. This could be related to #14

I'll try to look into it very soon.

I also appeared a web page can not access, can not find, what is the situation @amlankar .
图片1

You are running the server for the backend on 8001. Did you fix the frontend accordingly so that the requests are sent to localhost:8001?

Hi, I'm using python3 on Windows when I run tool.py.
Show me the information
2
When I want to open the url (http://127.0.0.1:5001/).Use my own IP address,got 404 (T.T)
But when I turn on the front-end server
Because I'm using python3, I type python-m http.server
3
This is when I open the url (http://127.0.0.1:8000/) The following figure is obtained.
4
It looks as if everything is going well. When I label cars
5
The terminal display of the back-end server
6
Maybe my back-end server is misconfigured, but I can't find anything wrong
My question seems to relate to #14
This is shown above. FileNotFoundError: No such file: 'D:\ais\gobi6\amlan\poly_rnn_demo_images\test.jpg'
I do not have this path and file, and the code does not have this path.

Can you help me with this problem? Thank you
Appreciative for your reply.

You will need to edit the globalPath line in the polygon.js file to point to the path where your images are stored

Thank you very much for your reply. I've solved the path problem
But I haven't solved the problem related to #14.
The back-end server terminal displays as follows.
10
Can you help me? I can't find the reason for this mistake

Can you help me with this problem? Thank you
Appreciative for your reply.

image
Although it was successful running, the labels is empty. why? Looking forward to your reply.

@CSYslient it should by default run on the GPU, if you have your GPU driver and Pytorch setup correctly.

A general answer to the issue where the tool doesn't run after drawing a bounding box:

Please check in your web console for errors. If you see an error that has the word CORS in it, then you will need to run your browser with CORS disabled. Here's how to do it for Google Chrome:
https://alfilatov.com/posts/run-chrome-without-cors/

Hello,

I have a similar issue running the Tool on the test images already provided with the code (Later I would like to run inference on my own data):
I am running the below command as in README (with the default port 5001):
Backend:
python Tool/tool.py --exp Experiments/tool.json --reload ../models/rl_epoch1_step3000.pth --image_dir Tool/frontend/static/img/
Frontend:
cd Tool/frontend/
python -m SimpleHTTPServer

I am running the script on the remote server and accessing the tool interactive page on the host machine using the SSH port forwarding mechanism. I am able to access the webpage on the host machine and when I select a bounding box in the image
I could see the loading gif for an infinite amount of time and no annotations produced. Currently, I am only forwarding the port corresponding to the frontend. I am attaching some screenshots for better understanding.
Do I need to forward the backend port too to send the request back and get the result from the model? Could you please help me? Thank you.

Backend (running on remote server):

image

Frontend (running on host local machine):
image

Tool webpage:
image

@veeramallirajesh Hi, same issue here. Did you solve this problem? Thanks.

ezoic increase your site revenue