Giter VIP home page Giter VIP logo

Comments (4)

jovahe avatar jovahe commented on June 15, 2024

并且,觉得标签重采样后,边界有一定的问题,如下

未命名图片

from remote-sensing-image-semantic-segmentation.

TachibanaYoshino avatar TachibanaYoshino commented on June 15, 2024

The method of interpolation sampling generally changes the original data, no matter how many channels the input has. I have already verified this before. The change of the boundary value is in line with the actual situation. Different sampling methods will take values according to the adjacent area when scaling. If the difference between adjacent areas is large, the change of the boundary value will be large. You can think of this as an extra noise.

from remote-sensing-image-semantic-segmentation.

jovahe avatar jovahe commented on June 15, 2024

@TachibanaYoshino thansk a lot. I have solved the multiband resizing problem, but I also fould the PlL resize() function only available for uint8 data type. If I want to deal with unint16 data type, the result would be wrong.

from remote-sensing-image-semantic-segmentation.

jovahe avatar jovahe commented on June 15, 2024

I have fixed the problem of uint16 type as following:
n_img = np.zeros((dst_h, dst_w, img.shape[-1]), np.uint16)
img = np.asarray(img, np.uint32)
for i in range(img.shape[-1]):
b_img = img[:, :, i]
b_img = Image.fromarray(b_img, mode='I')
b_img = b_img.resize((dst_h, dst_w), mode)
b_img = np.array(b_img, np.uint16)
n_img[:, :, i] = b_img[:, :]

from remote-sensing-image-semantic-segmentation.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.