Hi,

I implemented a code to gabor filter cifar10 data but the images after being filtered and stacked are not clear like the original images. I think the problem is in the way I am using the values for gabor filter's parameters. These values should work because I got them form this paper 'Adding biological constraints to CNNs makes image classification more human-like and robust'

Here are the values:

kernel size = 31*31

thatas = 0, pi/8, pi/4, pi*3/8, pi/2, pi*5/8, pi*3/4, pi*7/8

offset (psi)= 0, pi/2, pi, pi*3/2

gamma = 0.5, 1

lambda = 5

bandwidth = 1,1.4,1.8

For sigmas I used equation (3) from paper 'Adding biological constraints to CNNs makes image classification more human-like and robust'

sigma_x = (lambda/pi)*(sqrt(np.log(2)/2))*((2**b + 1)/(2**b - 1))

sigma_y = sigma_x/gamma

I do not think the problem is in the code itself because I am using the ready gabor filter function provided from tensorflow:

tfio.experimental.filter.gabor(     input, freq, sigma=None, theta=0, nstds=3, offset=0, mode=None,     constant_values=None, name=None)

I used it such that

freq = 1/lambda

theta = theta

nstds = kernel size

offset = psi

sigma = [sigma_x, sigma_y]

More Mohammed Zidane's questions See All
Similar questions and discussions