Skip to main content
-1 votes
1 answer
79 views

I’m implementing a Gaussian filter, but I’m struggling with a few parts of the process. Here’s my code so far: def convolve(img, kernel): #Get properties row, column = img.shape diff = ...
PEREZ MONSIVAIS JOSE DE JESUS 's user avatar
1 vote
2 answers
168 views

I am trying to perform 2D matrix processing (convolution) by applying a kernel/filter to a large matrix. There is a built-in function convolve that can perform convolution. It offers three different ...
Glory2Ukraine's user avatar
1 vote
1 answer
130 views

I have input shape to a convolution (50, 1, 7617, 10). Here, 7617 is word vectors as rows, and 10 is the number of words in columns. I want to convolve column-wise and obtain (2631, 1, 7617, 1), 1 ...
cuneyttyler's user avatar
  • 1,395
0 votes
0 answers
64 views

I am currently working on a beam propagation code. The code basically consists of a transversal profile (a 2000x2000 array) which is propagated a small distance, then has its borders filtered, then ...
Henrique Guerra's user avatar
0 votes
0 answers
78 views

I'm trying to move some computer vision tasks to tensorflow. The most intensive ops are convolutions, like GaussianBlur. The timings I get using timeit suggest that the GPU equivalent is >10 x ...
Frank_Coumans's user avatar
0 votes
0 answers
67 views

I'm working on a GPU-accelerated 2D convolution in OpenCL for a 2048x2048 image using a 3x3 Sobel filter. I implemented two versions of the kernel: A naive version that uses only global memory. An ...
Mxneeb's user avatar
  • 19
0 votes
0 answers
35 views

I am using the following function to create a design matrix that is then used as input in a linear model. import numpy as np import torch def _compute_shifted( feats_t: torch.Tensor, delays: ...
J. O. Castro's user avatar
0 votes
0 answers
33 views

I'm making a convolution (1D, 2D and 3D) implementation that applies im2col (The unfold operation in the PyTorch library) to a zero-padded kernel instead of the input, to then multiply to the ...
Jetoge's user avatar
  • 1
1 vote
1 answer
92 views

I am trying to use scipy.ndimage.correlate to replicate the output of IDL convol() function. The IDL function only calculates elements where there is full overlap between the input and the kernel. So, ...
Arya Akmal's user avatar
1 vote
1 answer
114 views

I'm trying to figure out how to window two different frequency sine waves in such a way that their convolution produces a 0 signal. I have code that works for sine waves with integer periods: T = 1000 ...
werft60's user avatar
  • 19
0 votes
0 answers
40 views

I have an array img_data of shape (x, x, n_channels) and I want to convolve / smooth along the axis=2. Specifically, I would like the output shape to be (x,x,n_channels//3), after convolving the ...
Anks_Eagle's user avatar
0 votes
0 answers
29 views

I have several images for one sample. These images are picked randomly by tiling a high-dimensional bigger image. Each image is represented by a 512-dim vector (using ResNet18 to extract features). ...
hiu's user avatar
  • 9
1 vote
1 answer
113 views

I'm trying to implement an image filter in PyTorch that takes in two filters of shapes (1,3), (3,1) that build up a filter of (3,3). An example application of this is the Sobel filter or Gaussian ...
juxyper's user avatar
  • 35
2 votes
1 answer
157 views

I am trying to write code that convolves a 3D image with a 3D wavelet kernel that can be described using three independent parameters. I want to analyze the results of the convolution for all ...
Cameron Hastie's user avatar
1 vote
1 answer
124 views

While looking for a way to generate spatially varying noise, I came across this answer, which is able to do what I wanted. But I am getting confused about how the code works. From what I understand, ...
MollieVX's user avatar
  • 373

15 30 50 per page
1
2 3 4 5
141