ar-cutpaste icon indicating copy to clipboard operation
ar-cutpaste copied to clipboard

Network request failed

Open Xemo96Altyn opened this issue 4 years ago • 16 comments

image image i dont know, maybe i used wrong IP. Which IP I have to use instead [basnet_service_ip]?

Xemo96Altyn avatar May 06 '20 18:05 Xemo96Altyn

Do you have the BASNet service running? you should use that specific IP. If you don't have it running then here you can find all the instructions -> https://github.com/cyrildiagne/basnet-http, otherwise double check the IP of that service.

Try to run the BASNet service with port 3000 or different from 8080 because it's already used by the other server. All this assuming that you are on the same local machine.

buskerone avatar May 07 '20 01:05 buskerone

I'm having the same issue but then realized I didn't have the IP from BASNet as @buskerone mentioned. However, I don't seem to understand how the BASNet HTTP wrapper is supposed to give me that IP. I can't get the test input to run, let alone the build from source to work properly.

mjsevilla avatar May 07 '20 04:05 mjsevilla

I suggest for you to run the BASNet HTTP on the docker.

With docker installed, you just need to follow:

git clone https://github.com/cyrildiagne/basnet-http
cd basnet-http
curl https://download.pytorch.org/models/resnet34-333f7ec4.pth -o resnet34-333f7ec4.pth
git clone https://github.com/NathanUA/BASNet
cd BASNet
mkdir -p saved_models/basnet_bsi/
curl https://evilnei.s3-sa-east-1.amazonaws.com/basnet.pth -o saved_models/basnet_bsi/basnet.pth
cd ..
docker build -t basnet .
docker run -ti -p 3000:80 basnet

After that, to test the wrapper you can do it using curl or postman

curl -F "data=@/img_path" http://localhost:3000 -o result.png or https://evilnei.s3-sa-east-1.amazonaws.com/basnet-wrap-postman.png

ivoneijr avatar May 07 '20 16:05 ivoneijr

Commenting to address my previous comment, since I don't have a CUDA-capable GPU, I'm out of luck here.

mjsevilla avatar May 07 '20 16:05 mjsevilla

@mjsevilla CUDA-capabale GPU is not a must, I think it would just speed up the processing. BASNet works on my Macbook with integrated Intel Iris chipset.

poohitan avatar May 08 '20 06:05 poohitan

@poohitan I also tried both methods but always get the same empty response :( I have Radeon Pro 555 2 GB graphics on my MacBook pro.

shehanmkg avatar May 08 '20 07:05 shehanmkg

@ShehanMadushanka I was getting empty responses as well. Someone here suggested to increase the RAM limit for Docker, and it helped, try this as well.

Here are my Docker resource limits: https://static.poohitan.com/images/1588924205819_Znimokekrana2020-05-0810.49.05.png

poohitan avatar May 08 '20 07:05 poohitan

Hey, @poohitan You saved my life! It worked! Thank you very much. <3

@mjsevilla Try to increase resource limits in docker.

shehanmkg avatar May 08 '20 07:05 shehanmkg

@ivoneijr am I missing something here? image

mjsevilla avatar May 09 '20 05:05 mjsevilla

I'm also unable to install Docker for Windows because I'm running Win10 Home?

mjsevilla avatar May 09 '20 05:05 mjsevilla

if you running in windows 10 just connect your localhost ip 1 (ex : 192.168.100.8:3000) to server.tsx and ake sure that ip and port is exactly same to the IP in server/main.py (scroll down to the end)

for basnet-http i just create new localhost by using "netsh wlan start hostednetwork" and using this ip to basnet-http/main.py (scroll down to the end)

run the basnet-http run the server run the app

make sure when you run the server, BASNET_IP_SERVER is fill by basnet_http IP

hope you get help sorry if make english bad

ondosansinaga avatar May 10 '20 08:05 ondosansinaga

if you running in windows 10 just connect your localhost ip 1 (ex : 192.168.100.8:3000) to server.tsx and ake sure that ip and port is exactly same to the IP in server/main.py (scroll down to the end)

for basnet-http i just create new localhost by using "netsh wlan start hostednetwork" and using this ip to basnet-http/main.py (scroll down to the end)

run the basnet-http run the server run the app

make sure when you run the server, BASNET_IP_SERVER is fill by basnet_http IP

hope you get help sorry if make english bad

Could you please tell my how to run the server? I've successfully started basnet, but don't know how to start the server.

Also, I don't know what to do with python main.py. How to I run that?

jackyleung1 avatar May 14 '20 15:05 jackyleung1

if you running in windows 10 just connect your localhost ip 1 (ex : 192.168.100.8:3000) to server.tsx and ake sure that ip and port is exactly same to the IP in server/main.py (scroll down to the end) for basnet-http i just create new localhost by using "netsh wlan start hostednetwork" and using this ip to basnet-http/main.py (scroll down to the end) run the basnet-http run the server run the app make sure when you run the server, BASNET_IP_SERVER is fill by basnet_http IP hope you get help sorry if make english bad

Could you please tell my how to run the server? I've successfully started basnet, but don't know how to start the server.

Also, I don't know what to do with python main.py. How to I run that?

i start the server with this (Windows) = python src/main.py --basnet_service_ip="http://X.X.X.X" --basnet_service_host="basnet-http.default.example.com" --photoshop_password 123456)

ondosansinaga avatar May 14 '20 16:05 ondosansinaga

if you running in windows 10 just connect your localhost ip 1 (ex : 192.168.100.8:3000) to server.tsx and ake sure that ip and port is exactly same to the IP in server/main.py (scroll down to the end) for basnet-http i just create new localhost by using "netsh wlan start hostednetwork" and using this ip to basnet-http/main.py (scroll down to the end) run the basnet-http run the server run the app make sure when you run the server, BASNET_IP_SERVER is fill by basnet_http IP hope you get help sorry if make english bad

Could you please tell my how to run the server? I've successfully started basnet, but don't know how to start the server. Also, I don't know what to do with python main.py. How to I run that?

i start the server with this (Windows) = python src/main.py --basnet_service_ip="http://X.X.X.X" --basnet_service_host="basnet-http.default.example.com" --photoshop_password 123456)

Ah thank you, one step closer. I still got an atob error.

Can you please tell me what I need to put for http.default.example.com?

jackyleung1 avatar May 14 '20 17:05 jackyleung1

@buskerone I am using http://u2net-predictor.tenant-compass.global.coreweave.com as Basenet still getting same error

image i can access this server at X.X.X.X:3000 image

image

satvikpadhiyar avatar Jul 18 '20 13:07 satvikpadhiyar

@buskerone I am using http://u2net-predictor.tenant-compass.global.coreweave.com as Basenet still getting same error

image i can access this server at X.X.X.X:3000 image

image

[Solved] My antivirus was blocking Traffic from my phone😂.

satvikpadhiyar avatar Jul 18 '20 15:07 satvikpadhiyar