Model2
Closed this issue · 6 comments
Try adding few more classes (make it 100) and calculate efficiency. Data will be given by database team.
The database team will soon upload the updated spreadsheet. So use that data and try to improve accuracy.
Now we are starting to train model for 100 classes.
Noted. Update the team with accuracy also after you are done.
The execution of code is done.
Here is the results we got for 100 cars.
Layer (type) Output Shape Param #
input_1 (InputLayer) [(None, 227, 227, 3)] 0
conv1 (Conv2D) (None, 114, 114, 32) 864
conv1_bn (BatchNormalization (None, 114, 114, 32) 128
conv1_relu (ReLU) (None, 114, 114, 32) 0
conv_dw_1 (DepthwiseConv2D) (None, 114, 114, 32) 288
conv_dw_1_bn (BatchNormaliza (None, 114, 114, 32) 128
conv_dw_1_relu (ReLU) (None, 114, 114, 32) 0
conv_pw_1 (Conv2D) (None, 114, 114, 64) 2048
conv_pw_1_bn (BatchNormaliza (None, 114, 114, 64) 256
conv_pw_1_relu (ReLU) (None, 114, 114, 64) 0
conv_pad_2 (ZeroPadding2D) (None, 115, 115, 64) 0
conv_dw_2 (DepthwiseConv2D) (None, 57, 57, 64) 576
conv_dw_2_bn (BatchNormaliza (None, 57, 57, 64) 256
conv_dw_2_relu (ReLU) (None, 57, 57, 64) 0
conv_pw_2 (Conv2D) (None, 57, 57, 128) 8192
conv_pw_2_bn (BatchNormaliza (None, 57, 57, 128) 512
conv_pw_2_relu (ReLU) (None, 57, 57, 128) 0
conv_dw_3 (DepthwiseConv2D) (None, 57, 57, 128) 1152
conv_dw_3_bn (BatchNormaliza (None, 57, 57, 128) 512
conv_dw_3_relu (ReLU) (None, 57, 57, 128) 0
conv_pw_3 (Conv2D) (None, 57, 57, 128) 16384
conv_pw_3_bn (BatchNormaliza (None, 57, 57, 128) 512
conv_pw_3_relu (ReLU) (None, 57, 57, 128) 0
conv_pad_4 (ZeroPadding2D) (None, 58, 58, 128) 0
conv_dw_4 (DepthwiseConv2D) (None, 28, 28, 128) 1152
conv_dw_4_bn (BatchNormaliza (None, 28, 28, 128) 512
conv_dw_4_relu (ReLU) (None, 28, 28, 128) 0
conv_pw_4 (Conv2D) (None, 28, 28, 256) 32768
conv_pw_4_bn (BatchNormaliza (None, 28, 28, 256) 1024
conv_pw_4_relu (ReLU) (None, 28, 28, 256) 0
conv_dw_5 (DepthwiseConv2D) (None, 28, 28, 256) 2304
conv_dw_5_bn (BatchNormaliza (None, 28, 28, 256) 1024
conv_dw_5_relu (ReLU) (None, 28, 28, 256) 0
conv_pw_5 (Conv2D) (None, 28, 28, 256) 65536
conv_pw_5_bn (BatchNormaliza (None, 28, 28, 256) 1024
conv_pw_5_relu (ReLU) (None, 28, 28, 256) 0
conv_pad_6 (ZeroPadding2D) (None, 29, 29, 256) 0
conv_dw_6 (DepthwiseConv2D) (None, 14, 14, 256) 2304
conv_dw_6_bn (BatchNormaliza (None, 14, 14, 256) 1024
conv_dw_6_relu (ReLU) (None, 14, 14, 256) 0
conv_pw_6 (Conv2D) (None, 14, 14, 512) 131072
conv_pw_6_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_pw_6_relu (ReLU) (None, 14, 14, 512) 0
conv_dw_7 (DepthwiseConv2D) (None, 14, 14, 512) 4608
conv_dw_7_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_dw_7_relu (ReLU) (None, 14, 14, 512) 0
conv_pw_7 (Conv2D) (None, 14, 14, 512) 262144
conv_pw_7_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_pw_7_relu (ReLU) (None, 14, 14, 512) 0
conv_dw_8 (DepthwiseConv2D) (None, 14, 14, 512) 4608
conv_dw_8_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_dw_8_relu (ReLU) (None, 14, 14, 512) 0
conv_pw_8 (Conv2D) (None, 14, 14, 512) 262144
conv_pw_8_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_pw_8_relu (ReLU) (None, 14, 14, 512) 0
conv_dw_9 (DepthwiseConv2D) (None, 14, 14, 512) 4608
conv_dw_9_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_dw_9_relu (ReLU) (None, 14, 14, 512) 0
conv_pw_9 (Conv2D) (None, 14, 14, 512) 262144
conv_pw_9_bn (BatchNormaliza (None, 14, 14, 512) 2048
conv_pw_9_relu (ReLU) (None, 14, 14, 512) 0
conv_dw_10 (DepthwiseConv2D) (None, 14, 14, 512) 4608
conv_dw_10_bn (BatchNormaliz (None, 14, 14, 512) 2048
conv_dw_10_relu (ReLU) (None, 14, 14, 512) 0
conv_pw_10 (Conv2D) (None, 14, 14, 512) 262144
conv_pw_10_bn (BatchNormaliz (None, 14, 14, 512) 2048
conv_pw_10_relu (ReLU) (None, 14, 14, 512) 0
conv_dw_11 (DepthwiseConv2D) (None, 14, 14, 512) 4608
conv_dw_11_bn (BatchNormaliz (None, 14, 14, 512) 2048
conv_dw_11_relu (ReLU) (None, 14, 14, 512) 0
conv_pw_11 (Conv2D) (None, 14, 14, 512) 262144
conv_pw_11_bn (BatchNormaliz (None, 14, 14, 512) 2048
conv_pw_11_relu (ReLU) (None, 14, 14, 512) 0
conv_pad_12 (ZeroPadding2D) (None, 15, 15, 512) 0
conv_dw_12 (DepthwiseConv2D) (None, 7, 7, 512) 4608
conv_dw_12_bn (BatchNormaliz (None, 7, 7, 512) 2048
conv_dw_12_relu (ReLU) (None, 7, 7, 512) 0
conv_pw_12 (Conv2D) (None, 7, 7, 1024) 524288
conv_pw_12_bn (BatchNormaliz (None, 7, 7, 1024) 4096
conv_pw_12_relu (ReLU) (None, 7, 7, 1024) 0
conv_dw_13 (DepthwiseConv2D) (None, 7, 7, 1024) 9216
flatten (Flatten) (None, 50176) 0
dense (Dense) (None, 100) 5017700
Total params: 7,189,796
Trainable params: 6,090,852
Non-trainable params: 1,098,944
Found 18885 images belonging to 100 classes.
Found 2000 images belonging to 100 classes.
Epoch 1/25
74/74 [==============================] - 10147s 137s/step - loss: 61.9345 - accuracy: 0.0264 - val_loss: 65.1034 - val_accuracy: 0.0400
Epoch 2/25
74/74 [==============================] - 216s 3s/step - loss: 3.8809 - accuracy: 0.3338 - val_loss: 7.7157 - val_accuracy: 0.2645
Epoch 3/25
74/74 [==============================] - 215s 3s/step - loss: 0.6054 - accuracy: 0.8277 - val_loss: 1.7625 - val_accuracy: 0.5865
Epoch 4/25
74/74 [==============================] - 215s 3s/step - loss: 0.2127 - accuracy: 0.9387 - val_loss: 1.2184 - val_accuracy: 0.7365
Epoch 5/25
74/74 [==============================] - 215s 3s/step - loss: 0.1133 - accuracy: 0.9647 - val_loss: 0.9882 - val_accuracy: 0.7915
Epoch 6/25
74/74 [==============================] - 215s 3s/step - loss: 0.0945 - accuracy: 0.9730 - val_loss: 1.0764 - val_accuracy: 0.7995
Epoch 7/25
74/74 [==============================] - 215s 3s/step - loss: 0.0838 - accuracy: 0.9790 - val_loss: 1.1060 - val_accuracy: 0.8075
Epoch 8/25
74/74 [==============================] - 215s 3s/step - loss: 0.0486 - accuracy: 0.9865 - val_loss: 0.7437 - val_accuracy: 0.8680
Epoch 9/25
74/74 [==============================] - 215s 3s/step - loss: 0.0159 - accuracy: 0.9959 - val_loss: 0.7195 - val_accuracy: 0.8730
Epoch 10/25
74/74 [==============================] - 215s 3s/step - loss: 0.0121 - accuracy: 0.9969 - val_loss: 0.7039 - val_accuracy: 0.8770
Epoch 11/25
74/74 [==============================] - 215s 3s/step - loss: 0.0086 - accuracy: 0.9984 - val_loss: 0.7183 - val_accuracy: 0.8745
Epoch 12/25
74/74 [==============================] - 215s 3s/step - loss: 0.0119 - accuracy: 0.9973 - val_loss: 0.7149 - val_accuracy: 0.8795
Epoch 13/25
74/74 [==============================] - 215s 3s/step - loss: 0.0065 - accuracy: 0.9986 - val_loss: 0.7178 - val_accuracy: 0.8795
Epoch 14/25
74/74 [==============================] - 215s 3s/step - loss: 0.0096 - accuracy: 0.9982 - val_loss: 0.7181 - val_accuracy: 0.8790
Epoch 15/25
74/74 [==============================] - 215s 3s/step - loss: 0.0087 - accuracy: 0.9980 - val_loss: 0.7192 - val_accuracy: 0.8790
Epoch 16/25
74/74 [==============================] - 215s 3s/step - loss: 0.0078 - accuracy: 0.9985 - val_loss: 0.7196 - val_accuracy: 0.8790
Epoch 17/25
74/74 [==============================] - 214s 3s/step - loss: 0.0083 - accuracy: 0.9982 - val_loss: 0.7196 - val_accuracy: 0.8790
8/8 [==============================] - 6s 698ms/step - loss: 0.7196 - accuracy: 0.8790
[0.7196163535118103, 0.8790000081062317]
From the simulation results we are getting 87.90% accuracy for 100 car model
Noted.