Ugness / PiCANet-Implementation

Pytorch Implementation of PiCANet: Learning Pixel-wise Contextual Attention for Saliency Detection
MIT License
178 stars 40 forks source link

Why the output image size is not the same as the input image size #23

Closed tuqiangwang closed 4 years ago

tuqiangwang commented 4 years ago

Regardless of the input image size, the output image size is always 224x224. Is this your problem? OR maybe the method of this paper is inappropriate?

mefahimrahman commented 4 years ago

I was going to ask the same problem. I've seen U-net architecture. But here I've not found any function which converts the input image size into 224x224. @Ugness can you please explain this?

Ugness commented 4 years ago

https://github.com/Ugness/PiCANet-Implementation/blob/master/dataset.py#L117 You can see the input image is cropped to 224x224.

Ugness commented 4 years ago

Although U-net like structure is fully Convolutional, https://github.com/Ugness/PiCANet-Implementation/blob/master/network.py#L163 needs fixed-size input.

mefahimrahman commented 4 years ago

@Ugness I want to change the input and output size then I got "memory error". I changed
https://github.com/Ugness/PiCANet-Implementation/blob/master/dataset.py#L151 and
https://github.com/Ugness/PiCANet-Implementation/blob/master/dataset.py#L25 to 640x520. Is there more I've to change to get rid of Memory error?

tuqiangwang commented 4 years ago

You may not be able to complete the end-to-end implementation. My suggestion is to implement upsampling interpolation by using tools such as matlab in the later stage.