539 questions
0
votes
0
answers
58
views
Keras to_categorical results in different memory allocation error every re-run
I'm working on a semantic segmentation model through U-net for classifying 11 categories. After splitting my image and label data into training and testing arrays, I turn the arrays into Unsigned ...
0
votes
1
answer
141
views
Preventing GPU memory leak due to a custom neural network layer
I am using the MixStyle methodology for domain adaptation, and it involves using a custom layer that is inserted after every encoder stage. However, it is causing VRAM to grow linearly, which causes ...
0
votes
1
answer
72
views
Problem in fine tuning DeepLabV3Plus using keras_cv for Semantic Segmentation
I'm using open-images-v7 dataset (accessing via fiftyone lib) and keras_cv lib to fine tune DeepLabV3Plus with mobilenet_v3_small backbone, but the accuracy doesn't improve with epochs at all, and I'm ...
2
votes
2
answers
283
views
Cleaning up scanned book page edges with OpenCV
I have several scanned book images that I'm trying to clean up. They've been thresholded and partially cleaned with OpenCV, but there are artifacts around the edges that I've been struggling to remove....
0
votes
0
answers
58
views
unet overfiting on semantic segmentation
I am experiencing an issue with overfitting, and despite trying various regularization methods, such as data augmentation, I still encounter this problem. Can anyone help me or suggest a solution?
...
0
votes
1
answer
164
views
mediapipe Image Segmentation with Dual-Output TFLite Model
I'm working on implementing image segmentation using my own custom TFLite model, following the code example from MediaPipe. Here's my code:
options = vision.ImageSegmenterOptions(
base_options=...
1
vote
0
answers
93
views
Instance Segmentation of Curved Surfaces
I have a render of four identical objects and need to segment the curved surfaces and classify them (associate similar ones with each other).
All the objects are positioned at the same angle relative ...
2
votes
1
answer
112
views
How to detect (most) mortared stones with OpenCV findContours
I need to correctly outline as many as possible of the mortared stones in a street zone. The code below correctly detects some of them in the stones image "in.jpg", but it is not obvious why ...
2
votes
1
answer
115
views
MethodError in Training Minimal U-Net
I need to implement a U-Net in Julia using Flux.jl. The ultimate goal is to train a neural network for a scientific problem. As a first step, I decided to experiment with the KITTI benchmark dataset.
...
1
vote
0
answers
273
views
Changing color of segments from YOLO segment predicted images
I am working on an object detection project, detecting three types of objects in a set of images. This image shows a Sample of yolo segment model prediction model image.
The issue I have is that ...
4
votes
0
answers
127
views
Unable to Use tf.image.rot90
I am working on a semantic segmantation problem, where x is of shape (batch_size,1,256,256) and y ( mask) is of shape (batch_size,2,256,256), where 2 is the number of classes and i am working with ...
1
vote
0
answers
48
views
problem with brain tumor segmentation 2D Unet with Dice_coef_loss
Knowing that I am training using the 4 MRI modalities, when I use categorical cross-entropy, in this tutorial from brain_tumor_segmentation_u_net the IOU and Dice coefficients work fine. However, when ...
0
votes
1
answer
103
views
How to modify my code to handle RGBX (4-channel) images for semantic segmentation?
I'm new to this field and have been following a U-Net tutorial using 3-channel RGB images for semantic segmentation https://www.youtube.com/watch?v=68HR_eyzk00&list=...
1
vote
0
answers
936
views
SAM 2.1 what is causing hydra.errors.MissingConfigException: Primary config module 'sam2' not found?
I am trying to fine tune the new SAM 2.1 segmentation model using the roboflow guide given here: Sam 2.1 roboflow guide
This code runs all fine when using google collab and no errors are encountered. ...
0
votes
1
answer
216
views
Applying non-maximum suppression for edge thinning to an image of edge gradient magnitude in R
I am trying to use Canny edge detection to extract dirt circles from an image using the imager package in R. In my sample image (here) there are 3 circles. I have thresholded the red band as it shows ...
0
votes
1
answer
248
views
module 'keras.api.backend' has no attribute 'clip'
I use Colab for coding and get this error:
AttributeError: module 'keras.api.backend' has no attribute 'clip'.
I have tried to upgrade TensorFlow and Keras, but I still get the same error.I get this ...
1
vote
1
answer
687
views
Unable to obtain link to download the ADE20k-full dataset
I was trying to register here (https://groups.csail.mit.edu/vision/datasets/ADE20K/) to get the link to download the ADE20k-full dataset but I keep getting the following error: "Fatal error ...
0
votes
1
answer
51
views
convolution-deconvolution while maintaining the original image size
I am trying to implement pspnet in tensorflow.
It requires a pooling module which takes in the input, along with several kernel sizes:
does average pooling on the input with the each kernel ...
0
votes
0
answers
51
views
Cascade Segmentation - Are the channels set up correctly?
I want to train a machine learning model for fine masked details in 2D DICOM images. I have 500 images ready for labeling/annotating. Can I use this technique or have I misunderstood?
Annotation of ...
0
votes
1
answer
186
views
How to use SegFormer encoder and decoder separately?
I am trying to understand SegFormer model, and would like to use encoder and decoder separately with different models.
I have tried looking into official implementation which is based on mmseg and ...
0
votes
1
answer
98
views
Extract and replace pixel values based on their area or width
I have a segmented image as shown below
There is a very thin line of different colors on the edges of the vehicle (Red patch where the person is driving). I would like to get rid of this thin line by ...
0
votes
1
answer
265
views
RLE -> Mask for semantic segmentation | Azure Semantic Segmentation (Preview)
I used Azure Data Labelling to prepare my Semantic Segmentation (Preview) Dataset and export it from Azure into my Local System. Now I have images in images folder and Labels in Json file.
I'm trying ...
0
votes
1
answer
79
views
Passing ImageDataGenerator to segmentation model's U-net for multiclas classification
How can I pass an ImageDataGenerator to segmentation_model's U-net,
data_generator = ImageDataGenerator(
rescale = 1./255.
)
train_dataset_images = data_generator....
1
vote
0
answers
444
views
Creating own encoder for Segmentation Models Pytorch
https://smp.readthedocs.io/en/latest/insights.html
I am attempting to create my own encoder for the smp DeepLabV3+ model. I have some locally trained encoders that I wanted to use but first off, I ...
0
votes
0
answers
213
views
ValueError: as_list() is not defined on an unknown TensorShape. Image and mask shape looks correct
I am trying to adapt Tensorflow's example UNet for my purposes. The main difference is this UNet takes 128x128 images and masks and my images are 512x512 and my masks are 100x100.
I am getting this ...
-1
votes
1
answer
203
views
Problem in extracting human silhouettes from a segmented image (felzenszwalb)
I am currently working on extracting binary silhouette of people in an image in the publicly available UT interaction dataset. I have applied felzenszwalb's segmentation on the image to divide the ...
1
vote
1
answer
306
views
Best practice to train DeepLabV3 with different resolution images in PyTorch
I am trying to train PyTorch's DeepLabV3 on COCO 2017 dataset for semantic segmetation but I am unsure on how to deal with the different resolution images. I know that DeepLab's architecture can ...
-1
votes
1
answer
110
views
Issue with Plotting Predicted Masks
I am currently working on a deep learning project 'leaf disease segmentation'. I have trained a model over 50 epochs and obtained the following accuracy and loss metrics:
Train Loss: 19.4736, Train ...
2
votes
0
answers
56
views
Python Interpreter State Error During Tensorflow Model Training with Early Stopping
I'm training a multi-class U-Net model for medical image segmentation using TensorFlow and Keras, and I encounter a specific error when the training process stops via early stopping. The error does ...
0
votes
1
answer
323
views
How to add the bounding box values to the labels text files during prediction with a trained YOLO-V8 instance segmentation model?
I trained a YOLO-V8 instance segmentation model to segment an object with class label 0. I used the CLI to instantiate the trained model and predict on the test data.
!yolo task=segment mode=predict ...
1
vote
0
answers
50
views
Should a label-map in AWS SageMaker always contain a scaling factor and label names?
I am using CVAT to create my annotations and export them in cityscape format.
For training I use the SageMaker Python SDK as recommended.
So my annotation masks are single channel 8-bit PNG files, as ...
1
vote
0
answers
107
views
segment_anything_fast SamAutomaticMaskGenerator throwing a BackendCompilerFailed-Error
I am trying to set up the SAM-Model from segment_anything_fast by pytorch. I have followed the installation instructions and also added "export SEGMENT_ANYTHING_FAST_USE_FLASH_4=0" as an ...
2
votes
0
answers
188
views
Segmenting 3D Cell Images with Omnipose in Python
I am trying to segment 3D tiff cell images with Omnipose but am running into a shape mismatch error. I am following the example code on the Omnipose documentation and have even tested with the same ...
3
votes
1
answer
347
views
contour/object detection in OpenCV
I have some experience of OpenCV, but really having problems detecting contours in the images below. I am able to detect some of the black circles shown, but these are dirt on the sensor, and I ...
-1
votes
1
answer
190
views
How to count total number of pixels of each class for semantic segmentation in detectron2
I want to count the total number of pixels for each segmented class, I only need the count for each general objects, like one class for every vehicle, one for every person and so on. For this reason, ...
1
vote
2
answers
241
views
CUDA out of memory, when fine-tuning segformer mit-b0
I am trying to fine-tune mit-b0 segmentation model on satellite images to segment rice paddies on RTX 2070 with 8 GB VRAM but I get CUDA out of memory at the beginning of the first epoch. I believe I ...
-1
votes
1
answer
60
views
Confusion about training and prediction images' shape
I'm doing semantic segmentation task in Keras - classifying trees from background. My images are initially of shape (256, 256, 3). However, I want to resize them to (128, 128) to speed up the training....
0
votes
1
answer
273
views
Multiclass UNet with n-dimensional satellite images
I'm trying to use a UNet in Pytorch to extract prediction masks from multidimensional (8 band) satellite images. I'm having trouble getting the prediction masks to look somewhat expected/coherent. I'm ...
1
vote
1
answer
1k
views
trying to perform knowledge distillation using KL divergence loss . the loss is too high
KL divergence loss too high
I'm trying to perform knowledge distillation . For my student loss I have used cross entropy loss and for my knowledge distillation loss I am trying to use KL divergence ...
0
votes
1
answer
146
views
model. fit() doesn't work when I use class_weight with image segmentation
When creating the dictionary with the weight values, model.fit() does not train, it shows the following error
I used the following code
import pathlib
import tensorflow as tf
import imageio
import ...
0
votes
1
answer
242
views
model.fit() class weights do not work when training the model
when calculating classes_weight with
from sklearn.utils import class_weight
class_weights = class_weight.compute_class_weight(class_weight="balanced",
classes=np.unique(...
0
votes
1
answer
163
views
Read 4 channel images with CV2 for Semantic segmentation
I'I'm working on a Unet semantic segmentation project where I need to process 4-channel images using OpenCV in Python, and I'm new to this field. I found a tutorial on YouTube (link to tutorial) for ...
0
votes
1
answer
68
views
SNN model slows down after each iteration and then runs out of memory
I'm implementing a spiking version of a fully convolutional network (UNet). I tested the normal model without the LIF neurons and that works fine although it's quite memory intensive so I have to use ...
0
votes
1
answer
207
views
How can I detect the two ellipses on a roulette wheel?
I have the image below:
How can I detect the two ellipses below:
I want to have a mask only of this enclosed area to later detect the ball.
This is what I have tried but it does not find it ...
0
votes
1
answer
531
views
Facing an issue while training UNet for Image Segmentation
I am using the keras_unet_collection python library's U-Net model to perform self supervised learning on images (spectrograms; dim=(376, 128)) to learn background/foreground masks. I am very new to ...
0
votes
0
answers
136
views
Split concave object mask into 1 or more convex sub-sections
I am working with an object detection model. It works pretty well, but the output is a mask, and I need bounding boxes. Naively, I can just use OpenCV to draw a bounding box around the contours of ...
0
votes
1
answer
451
views
Image polygon detection from image
I am looking for a polygon detection library in Python that isn't an implementation in OpenCV via edge detectors and contours (this gives me unsatisfactory results).
In OpenCV I used grayscale Canny ...
0
votes
0
answers
33
views
Imbalanced Diabetic Retinopathy Segmentation: Overfitting and Loss Function Choice
I'm training a U-net model for segmenting microaneurysms in diabetic retinopathy images. The dataset is imbalanced, with the background class (healthy tissue) dominating at around 96% and the ...
1
vote
0
answers
159
views
importing library in kaggle notebook
to install segmentation-models-pytorch I ran
!pip install -U segmentation-models-pytorch
and when importing
import segmentation_models_pytorch as smp
I get error:
ERROR: After October 2020 you may ...
0
votes
2
answers
156
views
Runtime Error: The size of tensor a (524288) must match the size of tensor b (131072) at non-singleton dimension 0
I'm trying to perform leaf disease image segmentation using Github code. Here is the code, i am facing this issue "The size of tensor a (524288) must match the size of tensor b (131072) at non-...