tachibanayoshino / remote-sensing-image-semantic-segmentation Goto Github PK
View Code? Open in Web Editor NEWThe project uses Unet-based improved networks to study Remote sensing image semantic segmentation, which is based on keras.
The project uses Unet-based improved networks to study Remote sensing image semantic segmentation, which is based on keras.
实现:
def get_label_from_palette(label_img, palette_file='Palette.json'):
with open(palette_file, 'r') as fp:
text = json.load(fp)
palette_values = np.array(list(text.values()))
palette_keys = np.array(list(text.keys()))
# 将三维RGB图像展平为二维形状
flat_label_img = label_img.reshape((-1, 3))
mask = np.all(np.equal(palette_values, flat_label_img[:, None]), axis=2)
indices = np.where(mask)
labels = palette_keys[indices[1]]
# 将标签重新形状为与原始图像相同
label = labels.reshape(label_img.shape[:2])
return label.astype(np.uint8)
@TachibanaYoshino
我看您用了PIL的resize函数对图像进行重采样,请问四波段影像是不是不能这样重采样?有没有什么好的方法进行重采样?
歇息
img, label = img.resize((c.size_train[1], c.size_train[0]), Image.ANTIALIAS), label.resize(
(c.size_train[1], c.size_train[0]), Image.BILINEAR)
dadaset 的百度验证码 不是1d4x呀 显示错误
@TachibanaYoshino In ValImggenerator function, there is no data augmenting while TrainImggenerator used. if the validating data are small, the val_acc will be very low.
发现了数据集好像不太对,是做过什么处理吗?
数据中有(0,0,0)值,并且地物颜色与真实的也不一致。
out1 = Activation('softmax',name='l1')(Reshape((400 * 400, n_label))(R_out4))
out2 = Activation('softmax',name='l2')(Reshape((200 * 200, n_label))(R_out3))
out3 = Activation('softmax',name='l3')(Reshape((100 * 100, n_label))(R_out2))
out4 = Activation('softmax',name='l4')(Reshape((50 * 50, n_label))(R_out1))
请问网络层为什么要使用多个尺寸的label呢?
另外,您在推理预测的时候,好像并没有使用到多尺寸的pred
pred = model.predict(crop,verbose=2)
pred = pred[0]
pred = np.reshape(pred, (1, c.size_train[1] * c.size_train[0], c.n_label))
pred = np.argmax(pred, axis=2)
你好,我再使用您模型训练的时候,遇到总是卡在model.fit()那一步,训练开始后不打印任何信息,让我感觉像是卡了一样,请问这正常吗?
请问基于U-Net模型的改进点在哪里呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.