cyrildiagne / basnet-http

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to complete Test

mjsevilla opened this issue · comments

Input:
PS C:\Users\micha\OneDrive\Documents\basnet-http-master> docker run --rm -p 8080:80 gcr.io/cyrildiagne-ml/basnet-http

Output:
Saved file tree to doc-filelist.js
Copied JS to doc-script.js
Compiled CSS to doc-style.css

Input:
PS C:\Users\micha\OneDrive\Documents\basnet-http-master> curl -F "data=@test.jpg" http://localhost:8080 -o result.png

Output:

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'F'.
At line:1 char:6

  • curl -F "data=@test.jpg" http://localhost:8080 -o result.png
  •  ~~
    
    • CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Wait..I have an 8gb AMD Radeon RX590 GPU (ie. not CUDA). Am I SOOL?

I don't understand how this wrapper is supposed to give me an IP to use for ar-cutpaste.

You need an Nvidia card to be able to use the GPU acceleration.
You can use your IP address if you're running the image on your computer. But it will take a long time to process.

When you say my IP, you mean my PC's not my Photoshop server's right? Is there a CUDA equivalent for AMD? I have a powerful GPU so I don't see why mine wouldn't suffice.

the reason yours wont suffice is because CUDA is a proprietary, close-source, Nvdia project. It has nothing too do with the power of your GPU. For more information: https://en.wikipedia.org/wiki/CUDA

There is a theoretical possibility for OpenCL working on your GPU, which seems to be well outside the scope of this project, so I would direct you to pytorch/pytorch#488 (as this implementation of BAS-Net is powered by PyTorch)

@CapCap, thanks for the reply. I'm a bit confused about how @cyrildiagne is able to demo the plugin on his Macbook Pro then since those run on AMD GPUs.

You also bring up another issue I was having trying to install pytorch as instructed in Option 1 of Build from source. PIP doesn't seem to support torch==0.4.1 and therefore, I can't install that.

@mjsevilla He's only running the photoshop server on his macbook, he's running BasNet in the cloud. You will have a much easier time running this on ubuntu in the cloud: directly running ML on OSX is generally a huge pain.

@CapCap, ok I'm on the same page now. Is this why there's a Docker option? I apologize, I haven't programmed since college so I feel like I'm re-learning all of this.

docker makes everything easier in general: no need to worry about mismatched binaries, libraries, drivers, etc

So in theory, I should be able to get this working on my machine if I use docker..

... and you had a Nvidia GPU, yes

And here I thought I went the right route going full-AMD on my PC build, lol. Thanks for your help.