Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with CNN (GDG Gandhinagar)

Getting Started with CNN (GDG Gandhinagar)

Get Start with Convolution Neural Network

Avatar for Manthan Ladva

Manthan Ladva

August 31, 2019

More Decks by Manthan Ladva

Other Decks in Technology

Transcript

  1. Topics:- 1. Computer Vision 2. CNN & Types 3. Edge

    Detection 4. Construction & Working of CNN 5. CNNs architectures
  2. 3 0 1 2 7 4 1 5 8 9

    3 1 2 7 2 5 1 3 0 1 3 1 7 8 4 2 1 6 2 8 2 4 5 2 3 9 E.G.:- * 1 0 -1 1 0 -1 1 0 -1 Convolution Step 1 :-- (3*1 + 1*1 + 2*1 + 0*0 + 5*0 + 7*0 + 1*-1 + 8*-1 + 2*-1) “1 Step Aagad Vadho” Step 2 :-- (0*1 + 5*1 + 7*1 + 1*0 + 8*0 + 2*0 + 2*-1 + 9*-1 + 5*-1) . “Evi Rite Niche” Step 5 :-- (1*1 + 2*1 + 0*1 + 5*0 + 7*0 + 1*0 + 8*-1 + 2*-1 + 3*-1) -5 -4 0 8 -10 -2 2 3 0 -2 -4 -7 -3 -2 -3 -16 6 x 6 Vertical Filter of 3x3 =
  3. Samaj me aya? 1 0 -1 2 0 -2 2

    0 -1 3 0 -3 10 0 -10 3 0 -3 Sobel Filter Schar Filter
  4. * * = = 6x6x3 3x3x3 4x4 Horizontal Vertical 4x4x2

    (n-f+1) x (n-f+1) x nc’ Where:- nc’ = no. of channels Here( 4x4x2 )
  5. Padding (p):- 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 * = Pela mate ni formula (Valid) :- (n-f+1 , n-f+1) After adding padding ni formula (Same) :- (n+2p-f+1 , n+2p-f+1) nXn fXf pXp n+2p-f+1 = n p = (f-1)/2
  6. Stride (s) :- a b c d e f g

    h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 4 4 1 0 2 -1 0 3 1 2 3 4 5 6 7 8 9 * = | ((n + 2p -f)/s) +1 | x | ((n + 2p -f)/s) +1 | 7x7 3x3 3x3 S = 2
  7. Pooling :- 1 2 3 4 5 6 7 8

    9 10 11 12 13 14 15 16 6 8 14 16 4x4 2x2 Used for Image compression Hyperparameters :- 1. Filter Size 2. Strides 3. Max Pool or Average Pool nh x nw x nc | ((nh-f)/s)+1 | x | ((nh-f)/s)+1 | x nc Note :- Parameters che j nai
  8. Image Conv - 1 Pool - 1 Conv - 2

    Pool - 1 asi = 32x32x3 f=5x5 s=1 28x28x6 14x14x6 10x10x16 5x5x16 NN Layer 1 NN Layer 2 NN Layer 3 120x1 84x1 10x1 E.g. :- Layer 1 Layer 2 f =2x2 s=2 maxpool f=5x5 s=1 f =2x2 s=2 maxpool Part 1
  9. Conv. formula :- | ((n + 2p -f)/s) +1 |

    Pool. formula :- | ((n-f)/s)+1 | Parameters for. :- [ {f x f} + 1] x nc asi = Activation Size ash = Activation Shape = (solve asi) Activation Size ↓ Parameters ↑ Part 2
  10. ... Conv. Layer Softmax Object categories :- - Pedestrian -

    Car - MotorCycle - Background {0,0} {1,1} bx,by,bh,bw .
  11. Object categories :- - Pedestrian - Car - MotorCycle -

    Background Pc Bx By Bh Bw Cp Cc Cm 0 ? ? ? ? ? ? ? 1 Bx By Bh Bw 0 1 0 y =
  12. Yolo Algorithm :- ( You only look once ) Pc

    Bx By Bh Bw Cp Cc Cm y = 1 Bx By Bh Bw 0 1 0 0 ? ? ? ? ? ? ? Target Output = 3x3x8 4 & 6
  13. Intersection Over Union ( IOU ) :- IOU = Size

    of -------------------- Size of “ Correct ” if IOU ≥ 0.5
  14. Anchor Boxes :- Pc Bx By Bh Bw Cp Cc

    Cm Pc Bx By Bh Bw Cp Cc Cm y = } } } Anchor Box 1 } } } } } } Anchor Box 2 } } } Target Output = 3x3x2x8
  15. Transfer Learning :- Trained model Data Lock The layers Call

    our Data Fit it ! Step to use T.L. -->
  16. Dropouts in Transfer Learning :- Using a transfer learning also

    results overfitting sometimes. To overcome that we have this “Ram Baan Ellaj”, called Dropouts.
  17. Thanks for your valuable time... LinkedIn :- https://www.linkedin.com/in/manthan-ladva-506a04116/ Twitter :-

    https://twitter.com/manthan_ladva Github :- https://github.com/manthan-ladva