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
20
votes
2 answers

OpenCV Mean/SD filter

I'm throwing this out there in hope that someone will have attempted something this ridiculous before. My goal is to take in an input image, and segment it based upon the standard deviation of a small window around each pixel. Bascially, this should…
gankoji
  • 853
  • 1
  • 10
  • 23
18
votes
1 answer

Implementing Watershed Segmentation in Java

I'm trying to write my own implementation of Watershed Segmentation for a project. I have a version that returns something resembling the correct segmentation given really trivial pictures. Unfortunately, it's super-slow/inefficient and it may or…
18
votes
5 answers

from_logits=True and from_logits=False get different training result for tf.losses.CategoricalCrossentropy for UNet

I am doing the image semantic segmentation job with unet, if I set the Softmax Activation for last layer like this: ... conv9 = Conv2D(n_classes, (3,3), padding = 'same')(conv9) conv10 = (Activation('softmax'))(conv9) model = Model(inputs,…
tidy
  • 4,747
  • 9
  • 49
  • 89
18
votes
5 answers

Why does one not use IOU for training?

When people try to solve the task of semantic segmentation with CNN's they usually use a softmax-crossentropy loss during training (see Fully conv. - Long). But when it comes to comparing the performance of different approaches measures like…
17
votes
3 answers

How to connect broken lines in a binary image using Python/Opencv

How can I make these lines connect at the target points? The image is a result of a skeletonization process. I'm trying to segment each line as a region using Watershed Transform.
16
votes
2 answers

How to implement multi-class semantic segmentation?

I'm able to train a U-net with labeled images that have a binary classification. But I'm having a hard time figuring out how to configure the final layers in Keras/Theano for multi-class classification (4 classes). I have 634 images and…
pepe
  • 9,799
  • 25
  • 110
  • 188
16
votes
2 answers

Cross Entropy Loss for Semantic Segmentation Keras

I'm pretty sure this is a silly question but I can't find it anywhere else so I'm going to ask it here. I'm doing semantic image segmentation using a cnn (unet) in keras with 7 labels. So my label for each image is (7,n_rows,n_cols) using the theano…
TSW
  • 661
  • 2
  • 7
  • 11
16
votes
1 answer

How to convert an image into character segments?

Often in the process of OCR, an image file is essentially cut into segments, and each character is recgnised as a segment each. For instance, has to be transformed to something like Also, is there any algorithm for Asian languages like Telugu…
tuxnani
  • 3,634
  • 6
  • 21
  • 33
15
votes
1 answer

Image Processing - Dress Segmentation using opencv

I am working on dress feature identification using opencv. As a first step, I need to segment t-shirt by removing face and hands from the image. Any suggestion is appreciated.
15
votes
1 answer

Classifying Python array by nearest "seed" region?

I have a raster of ecological habitats which I've converted into a two-dimensional Python numpy array (example_array below). I also have an array containing "seed" regions with unique values (seed_array below) which I'd like to use to classify my…
14
votes
1 answer

What exactly are the losses in Matterport Mask-R-CNN?

I use Mask-R-CNN to train my data with it. When i use TensorBoard to see the result, i have the loss, mrcnn_bbox_loss, mrcnn_class_loss, mrcnn_mask_loss, rpn_bbox_loss, rpn_class_loss and all the same 6 loss for the validation: val_loss,…
Mob
  • 409
  • 1
  • 5
  • 14
14
votes
2 answers

Can i finetune deeplab to a custom dataset in tensorflow?

I would like to customize deeplab for image segmentation using my own dataset ? Is this achievable by retraining ?
14
votes
5 answers

Python AttributeError: 'module' object has no attribute 'DIST_L2'

I am trying to use cv2.distanceTransform() method in Python. And I am getting an error when running the following line of code: dist_transform = cv2.distanceTransform(opening,cv2.DIST_L2,5) I get the following error when running this…
Vartika Sharma
  • 269
  • 1
  • 3
  • 10
14
votes
6 answers

how to remove background image and get fore image

there are two images alt text http://bbs.shoucangshidai.com/attachments/month_1001/1001211535bd7a644e95187acd.jpg alt text http://bbs.shoucangshidai.com/attachments/month_1001/10012115357cfe13c148d3d8da.jpg one is background image another one is a…
13
votes
6 answers

Cutting one image into multiple images using the Python Image Library

I need to cut this image into three parts using PIL and pick the middle part. How do I do it? http://thedilbertstore.com/images/periodic_content/dilbert/dt110507dhct.jpg