1 / 55

Biologically Inspired Intelligent Systems

Biologically Inspired Intelligent Systems. Lecture 06 Dr. Roger S. Gaborski. Correlation (Convolution). Simple example. >> data = [.1 .1 .1 .1 .1 .1 .1 .5 .1 .1 .1 .5 1 .5 .1 .1 .1 .1 .1]; >> RF = [ -1 -1 1 2 1 -1 -1];. = -1*0 +-1*0 + 1*0 + 2*.1 + 1* .1 -1*.1 -1*.1 = .1 .

noel
Download Presentation

Biologically Inspired Intelligent Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Biologically Inspired Intelligent Systems Lecture 06 Dr. Roger S. Gaborski Roger S. Gaborski

  2. Correlation (Convolution) • Simple example >> data = [.1 .1 .1 .1 .1 .1 .1 .5 .1 .1 .1 .5 1 .5 .1 .1 .1 .1 .1]; >> RF = [ -1 -1 1 2 1 -1 -1]; = -1*0 +-1*0 + 1*0 + 2*.1 + 1* .1 -1*.1 -1*.1 = .1 Roger S. Gaborski

  3. Correlation (Convolution) • Simple example >> data = [.1 .1 .1 .1 .1 .1 .1 .5 .1 .1 .1 .5 1 .5 .1 .1 .1 .1 .1]; >> RF = [ -1 -1 1 2 1 -1 -1]; = -1*0 + -1*0 + 1*.1 + 2*.1 + 1*.1 +-1*1 = .2 Roger S. Gaborski

  4. Matlab >> data = [.1 .1 .1 .1 .1 .1 .1 .5 .1 .1 .1 .5 1 .5 .1 .1 .1 .1 .1]; >> RF = [ -1 -1 1 2 1 -1 -1]; >> res = imfilter(data,RF) res = Columns 1 through 8 0.1000 0.2000 0.1000 0 -0.4000 -0.4000 0.4000 0.8000 Columns 9 through 16 0 -1.7000 -1.3000 1.3000 2.6000 1.3000 -0.9000 -1.3000 Columns 17 through 19 -0.3000 0.2000 0.1000 Roger S. Gaborski

  5. Plot of data figure, stem(data, 'r') axis([0,20,-3 3]) Roger S. Gaborski

  6. 1D RF Roger S. Gaborski

  7. RED – input data BLUE – RF response Roger S. Gaborski

  8. A simple 1D RF • First, Recall from lecture 05, 128x128 RF applied to gray scale Flag image Roger S. Gaborski

  9. NONLINEAR RESPONSE About 40 pixels NLcon128 = double(imContrast128>0) .* imContrast128; figure, imshow(Con128, [ ]), title('Nonlinear imContrast128’) colorbar Roger S. Gaborski

  10. Closer Inspection Roger S. Gaborski

  11. Original gray scale pixel values Roger S. Gaborski

  12. 1D RF 128 Roger S. Gaborski

  13. Partial Match Roger S. Gaborski

  14. Strong Match Roger S. Gaborski

  15. Strong Mismatch Roger S. Gaborski

  16. figure, plot(Con128(98,:)) RF Response Roger S. Gaborski

  17. In Class Exercise - Correlation Roger S. Gaborski

  18. GOAL: Biologically Inspired Vision System • Extract low level features using biologically inspired feature detectors (receptive fields) • Implement a Focus of Attention (FOA) mechanism based on low level features • Modify the low level FOA with high level information • Extract complex features in regions of FOA • Perform classification on objects in FOA area Roger S. Gaborski

  19. Low Level Feature Extraction -1 • Form Contrast Image by convolving gray level input image with a set of Difference of Gaussian filters which model center on and center off circular receptive fields in retina • For Example: • Sizes 8x8, 16x16 and 32x32pixels • Small object will respond strongly to 8x8 DoG, large objects will respond strongly to 32x32 DoG Roger S. Gaborski

  20. Vision Model of Retinal Processing Contrast Images imConv8 imConv16 imConv32 Retina Model 8x8, 16x16 and 32x32 circular receptive fields Gray Level Image Roger S. Gaborski

  21. Low Level Feature Extraction -2 • Convolve Contrast Image*images with Gabor modeled directional receptive fields • 0, 45, 90 and 135 degrees • Size: 7x7, 15x15 and 31x31 • Rectify resulting image (absolute value) • Know as S1 Cells Roger S. Gaborski

  22. Vision Model of Visual Cortex Modeling – Simple Cells S1 WHERE n = 0, 45, 90 and 135 degrees n degrees 7x7 Gabor n degrees 15x15 Gabor n degrees 31x31 Gabor n degrees 7x7 Gabor n degrees 15x15 Gabor n degrees 31x31 Gabor n degrees 7x7 Gabor n degrees 15x15 Gabor n degrees 15x15 Gabor Contrast Images imConv8 imConv16 imConv32 (Retina Model) Retina Model 8x8, 16x16 and 32x32 circular receptive fields Gray Level Image Roger S. Gaborski

  23. Summary:Simple Cell Directional Images • Three contrast images (Retinal Model) • DoG8, DoG16 and DoG32 • Four Orientation Receptive Fields (Simple Visual Cortex Processing) • 0, 45, 90 and 135 degrees • Three sizes for each RF • 7x7, 15x15 and 31x31 3x4x3 = 36 Simple Cell images Roger S. Gaborski

  24. Orientation Sensitivity You can quantify a neuron’s response in terms of its firing rate, the number of action potentials that occur per unit of time The response of the cell depends on the location and orientation Of the stimulus pattern Roger S. Gaborski

  25. Directional Receptive Fieldsare Modeled with Gabor FunctionsCosine Grating * 2D Gaussian Roger S. Gaborski

  26. Edge Direction and Gradients Edge 90 Degrees 0 1.0 Gradient: 0 degrees Roger S. Gaborski

  27. Cosine Grating and Slice Edge Direction 90 degrees 0 Degrees Cosine Grating Slice Indicated by Blue Bar Roger S. Gaborski

  28. 45 Degrees Cosine Grating Edge Direction 135 degrees Roger S. Gaborski

  29. GratingOrientation – Gradient Orientation function [im_cosim_sin] = MakeGrating2( orient, numOfSamples, numOfCycles) %parameters: 0,10,2 %numOfSamples = 10 willgenerate a 63x63 im_sin, im_cos %GradientOrientation - Notedgeorientation %orient = 2*pi - (orient*pi/180); orient = (orient*pi/180); % CONVERT TO RADIANS %creategrading step = 1/numOfSamples; [x,y] = meshgrid( -pi:step:pi, -pi:step:pi); %SIZE OF x IS 63x63, same for y ramp = (cos (orient) * x) - (sin(orient)*y); %sin fcnparameteris in radians figure, imagesc(ramp), colormap(gray) im_sin = sin(ramp*numOfCycles); im_cos = cos(ramp*numOfCycles); figure, imagesc(im_cos), colormap(gray), title('Cos Grating') figure, imagesc(im_sin), colormap(gray), title('Sin Grating') Roger S. Gaborski

  30. Ramp Roger S. Gaborski

  31. ramp*numOfCycles numOfCycles = 2 NOTE change in range Roger S. Gaborski

  32. im_sin = sin(ramp*numOfCycles); Roger S. Gaborski

  33. im_cos = cos(ramp*numOfCycles); Roger S. Gaborski

  34. To obtain the Gabor function we need to multiply the grating by a 2D Gaussian Roger S. Gaborski

  35. Gaussian and Gabor %Generate Gaussian [grat_cos, grat_sin ] = MakeGrating2(45,10,2); filtSize = min(size(grat_cos)); x = linspace(-1,1,filtSize)*filtSize/2; sd = 12; y = (1/sqrt(2*pi*sd)).*exp(-.5*((x/sd).^2)); filt = (y'*y);filt=filt./max(filt(:)); %Gaussian figure, imagesc(filt), title('filt') colormap(hot) Roger S. Gaborski

  36. %Generate Gabor Gabor_sin = grat_sin .* filt; %Gratingmultipied by 2D Gaussian figure, imagesc(Gabor_sin), axis square, colorbar title('Gabor\_sin') Gabor_cos = grat_cos .* filt; figure, imagesc( Gabor_cos), axis square title('Gabor\_cos') Gabor_cos0_63 = Gabor_cos; Gabor_cos0_31 = imresize(Gabor_cos,[31 31], 'bicubic'); Gabor_cos0_15 = imresize(Gabor_cos,[15 15], 'bicubic'); Gabor_cos0_7 = imresize(Gabor_cos,[7 7], 'bicubic'); Roger S. Gaborski

  37. 90 Degree Gradient Roger S. Gaborski

  38. 90 Degree Gradient Roger S. Gaborski

  39. 90 Degree Gradient will strongly respond to bars at 0 degrees Roger S. Gaborski

  40. Multiply 2D Grating by 2D Gaussian Roger S. Gaborski

  41. Roger S. Gaborski

  42. Roger S. Gaborski

  43. Gabor Models of Directional Receptive Fields: Gradient Directions 135 degrees 90 degrees 45 degrees 0 degrees Roger S. Gaborski

  44. Receptive Fields measure in the cat Roger S. Gaborski

  45. 63x63 Roger S. Gaborski

  46. 31x31 Roger S. Gaborski

  47. 15x15 Roger S. Gaborski

  48. 7x7 Roger S. Gaborski

  49. Process Image with RFCorrelation approach (no rotation of RF) Roger S. Gaborski

  50. Pattern One Image Roger S. Gaborski

More Related