image-segmentation

Tensorflow: How to create a Pascal VOC style image

半腔热情 提交于 2019-12-01 02:41:36
问题 I'm working on implementing a semantic segmentation network in Tensorflow, and I'm trying to figure out how to write out summary images of the labels during training. I want to encode the images in a similar style to the class segmentation annotations used in the Pascal VOC dataset. For example, let's assume I have a network that trains on a batch size of 1 with 4 classes. The networks final predictions have shape [1, 3, 3, 4] Essentially I want to take the output predictions and run it

What is the meaning of “history” inside BackgroundSubtractorMOG2?

时光怂恿深爱的人放手 提交于 2019-12-01 01:46:09
问题 I'm on OpenCV for java (but that's not relevant I guess). I'm using the BackgroundSubtractorMOG2 class which is (poorly) referenced here. I have read and understood the Zivkovic paper about the algorithm which you can find here. BackgroundSubtractorMOG2 takes in its constructor a parameter called history . What is it, and how does it influence the result? Could you point me to its reference inside the paper, for example? From the class source code, line 106, it is said that alpha = 1/history

OpenCV - Confusion using calcHist

核能气质少年 提交于 2019-11-30 21:06:41
I've read the documentation for calcHist() many times, but I think my inexperience with OpenCV and rusty programming skills are completely precluding me from understanding it. I'm looking to count pixels in one channel of an HSV image (Hue, or channel[0]) for segmentation purposes using 10 bins that closely approximate color according to something like (let's use this as an example, I stole the ranges off the web - fwiw, it seems erroneous to omit purple-red): Red: 0-19 & 330-360 Red-Yellow (RY): 20-49 Yellow: 50-69 YG: 70-84 Green: 85-170 GB: 171-191 Blue: 192-264 BP: 265-289 Purple: 290-329

noise in image segmentation result

六眼飞鱼酱① 提交于 2019-11-30 16:34:37
I am doing a image segmentation task based on deep convolutional neural network. The network structure is from this paper , and the structure can be seen in the picture: FCN used in image segmentation . The network is designed based on Fully Convolutional Network and DCAN . The data set is the public benchmark dataset of Gland Segmentation Chalenge Contest in MICCAI 2015 (also named as Warwick-QU dataset.) I use this network to do the segmentation task. However in my result, I always noticed a fixed pattern of noise: the little white crossing in the predicted image: Prediction results with

Gaussian Mixture Models of an Image's Histogram

点点圈 提交于 2019-11-30 13:40:55
I am attempting to do automatic image segmentation of the different regions of a 2D MR image based on pixel intensity values. The first step is implementing a Gaussian Mixture Model on the image's histogram. I need to plot the resulting gaussian obtained from the score_samples method onto the histogram. I have tried following the code in the answer to ( Understanding Gaussian Mixture Models ). However, the resulting gaussian fails to match the histogram at all. How do I get the gaussian to match the histogram? import numpy as np import cv2 import matplotlib.pyplot as plt from sklearn.mixture

Can Caffe classify pixels of an image directly?

て烟熏妆下的殇ゞ 提交于 2019-11-30 13:21:47
问题 I would like to classify pixels of an image to "is street" or "is not street". I have some training data from the KITTI dataset and I have seen that Caffe has an IMAGE_DATA layer type. The labels are there in form of images of the same size as the input image. Besides Caffe, my first idea to solve this problem was by giving image patches around the pixel which should get classified (e.g. 20 pixels to the top / left / right / bottom, resulting in 41×41=1681 features per pixel I want to

How to test accuracy of segmentation algorithm?

冷暖自知 提交于 2019-11-30 12:46:46
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 based on pixel differences in order to get a success rate. Is there a more efficient way to compare edges of two binary image, instead of this? Measuring the quality of image segmentation is a topic well studied in the computer vision community. You can see this method that is suitable for binary segmentations. There is also this method for multiple

object (Car) Detection and segmentation

 ̄綄美尐妖づ 提交于 2019-11-30 10:24:56
I am trying to segment cars from image that consist of only one car and an easy background like but what I get from my implementation is this and respectively but it works very easily on almost already segmented images like. giving results like The Code I am using is import cv2 import numpy as np THRESH_TYPE=cv2.THRESH_BINARY_INV def show(name,obj): cv2.imshow(name,obj) cv2.moveWindow(name, 100, 100) cv2.waitKey(0) cv2.destroyAllWindows() def process_end(new): drawing = np.zeros(o.shape,np.uint8) # Image to draw the contours contours,hierarchy =cv2.findContours(new,cv2.RETR_TREE,cv2.CHAIN

OpenCV - GrabCut with custom foreground/background models

ぃ、小莉子 提交于 2019-11-30 10:06:33
I want to use the GrabCut algorithm implemented on OpenCV. As shown in the documentation this is the function signature: void grabCut( InputArray img, InputOutputArray mask, Rect rect, InputOutputArray bgdModel, // * InputOutputArray fgdModel, // * int iterCount, int mode=GC_EVAL) The mode param, indicates how to initialize the algorithm, either with the rect (a rectangle bounding box) or with the mask (a matrix whose values correspond to user paintings of the foreground/background regions. I already have the color models for both the FG and the BG, so ideally I shouldn’t need to provide a

Detect rings/circuits of connected voxels

China☆狼群 提交于 2019-11-30 09:38:44
问题 I have a skeletonized voxel structure that looks like this: The actual structure is significantly larger than this exampleIs there any way to find the closed rings in the structure? I tried converting it to a graph and using graph based approaches but they all have the problem that a graph has no spatial information of node position and hence a graph can have multiple rings that are homologous. It is not possible to find all the rings and then filter out the ones of interest since the graph