大图像的语义分割 [英] semantic segmentation for large images

查看:234
本文介绍了大图像的语义分割的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理数量有限的大尺寸图像,每个图像都可以具有3072*3072像素.为了使用FCN或U-net训练语义分割模型,我构造了大量的训练集样本,每个训练图像均为128*128.

I am working on a limited number of large size images, each of which can have 3072*3072 pixels. To train a semantic segmentation model using FCN or U-net, I construct a large sample of training sets, each training image is 128*128.

在预测阶段,我要做的是将大图像切成小块,与128*128的训练集相同,然后将这些小块输入训练过的模型中,得到预测的蒙版.然后,我将这些小补丁缝在一起,以得到整个图像的蒙版.这是对大图像执行语义分割的正确机制吗?

In the prediction stage, what I do is to cut a large image into small pieces, the same as trainning set of 128*128, and feed these small pieces into the trained model, get the predicted mask. Afterwards, I just stitch these small patches together to get the mask for the whole image. Is this the right mechanism to perform the semantic segmentation against the large images?

推荐答案

输入图像数据: 我不建议直接将大图像(3072x3072)喂入caffe. 一批小图像将更适合内存,并且并行编程也将发挥作用. 数据增强也将是可行的.

Input image data: I would not advice feeding the big image (3072x3072) directly into the caffe. Batch of small images will fit better into the memory and parallel programming will too come into play. Data Augmentation will also be feasible.

大图的输出: 至于大图像的输出,最好在测试阶段将FCN的输入大小重塑为3072x3072.因为,FCN层可以接受任何大小的输入. 然后,您将获得3072x3072分割的图像作为输出.

Output for big Image: As for the output of big Image, you better recast the input size of FCN to 3072x3072 during test phase. Because, layers of FCN can accept inputs of any size. Then you will get 3072x3072 segmented image as output.

这篇关于大图像的语义分割的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆