Convolutions

Keras के साथ Image Modeling

Ariel Rokem

Senior Data Scientist, University of Washington

इमेज में संबंधों का उपयोग

  • प्राकृतिक इमेज में स्पैशियल संबंध होते हैं
  • जैसे, किसी कंटूर या एज के साथ पिक्सेल
  • हम इन संबंधों का उपयोग कैसे करें?
Keras के साथ Image Modeling

जैविक प्रेरणा

Keras के साथ Image Modeling

Convolution क्या है?

array = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])

kernel = np.array([-1, 1])
conv = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0])
conv[0] = (kernel * array[0:2]).sum() conv[1] = (kernel * array[1:3]).sum() conv[2] = (kernel * array[2:4]).sum() ...
for ii in range(8): conv[ii] = (kernel * array[ii:ii+2]).sum() conv
array([0, 0, 0, 0, 1, 0, 0, 0, 0])
Keras के साथ Image Modeling

एक-आयामी Convolution

array = np.array([0, 0, 1, 1, 0, 0, 1, 1, 0, 0])
kernel = np.array([-1, 1])

conv = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0]) for ii in range(8): conv[ii] = (kernel * array[ii:ii+2]).sum()
conv
array([ 0,  1,  0, -1,  0,  1,  0, -1,  0])
Keras के साथ Image Modeling

इमेज Convolution

Keras के साथ Image Modeling

इमेज Convolution

Keras के साथ Image Modeling

द्वि-आयामी Convolution

kernel = np.array([[-1, 1], 
                   [-1, 1]])


conv = np.zeros((27, 27)
for ii in range(27): for jj in range(27): window = image[ii:ii+2, jj:jj+2] conv[ii, jj] = np.sum(window * kernel)
Keras के साथ Image Modeling

Convolution

Keras के साथ Image Modeling

अभ्यास करते हैं!

Keras के साथ Image Modeling

Preparing Video For Download...