From 51a16e9ffaf63bd4d2bcdaf02162fef3357d0d3b Mon Sep 17 00:00:00 2001 From: Rauf Date: Tue, 17 Dec 2019 13:56:16 +0000 Subject: [PATCH] modify config files --- configs/road_signs_resnet18.yml | 2 +- configs/road_signs_resnet34.yml | 6 +- configs/road_signs_resnext50.yml | 6 +- embedding_net/backbones.py | 4 +- embedding_net/model.py | 5 +- embedding_net/pretrain_backbone_softmax.py | 5 +- test_network.ipynb | 287 +-------------------- 7 files changed, 19 insertions(+), 296 deletions(-) diff --git a/configs/road_signs_resnet18.yml b/configs/road_signs_resnet18.yml index ea9d63d..77f6b19 100644 --- a/configs/road_signs_resnet18.yml +++ b/configs/road_signs_resnet18.yml @@ -33,7 +33,7 @@ softmax_steps_per_epoch : 500 softmax_epochs : 20 #paths -work_dir : 'work_dirs/plates/' +work_dir : 'work_dirs/road_signs_resnet18/' dataset_path : '/home/rauf/datasets/road_signs/road_signs_separated/' plot_history : True encodings_path : 'encodings/' diff --git a/configs/road_signs_resnet34.yml b/configs/road_signs_resnet34.yml index c1143e7..5c738f4 100644 --- a/configs/road_signs_resnet34.yml +++ b/configs/road_signs_resnet34.yml @@ -33,12 +33,12 @@ softmax_steps_per_epoch : 500 softmax_epochs : 20 #paths -work_dir : 'work_dirs/plates/' +work_dir : 'work_dirs/road_signs_resnext34/' dataset_path : '/home/rauf/datasets/road_signs/road_signs_separated/' plot_history : True encodings_path : 'encodings/' -model_save_name : 'best_model_resnet18.h5' -encodings_save_name: 'encodings_resnet18.pkl' +model_save_name : 'best_model_resnet34.h5' +encodings_save_name: 'encodings_resnet34.pkl' # encodings parameters save_encodings : True diff --git a/configs/road_signs_resnext50.yml b/configs/road_signs_resnext50.yml index 33a1bba..39db509 100644 --- a/configs/road_signs_resnext50.yml +++ b/configs/road_signs_resnext50.yml @@ -33,12 +33,12 @@ softmax_steps_per_epoch : 500 softmax_epochs : 20 #paths -work_dir : 'work_dirs/plates/' +work_dir : 'work_dirs/road_signs_resnext50/' dataset_path : '/home/rauf/datasets/road_signs/road_signs_separated/' plot_history : True encodings_path : 'encodings/' -model_save_name : 'best_model_resnet18.h5' -encodings_save_name: 'encodings_resnet18.pkl' +model_save_name : 'best_model_resnext50.h5' +encodings_save_name: 'encodings_resnext50.pkl' # encodings parameters save_encodings : True diff --git a/embedding_net/backbones.py b/embedding_net/backbones.py index ec9d6f7..2bce824 100644 --- a/embedding_net/backbones.py +++ b/embedding_net/backbones.py @@ -70,7 +70,7 @@ def get_backbone(input_shape, base_model = Model( inputs=[input_image], outputs=[encoded_output]) else: - from classification_models import Classifiers + from classification_models.keras import Classifiers classifier, preprocess_input = Classifiers.get(backbone_type) backbone_model = classifier(input_shape=input_shape, weights=backbone_weights, @@ -82,7 +82,7 @@ def get_backbone(input_shape, after_backbone = backbone_model.output x = Flatten()(after_backbone) - + encoded_output = Dense(encodings_len, activation="relu")(x) if embeddings_normalization: encoded_output = Lambda(lambda x: K.l2_normalize( diff --git a/embedding_net/model.py b/embedding_net/model.py index 433f54c..54f62a6 100644 --- a/embedding_net/model.py +++ b/embedding_net/model.py @@ -251,9 +251,8 @@ def generate_encodings(self, save_file_name='encodings.pkl', only_centers=False, n_neighbors=k_val) self.encoded_training_data['knn_classifier'].fit(self.encoded_training_data['encodings'], self.encoded_training_data['labels']) - f = open(save_file_name, "wb") - pickle.dump(self.encoded_training_data, f) - f.close() + with open(save_file_name, "wb") as f + pickle.dump(self.encoded_training_data, f) def load_encodings(self, path_to_encodings): self.encoded_training_data = load_encodings(path_to_encodings) diff --git a/embedding_net/pretrain_backbone_softmax.py b/embedding_net/pretrain_backbone_softmax.py index 857785a..2b51685 100644 --- a/embedding_net/pretrain_backbone_softmax.py +++ b/embedding_net/pretrain_backbone_softmax.py @@ -30,11 +30,12 @@ def pretrain_backbone_softmax(input_model, cfg_params): train_generator = image_loader.generate(batch_size, s="train") val_generator = image_loader.generate(batch_size, s="val") + tensorboard_save_path = os.path.join( + cfg_params['work_dir'], 'tf_log/pretraining_model/') callbacks = [ ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=4, verbose=1), - EarlyStopping(patience=50, verbose=1), - TensorBoard(log_dir='tf_log/') + TensorBoard(log_dir=tensorboard_save_path) ] history = model.fit_generator(train_generator, diff --git a/test_network.ipynb b/test_network.ipynb index 3fb1cff..ebba35c 100644 --- a/test_network.ipynb +++ b/test_network.ipynb @@ -108,269 +108,13 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Using TensorFlow backend.\n", - "WARNING: Logging before flag parsing goes to stderr.\n", - "W1128 14:39:51.535426 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:74: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n", - "\n", - "W1128 14:39:51.537600 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n", - "\n", - "W1128 14:39:51.556000 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:174: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n", - "\n", - "W1128 14:39:51.556706 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:181: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", - "\n", - "W1128 14:39:51.557321 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:186: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n", - "\n", - "W1128 14:39:52.787259 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.\n", - "\n", - "W1128 14:39:52.927135 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:3976: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.\n", - "\n", - "W1128 14:39:59.374274 140300822427392 deprecation_wrapper.py:119] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Base model summary\n", - "__________________________________________________________________________________________________\n", - "Layer (type) Output Shape Param # Connected to \n", - "==================================================================================================\n", - "data (InputLayer) (None, 48, 48, 3) 0 \n", - "__________________________________________________________________________________________________\n", - "bn_data (BatchNormalization) (None, 48, 48, 3) 9 data[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_1 (ZeroPadding2D (None, 54, 54, 3) 0 bn_data[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv0 (Conv2D) (None, 24, 24, 64) 9408 zero_padding2d_1[0][0] \n", - "__________________________________________________________________________________________________\n", - "bn0 (BatchNormalization) (None, 24, 24, 64) 256 conv0[0][0] \n", - "__________________________________________________________________________________________________\n", - "relu0 (Activation) (None, 24, 24, 64) 0 bn0[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_2 (ZeroPadding2D (None, 26, 26, 64) 0 relu0[0][0] \n", - "__________________________________________________________________________________________________\n", - "pooling0 (MaxPooling2D) (None, 12, 12, 64) 0 zero_padding2d_2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_bn1 (BatchNormaliz (None, 12, 12, 64) 256 pooling0[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_relu1 (Activation) (None, 12, 12, 64) 0 stage1_unit1_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_3 (ZeroPadding2D (None, 14, 14, 64) 0 stage1_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_conv1 (Conv2D) (None, 12, 12, 64) 36864 zero_padding2d_3[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_bn2 (BatchNormaliz (None, 12, 12, 64) 256 stage1_unit1_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_relu2 (Activation) (None, 12, 12, 64) 0 stage1_unit1_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_4 (ZeroPadding2D (None, 14, 14, 64) 0 stage1_unit1_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_conv2 (Conv2D) (None, 12, 12, 64) 36864 zero_padding2d_4[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit1_sc (Conv2D) (None, 12, 12, 64) 4096 stage1_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_1 (Add) (None, 12, 12, 64) 0 stage1_unit1_conv2[0][0] \n", - " stage1_unit1_sc[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_bn1 (BatchNormaliz (None, 12, 12, 64) 256 add_1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_relu1 (Activation) (None, 12, 12, 64) 0 stage1_unit2_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_5 (ZeroPadding2D (None, 14, 14, 64) 0 stage1_unit2_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_conv1 (Conv2D) (None, 12, 12, 64) 36864 zero_padding2d_5[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_bn2 (BatchNormaliz (None, 12, 12, 64) 256 stage1_unit2_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_relu2 (Activation) (None, 12, 12, 64) 0 stage1_unit2_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_6 (ZeroPadding2D (None, 14, 14, 64) 0 stage1_unit2_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage1_unit2_conv2 (Conv2D) (None, 12, 12, 64) 36864 zero_padding2d_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_2 (Add) (None, 12, 12, 64) 0 stage1_unit2_conv2[0][0] \n", - " add_1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_bn1 (BatchNormaliz (None, 12, 12, 64) 256 add_2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_relu1 (Activation) (None, 12, 12, 64) 0 stage2_unit1_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_7 (ZeroPadding2D (None, 14, 14, 64) 0 stage2_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_conv1 (Conv2D) (None, 6, 6, 128) 73728 zero_padding2d_7[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_bn2 (BatchNormaliz (None, 6, 6, 128) 512 stage2_unit1_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_relu2 (Activation) (None, 6, 6, 128) 0 stage2_unit1_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_8 (ZeroPadding2D (None, 8, 8, 128) 0 stage2_unit1_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_conv2 (Conv2D) (None, 6, 6, 128) 147456 zero_padding2d_8[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit1_sc (Conv2D) (None, 6, 6, 128) 8192 stage2_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_3 (Add) (None, 6, 6, 128) 0 stage2_unit1_conv2[0][0] \n", - " stage2_unit1_sc[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_bn1 (BatchNormaliz (None, 6, 6, 128) 512 add_3[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_relu1 (Activation) (None, 6, 6, 128) 0 stage2_unit2_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_9 (ZeroPadding2D (None, 8, 8, 128) 0 stage2_unit2_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_conv1 (Conv2D) (None, 6, 6, 128) 147456 zero_padding2d_9[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_bn2 (BatchNormaliz (None, 6, 6, 128) 512 stage2_unit2_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_relu2 (Activation) (None, 6, 6, 128) 0 stage2_unit2_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_10 (ZeroPadding2 (None, 8, 8, 128) 0 stage2_unit2_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage2_unit2_conv2 (Conv2D) (None, 6, 6, 128) 147456 zero_padding2d_10[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_4 (Add) (None, 6, 6, 128) 0 stage2_unit2_conv2[0][0] \n", - " add_3[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_bn1 (BatchNormaliz (None, 6, 6, 128) 512 add_4[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_relu1 (Activation) (None, 6, 6, 128) 0 stage3_unit1_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_11 (ZeroPadding2 (None, 8, 8, 128) 0 stage3_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_conv1 (Conv2D) (None, 3, 3, 256) 294912 zero_padding2d_11[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_bn2 (BatchNormaliz (None, 3, 3, 256) 1024 stage3_unit1_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_relu2 (Activation) (None, 3, 3, 256) 0 stage3_unit1_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_12 (ZeroPadding2 (None, 5, 5, 256) 0 stage3_unit1_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_conv2 (Conv2D) (None, 3, 3, 256) 589824 zero_padding2d_12[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit1_sc (Conv2D) (None, 3, 3, 256) 32768 stage3_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_5 (Add) (None, 3, 3, 256) 0 stage3_unit1_conv2[0][0] \n", - " stage3_unit1_sc[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_bn1 (BatchNormaliz (None, 3, 3, 256) 1024 add_5[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_relu1 (Activation) (None, 3, 3, 256) 0 stage3_unit2_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_13 (ZeroPadding2 (None, 5, 5, 256) 0 stage3_unit2_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_conv1 (Conv2D) (None, 3, 3, 256) 589824 zero_padding2d_13[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_bn2 (BatchNormaliz (None, 3, 3, 256) 1024 stage3_unit2_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_relu2 (Activation) (None, 3, 3, 256) 0 stage3_unit2_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_14 (ZeroPadding2 (None, 5, 5, 256) 0 stage3_unit2_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage3_unit2_conv2 (Conv2D) (None, 3, 3, 256) 589824 zero_padding2d_14[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_6 (Add) (None, 3, 3, 256) 0 stage3_unit2_conv2[0][0] \n", - " add_5[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_bn1 (BatchNormaliz (None, 3, 3, 256) 1024 add_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_relu1 (Activation) (None, 3, 3, 256) 0 stage4_unit1_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_15 (ZeroPadding2 (None, 5, 5, 256) 0 stage4_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_conv1 (Conv2D) (None, 2, 2, 512) 1179648 zero_padding2d_15[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_bn2 (BatchNormaliz (None, 2, 2, 512) 2048 stage4_unit1_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_relu2 (Activation) (None, 2, 2, 512) 0 stage4_unit1_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_16 (ZeroPadding2 (None, 4, 4, 512) 0 stage4_unit1_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_conv2 (Conv2D) (None, 2, 2, 512) 2359296 zero_padding2d_16[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit1_sc (Conv2D) (None, 2, 2, 512) 131072 stage4_unit1_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_7 (Add) (None, 2, 2, 512) 0 stage4_unit1_conv2[0][0] \n", - " stage4_unit1_sc[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_bn1 (BatchNormaliz (None, 2, 2, 512) 2048 add_7[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_relu1 (Activation) (None, 2, 2, 512) 0 stage4_unit2_bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_17 (ZeroPadding2 (None, 4, 4, 512) 0 stage4_unit2_relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_conv1 (Conv2D) (None, 2, 2, 512) 2359296 zero_padding2d_17[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_bn2 (BatchNormaliz (None, 2, 2, 512) 2048 stage4_unit2_conv1[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_relu2 (Activation) (None, 2, 2, 512) 0 stage4_unit2_bn2[0][0] \n", - "__________________________________________________________________________________________________\n", - "zero_padding2d_18 (ZeroPadding2 (None, 4, 4, 512) 0 stage4_unit2_relu2[0][0] \n", - "__________________________________________________________________________________________________\n", - "stage4_unit2_conv2 (Conv2D) (None, 2, 2, 512) 2359296 zero_padding2d_18[0][0] \n", - "__________________________________________________________________________________________________\n", - "add_8 (Add) (None, 2, 2, 512) 0 stage4_unit2_conv2[0][0] \n", - " add_7[0][0] \n", - "__________________________________________________________________________________________________\n", - "bn1 (BatchNormalization) (None, 2, 2, 512) 2048 add_8[0][0] \n", - "__________________________________________________________________________________________________\n", - "relu1 (Activation) (None, 2, 2, 512) 0 bn1[0][0] \n", - "__________________________________________________________________________________________________\n", - "flatten_1 (Flatten) (None, 2048) 0 relu1[0][0] \n", - "__________________________________________________________________________________________________\n", - "dense_1 (Dense) (None, 256) 524544 flatten_1[0][0] \n", - "__________________________________________________________________________________________________\n", - "l2_norm (Lambda) (None, 256) 0 dense_1[0][0] \n", - "==================================================================================================\n", - "Total params: 11,711,433\n", - "Trainable params: 11,703,491\n", - "Non-trainable params: 7,942\n", - "__________________________________________________________________________________________________\n", - "Whole model summary\n", - "__________________________________________________________________________________________________\n", - "Layer (type) Output Shape Param # Connected to \n", - "==================================================================================================\n", - "input_1 (InputLayer) (None, 48, 48, 3) 0 \n", - "__________________________________________________________________________________________________\n", - "input_2 (InputLayer) (None, 48, 48, 3) 0 \n", - "__________________________________________________________________________________________________\n", - "input_3 (InputLayer) (None, 48, 48, 3) 0 \n", - "__________________________________________________________________________________________________\n", - "model_2 (Model) (None, 256) 11711433 input_1[0][0] \n", - " input_2[0][0] \n", - " input_3[0][0] \n", - "__________________________________________________________________________________________________\n", - "merged_layer (Concatenate) (None, 768) 0 model_2[1][0] \n", - " model_2[2][0] \n", - " model_2[3][0] \n", - "==================================================================================================\n", - "Total params: 11,711,433\n", - "Trainable params: 11,703,491\n", - "Non-trainable params: 7,942\n", - "__________________________________________________________________________________________________\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "W1128 14:40:08.344504 140300822427392 deprecation.py:323] From /home/rauf/anaconda3/envs/plates-competition/lib/python3.7/site-packages/tensorflow/python/ops/math_grad.py:1250: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n", - "Instructions for updating:\n", - "Use tf.where in 2.0, which has the same broadcast rule as np.where\n" - ] - } - ], + "outputs": [], "source": [ "from embedding_net.model import EmbeddingNet\n", "\n", - "config_name = 'road_signs_resnet18_max80_min30'\n", + "config_name = 'road_signs_resnet18'\n", "model = EmbeddingNet('configs/{}.yml'.format(config_name))\n", - "model.load_model('weights/road_signs/best_model_resnet18_max80_min30.h5')\n", + "model.load_model('work_dirs/weights/plates/best_model_resnet18.h5')\n", "model.generate_encodings(save_file_name='encodings_{}.pkl'.format(config_name),\n", " max_num_samples_of_each_classes=30, knn_k = 1, shuffle=True)\n", "# model.load_encodings('encodings/road_signs/encodings_{}.pkl')" @@ -387,28 +131,7 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAD6CAYAAABnLjEDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO2de4xcV53nv79763ZVl7vdD7cfHXfsGCcex4bEhPAMGiAMGpZBEGnY1RC0ymqz4p9dLbPDCsKutJqRdiTQSsOMNLvMRgNDYIDAwMwGMYPYTDYsAmZDHCeQhxM/4tix3Xa7n67u6qq6de/ZP7oS/Hu0u2M75U7u7yNF8Tl17r3nPk7d+n3796AQAhzHef0TXe0JOI7THXyxO05B8M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Gt83p2fw08AmADwIICjAGZDeDl/2Vp8Rv4UwGfw6zIIG7D25+wC3aUQlv6EsSb/jEFEfQC+B+D3Qwis4sVanHcIIQsh7AMwhqVffrq6xhqCiD4MYCKE8NjVnssrpdsVYU4BuDCLwVin77XAWSIaDSGME9Eolt5EawoiSrC00L8RQvjbTveanzcAhBBmiehhAO8EMEhEpc6bcq09I7cB+AgRfQhABcB6AH+GtT1nAN1/sz8K4IaOctkD4PcAfL/Lc7hUvg/grs6/7wLwwFWci6JjN34ZwMEQwp9c8NGanTcRbSSiwc6/ewF8AEtaw8MAPtYZtqbmHEL4XAhhLIRwHZae3/8TQvgE1vCcXyaE0NX/AHwIwCEs2Wb/udvHX+UcvwVgHECKJfvrbizZZQ8BOAzgHwEMX+15ijm/G0s/0X8F4InOfx9ay/MGcBOAxztzfgrAf+n0vwHALwAcAfA3AMpXe67LzP+9AH7wWpmze9A5TkFwgc5xCoIvdscpCL7YHacg+GJ3nILgi91xCoIvdscpCL7YHacg+GJ3nILw/wGgdM6y3tdzUwAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4_1_3\n", - "0.006786823272705078\n" - ] - } - ], + "outputs": [], "source": [ "import matplotlib.pyplot as plt \n", "import cv2\n", @@ -20172,4 +19895,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file