Comments (4)
并且,觉得标签重采样后,边界有一定的问题,如下
from remote-sensing-image-semantic-segmentation.
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.
@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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remote-sensing-image-semantic-segmentation.