| description | π¦ Convolutional Neural Networks Codes |
|---|
This section will be filled by codes and notes gradually
- πΆ Basic CNNs
- π CNN Visualization
- π¨βπ©βπ§βπ§ Human vs Horse Classifier with CNN
- π± Dog vs Cat Classifier with CNN
- π¨ Multi-Class Classification
- π Tensorflow.js based hand written digit recognizer
- Rock Paper Scissors is an available dataset containing 2,892 images of diverse hands in Rock/Paper/Scissors poses.
- Rock Paper Scissors contains images from a variety of different hands, from different races, ages and genders, posed into Rock / Paper or Scissors and labelled as such.
π All of this data is posed against a white background. Each image is 300Γ300 pixels in 24-bit color
We can get info about our CNN by
model.summary()And the output will be like:
Layer (type) Output Shape Param #
=================================================================
conv2d_18 (Conv2D) (None, 26, 26, 64) 640
_________________________________________________________________
max_pooling2d_18 (MaxPooling (None, 13, 13, 64) 0
_________________________________________________________________
conv2d_19 (Conv2D) (None, 11, 11, 64) 36928
_________________________________________________________________
max_pooling2d_19 (MaxPooling (None, 5, 5, 64) 0
_________________________________________________________________
flatten_9 (Flatten) (None, 1600) 0
_________________________________________________________________
dense_14 (Dense) (None, 128) 204928
_________________________________________________________________
dense_15 (Dense) (None, 10) 1290
=================================================================π©βπ» For code in the notebook:
Here πΎ
- π The original dimensions of the images were 28x28 px
- 1οΈβ£ 1st layer: The filter can not be applied on the pixels on the edges
- The output of first layer has 26x26 px
- 2οΈβ£ 2nd layer: After applying
2x2 max poolingthe dimensions will be divided by 2- The output of this layer has 13x13 px
- 3οΈβ£ 3rd layer: The filter can not be applied on the pixels on the edges
- The output of this layer has 11x11 px
- 4οΈβ£ 4th layer: After applying
2x2 max poolingthe dimensions will be divided by 2- The output of this layer has 5x5 px
- 5οΈβ£ 5th layer: The output of the previous layer will be flattened
- This layer has
5x5x64=1600units
- This layer has
- 6οΈβ£ 6th layer: We set it to contain 128 units
- 7οΈβ£ 7th layer: Since we have 10 categories it consists of 10 units
π΅ π΅
The visualization of the output of each layer is available here π