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
0
votes
0 answers

Do polygon segmentation labels meet in Coco dataset?

I'm trying to train a model to do image segmentation using Yolov7. I understand the labels are specified in the polygon structure similar to the Coco dataset. My question is when the polygon data is specified, is there an assumption that the first…
0
votes
0 answers

Labeling intertwined images with polygons

I am developing an instance segmentation model with the Yolov8 model. While labeling the photos, I often hesitate about how the model will be affected. Can you help me with this by looking at the examples below Example: For example, in this photo,…
0
votes
0 answers

YOLOV5 AttributeError: 'list' object has no attribute 'shape'

enter image description heredoes anybody know why i got this error when i do mask_detection case with YOLOV5. How can i fix it? thanks for your answer~ I have tried to rewrite the code like shape = np.array(self.anchors[i], p[i]).shape.But it can…
0
votes
1 answer

How to Convert COCO Json to YOLOv8 segmentation format

def convert_coco_to_yolov8(coco_file): with open(coco_file) as f: coco = json.load(f) images = coco['images'] annotations = coco['annotations'] categories = {cat['id']: cat['name'] for cat in coco['categories']} os.makedirs('labels',…
0
votes
0 answers

Weak labels for image segmentation retraining

I have a trained UNet for segmenting crops and weeds, but it's currently not very robust regarding soil conditions and lighting. My idea is to retrain the model with a few images and easy to label point labels, when I notice degrading…
0
votes
0 answers

Image segmentation not working in Paper.js

I'm trying to perform image segmentation in Paper.js by loading an image, converting it to grayscale, creating a binary mask using a threshold, and then applying a polygon path as a clipping mask to the image. However, the resulting image is not…
0
votes
1 answer

Tensorflow loss function using both image and masks?

I am trying to train an image segmentation network. I want to make a custom loss that apart from y_true (ground truth mask) and y_pred (predicted mask), it will be based also on the grayscale image (of the current training image/batch). How can I do…
0
votes
0 answers

How to get polygon area from Yolov5 image segemented objects?

I am using Yolov5 for image segmentation which seems to be working well, it gives me the number of instances found. But now I need to figure out how to get the polygon area of each instance. I really can't figure out how to do this.
0
votes
1 answer

Contrastive Learning for Segmentation

I'm trying to use Contrastive Learning or Self Supervised Learning to segment 2D medical images. I want to use something like SimCLR or SimSiam, however, I'm getting stuck on how it should work (for example using this code). What should be my…
0
votes
0 answers

Why is my accuracy or dice score of my SegNet Model not increasing?

I am following a some code and a online tutorial to implement SegNet for image segmentation. I changed the number of out_channels to fit the target size in my model.py: import torch import torch.nn as nn import torch.nn.functional as F class…
0
votes
1 answer

How can I choose the wights of CrossEntropy loss?

I am dealing with a semantic segmentation model which classifies each pixel in 3 classes: background, liver and tumor. I am using the classic UNET architecture with CrossEntropyLoss from the PyTorch implementation. Since the dataset is imbalance…
0
votes
0 answers

In Mask rcnn training starts with huge loss after loading weight from last epoch

In my nuclei image segmentation, after loading the weights from last checkpoint it starts with huge losses again. I can not train the model for 30-40 epochs continue. I'm saving the weight in hdf5 format. I have tried to change the location of h5…
0
votes
1 answer

Image segmentation: how to represent the "dispersion" of detected areas?

I'm using python 3.9 to perform image segmentation (image => grey image => manual threshold on grey level => conversion from [0-255] to [0-1] image). At the end of the segmentation I obtained a binary image, with a white mask containing the areas I…
0
votes
1 answer

I am getting an Attribute error when creating a Pytorch model

This is my code: from torch import nn import segmentation_models_pytorch as smp from segmentation_models_pytorch.losses import DiceLoss class segmentationmodels(): def __init__(self): super(segmentationmodels,self).__init__() …
0
votes
1 answer

retraining the pre-trained model with new data and decreasing the model success with each training

I have BraTS2020 dataset and I want to train my UNet model with it. Although I use Colab Pro, I cannot work with all data on Colab due to RAM limitation. I divided the data into 4 parts and continued to retrain my saved model with each part. But…