cyrildiagne / basnet-http

HTTP service wrapper for BASNet: Boundary-Aware Salient Object Detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty response to test curl

j1m-renwick opened this issue · comments

When I start the docker image and run a GET curl request, I get the expected "Hello BASNet!" response, but when I try the POST test request mentioned in the readme, I only get an empty response:

$ curl -F "data=@apples.jpeg" http://localhost:8080 -o result.png

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100  3249    0     0  100  3249      0    361  0:00:09  0:00:08  0:00:01     0
curl: (52) Empty reply from server

Curl seems to upload and send the image, but there is no response - if I try sending a bad request like ""data=" I get a 400 error, so it looks like the endpoint is correct and the code is being executed...just not when I send an image to be processed.

The only thing I can think of at this point is that the processing is so extreme. that the Macbook Pro I'm running it on can't handle it before the flask request timeout is reached, but this is just a wild guess. Anything you can suggest/advise would be helpful. Thanks :)

Just out of curiosity, to do the request with Postman?

same response:

image

I have the same problem.

$ curl -F "data=@Lion_Afrique.jpg" http://localhost:3000 -o result.png
% Total    % Received % Xferd  Average Speed   Time     Time       Time  Current
                                Dload  Upload  Total    Spent      Left   Speed
100 1364k    0       0  100 1364k   0    118k  0:00:11  0:00:11  --:--:--     0
curl: (52) Empty reply from server

Screenshot 2020-05-08 at 00 15 11

Could you try increasing the RAM of Docker as mentioned here? cyrildiagne/ar-cutpaste#26 (comment)

i have the same with mac os , i change the settings of my docker to 4 core and more ram and works fine
thanks

Nice! @j1m-renwick can you confirm that works for you too?

Works fine thanks @cyrildiagne

11
result

@cyrildiagne yes that fixed the problem, thanks for your help :)

ezoic increase your site revenue