Questions tagged [image-segmentation]

Segmentation is a basic operation in image processing: its purpose is to group similar pixels into coherent regions = segments.

In image processing, image segmentation is the process of partitioning an image into multiple segments (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics.

The result of image segmentation is a set of segments that collectively cover the entire image. Each of the pixels in a region are similar with respect to some characteristic or computed property, such as color, intensity, or texture. Adjacent regions are significantly different with respect to the same characteristic(s).

Image segmentation is somewhat related to perceptual grouping: the spatial organization of visual stimuli. Some image segmentation algorithms attempt to employ Gestalt Laws of perceptual grouping to produce visually meaningful image segments.

Some popular image segmentation algorithms are Normalized cuts (by Shi and malik) and Mean-shift (by Comaniciu and Meer).

2542 questions
13
votes
3 answers

Tensorflow 2 throwing ValueError: as_list() is not defined on an unknown TensorShape

I'm trying to train a Unet model in Tensorflow 2.0 which takes as input an image and a segmentation mask, but I'm getting a ValueError : as_list() is not defined on an unknown TensorShape. The stack trace shows the problem occurs during…
13
votes
1 answer

What is imbalance in image segmentation?

I know the imbalance in an image classification problem such as the cat vs dog classification,if there are too many cat images and too few dog images. But I don't know how to adress an imbalance in a segmentation problem. For example,my task is to…
13
votes
2 answers

How does shift-and-stitch in a fully convolutional network work?

I am still struggling with the "shift and stitch" trick in FCN after repeating reading it many times. Can someone give some intuitional explanation?
lhao0301
  • 1,941
  • 4
  • 20
  • 26
13
votes
1 answer

Filling holes in objects that touch the border of an image

I'm trying to fill holes in the below image. When I use SciPy's binary_fill_holes(), I am generally successful, with the exception of objects that touch the image's border. Are there any existing Python functions that can fill holes in objects…
eagle34
  • 1,424
  • 1
  • 15
  • 19
12
votes
1 answer

Finding people silhouette in OpenCV C++

I would like to extract the silhouette of a human in a photo and remove the background. The photo could be taken of the full body, only the upper body or only the lower body. What I have done so far is track the face using Haar Cascades, but the…
mapetilan
  • 151
  • 1
  • 5
12
votes
2 answers

edge detection issue on Text detection in images

I am trying to implement Epshtein's paper(Detecting text in natural scenes with stroke width transform(2010)) on text detection in natural images. First step is edge detection. I am getting some extra edges inside my text. How should I remove…
Kaushik Acharya
  • 1,520
  • 2
  • 16
  • 25
12
votes
1 answer

Segmentation with Single Point Class Annotations via Graph Cuts?

I have a dataset of images that I am trying to segment. For each image in the dataset, experts have randomly selected single pixels/points and added class annotations as to what class that pixel belongs to. In other words, each image will have about…
12
votes
5 answers

How to test accuracy of segmentation algorithm?

I am dealing with a image classification problem. Before classification, images should be segmented. I tried several methods. My question is "how can i test accuracy of segmentation ?". I plan to compare final binary image with correct binary image…
11
votes
1 answer

use python open-cv for segmenting newspaper article

I'm using the code below for segmenting the articles from an image of newspaper. def segmenter(image_received): # Process 1: Lines Detection img = image_received gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # convert to binary gray…
Marzi Heidari
  • 2,660
  • 4
  • 25
  • 57
11
votes
2 answers

Loss Function is decreasing but metric function remains constant?

I am working on Medical Image Segmentation. I have two classes. class 0 as background and class 1 as a lesion. As the dataset is highly unbalanced, I am using loss function as (1 - weighted Dice coefficient) and metric function as dice coefficient.…
11
votes
1 answer

How is the smooth dice loss differentiable?

I am training a U-Net in keras by minimizing the dice_loss function that is popularly used for this problem: adapted from here and here def dsc(y_true, y_pred): smooth = 1. y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) …
11
votes
2 answers

Intuition behind U-net vs FCN for semantic segmentation

I don't quite understand the following: In the proposed FCN for Semantic Segmentation by Shelhamer et al, they propose a pixel-to-pixel prediction to construct masks/exact locations of objects in an image. In the slightly modified version of the…
11
votes
3 answers

How to load Image Masks (Labels) for Image Segmentation in Keras

I am using Tensorflow as a backend to Keras and I am trying to understand how to bring in my labels for image segmentation training. I am using the LFW Parts Dataset which has both the ground truth image and the ground truth mask which looks like…
AJ Venturella
  • 4,742
  • 4
  • 33
  • 62
11
votes
8 answers

How to annotate the ground truth for image segmentation?

I'm trying to train a CNN model that perform image segmentation, but I'm confused how to create the ground truth if I have several image samples? Image segmentation can classify each pixel in input image to a pre-defined class, such as cars,…
11
votes
3 answers

What does entropy mean in this context?

I'm reading an image segmentation paper in which the problem is approached using the paradigm "signal separation", the idea that a signal (in this case, an image) is composed of several signals (objects in the image) as well as noise, and the task…