Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about tool&trainning #5

Open
wwll333 opened this issue Nov 1, 2018 · 20 comments
Open

Some questions about tool&trainning #5

wwll333 opened this issue Nov 1, 2018 · 20 comments

Comments

@wwll333
Copy link

wwll333 commented Nov 1, 2018

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 ?)

@amlankar
Copy link
Member

amlankar commented Nov 5, 2018

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.

@wwll333
Copy link
Author

wwll333 commented Nov 8, 2018

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.

@amlankar
Copy link
Member

amlankar commented Nov 9, 2018

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

@wwll333
Copy link
Author

wwll333 commented Nov 10, 2018

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

@amlankar
Copy link
Member

amlankar commented Nov 28, 2018

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

@P-DX
Copy link

P-DX commented Jan 8, 2019

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.

@amlankar
Copy link
Member

amlankar commented Jan 8, 2019

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

@P-DX
Copy link

P-DX commented Jan 9, 2019

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!

@wwll333
Copy link
Author

wwll333 commented Jan 14, 2019

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?

@amlankar
Copy link
Member

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.

@amlankar
Copy link
Member

@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.

@CSYslient
Copy link

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

@amlankar
Copy link
Member

amlankar commented Apr 3, 2019

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?

@CSYslient
Copy link

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.

@amlankar
Copy link
Member

amlankar commented Apr 8, 2019

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

@CSYslient
Copy link

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.

@qianxi0617
Copy link

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

@amlankar
Copy link
Member

@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/

@veeramallirajesh
Copy link

veeramallirajesh commented Dec 6, 2020

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

@qinliuliuqin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants