{"id":383367,"date":"2024-06-29T04:51:59","date_gmt":"2024-06-29T04:51:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=383367"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T04:51:59","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=383367","title":{"rendered":"<span>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439\u00a0<a href=\"https:\/\/newtechaudit.ru\/samostoyatelnaya-razmetka-dannyh-dlya-raspoznavaniya-russkogo-rukopisnogo-teksta\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>\u00a0\u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044e \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c (\u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c), \u0435\u0451 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0447\u044c.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0430\u0432\u0441\u0442\u0440\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u0443\u0447\u0451\u043d\u043e\u0433\u043e \u0413\u0430\u0440\u0430\u043b\u044c\u0434\u0430 \u0428\u0430\u0439\u0434\u043b\u044f Simple HTR, \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432: \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0438 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e. \u0421\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f feature map (\u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b). \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 5 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u044d\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435. \u0417\u0430\u0442\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0432\u0448\u0435\u043c\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445\u0441\u043b\u043e\u0439\u043d\u043e\u0439 LSTM, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442. \u0421\u0422\u0421 Loss \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c. \u041e\u043d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u2013 32 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 32 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u043f\u043e\u0434\u0431\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 Simple HTR \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 (data loader) \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u043b\u043e\u043a\u0435 decoder_output_to_text, \u0433\u0434\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0435\u0439 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c \u0436\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0445\u043e\u0436\u0430 \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439, \u043c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041a\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 TensorFlow \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u044e\u0434\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 CNN \u0438 RNN (LSTM), \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<pre><code>def setup_cnn(self) -> None:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432\"\"\"     cnn_in4d = tf.expand_dims(input=self.input_imgs, axis=3)      # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432, stride \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f     kernel_vals = [5, 5, 3, 3, 3]     feature_vals = [1, 32, 64, 128, 128, 256]     stride_vals = pool_vals = [(2, 2), (2, 2), (1, 2), (1, 2), (1, 2)]     num_layers = len(stride_vals)      # C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0451\u0432     pool = cnn_in4d       for i in range(num_layers):         kernel = tf.Variable(             tf.random.truncated_normal([kernel_vals[i], kernel_vals[i], feature_vals[i], feature_vals[i + 1]],                                        stddev=0.1))         conv = tf.nn.conv2d(input=pool, filters=kernel, padding='SAME', strides=(1, 1, 1, 1))         conv_norm = tf.compat.v1.layers.batch_normalization(conv, training=self.is_train)         relu = tf.nn.relu(conv_norm)         pool = tf.nn.max_pool2d(input=relu, ksize=(1, pool_vals[i][0], pool_vals[i][1], 1),                                 strides=(1, stride_vals[i][0], stride_vals[i][1], 1), padding='VALID')      self.cnn_out_4d = pool  def setup_rnn(self) -> None:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432.\"\"\"     rnn_in3d = tf.squeeze(self.cnn_out_4d, axis=[2])      num_hidden = 256     cells = [tf.compat.v1.nn.rnn_cell.LSTMCell(num_units=num_hidden, state_is_tuple=True) for _ in              range(2)]  # 2 \u0441\u043b\u043e\u044f LSTM      # \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u044f\u0447\u0435\u0439\u043a\u0438     stacked = tf.compat.v1.nn.rnn_cell.MultiRNNCell(cells, state_is_tuple=True)      # bidirectional RNN (\u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f)          (fw, bw), _ = tf.compat.v1.nn.bidirectional_dynamic_rnn(cell_fw=stacked, cell_bw=stacked, inputs=rnn_in3d,                                                             dtype=rnn_in3d.dtype)      # BxTxH + BxTxH -> BxTx2H -> BxTx1X2H  (\u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f)     concat = tf.expand_dims(tf.concat([fw, bw], 2), 2)      # \u0432\u044b\u0445\u043e\u0434 RNN \u0431\u043b\u043e\u043a\u0430     kernel = tf.Variable(tf.random.truncated_normal([1, 1, num_hidden * 2, len(self.char_list) + 1], stddev=0.1))     self.rnn_out_3d = tf.squeeze(tf.nn.atrous_conv2d(value=concat, filters=kernel, rate=1, padding='SAME'),                                  axis=[2])<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u043b\u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430 500 \u0431\u0430\u0442\u0447\u0435\u0439, \u043f\u0440\u043e\u0433\u043e\u043d \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0442\u0447\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 CPU \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Google \u0434\u0438\u0441\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0442\u0447 \u0443\u0445\u043e\u0434\u0438\u043b\u043e 4 \u043c\u0438\u043d\u0443\u0442\u044b. \u0417\u0430\u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430 LMDB \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u0432 4 \u0440\u0430\u0437\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u043e\u043a\u043e\u043b\u043e 1 \u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430 \u0431\u0430\u0442\u0447. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 GPU \u043e\u0442 Google Colab (Nvidia Tesla p40, Nvidia Tesla v100), \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0442\u0447 \u0441\u0442\u0430\u043b\u043e \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434. \u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 2-4 \u0430\u0441\u0442\u0440\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0430\u0441\u0430, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 LMDB \u043d\u0430 1 \u0413\u0411:<\/p>\n<pre><code>env = lmdb.open('lmdb', map_size=1024 * 1024 * 1024) imgs = (drive_path \/ 'images').walkfiles('*.jpg') with env.begin(write=True) as conn:      for idx, img in enumerate(imgs):          read_img = cv2.imread(img, cv2.IMREAD_GRAYSCALE)          bd_filename = '\/'.join(str(img).split('\/')[-3:]).encode(\"ascii\")          conn.put(bd_filename, pickle.dumps(read_img)) env.close()<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u0445:<\/p>\n<p>Character accuracy (CER) \u2014 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u044f \u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c).<\/p>\n<p>Line accuracy \u2014 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u043c (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u044f \u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439).<\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u043e\u0434\u0431\u043e\u0440 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 (\u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432). \u041c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 CTC Best Path \u0438 CTC Beam Search. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c Beam Search \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433, \u0441 \u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u0443\u0447\u0448\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u043b\u043e\u0432\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0434\u0430\u0432\u0430\u043b\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435) \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u044d\u043f\u043e\u0445\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7bc\/2de\/4ce\/7bc2de4ce015d81d6b058b2d8d9fad67.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u0421TC Best Path \" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u0421TC Best Path \" width=\"629\" height=\"408\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7bc\/2de\/4ce\/7bc2de4ce015d81d6b058b2d8d9fad67.png\"\/><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u0421TC Best Path <\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/124\/024\/e6e\/124024e6e523a453a6a2dd8f39111eed.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 CTC Beam Search\" title=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 CTC Beam Search\" width=\"686\" height=\"434\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/124\/024\/e6e\/124024e6e523a453a6a2dd8f39111eed.png\"\/><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 CTC Beam Search<\/figcaption><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:\u00a0<strong>91,4 % Character Accuracy Rate, 36,7 % Line Accuracy Rate.<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e Word Beam Search, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u0441\u043b\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0441\u043b\u043e\u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u042d\u0442\u043e \u0434\u0430\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0439 \u00ab\u0431\u0443\u0441\u0442\u00bb, \u0432\u044b\u0432\u0435\u0434\u044f Line Accuracy Rate \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043b\u043e 75%, \u0430 Character Accuracy Rate \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a 100%. \u041d\u043e \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c, \u043e\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u043d\u0430\u043b\u0438\u0447\u0438\u044e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0432\u043e\u0451\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u043e\u043d\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0432 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0430 \u043b\u0438\u0431\u043e \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 100% \u0441\u043b\u043e\u0432\u043e, \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0432\u043e\u0432\u0441\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u043a\u0430\u043a\u0438\u043c\u0438 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u043d\u0438 \u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u00a0\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u044e\u00a0<a href=\"https:\/\/towardsdatascience.com\/word-beam-search-a-ctc-decoding-algorithm-b051d28f3d2e\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443\u00a0<\/a>\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0443\u044e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Word Beam Search.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0441\u0432\u043e\u0434\u043a\u0430 \u043f\u043e \u043d\u0430\u0448\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 1<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 2<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 3<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5\u0421NN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 2 \u0447 15 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 35 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 45 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 30 \u043c\u0438\u043d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u042d\u043f\u043e\u0445: 36<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 166 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 25 \u0431\u0435\u0437 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439)<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 142 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 10 \u0431\u0435\u0437 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439)<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 88<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0411\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/td>\n<td>\n<p>\u0411\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/td>\n<td>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/td>\n<td>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC Bestpath<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC Bestpath<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440:CTC Beamsearch<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC WordBeamsearch<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: Google Drive<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 21%Line accuracy: 15%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 11.0%Line accuracy: 26.73%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 8.61%Line accuracy: 36.7%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 4.17%Line accuracy: 75.52%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043d\u0430\u0448\u0443 \u043b\u0443\u0447\u0448\u0443\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u044e\u0449\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b.\u00a0<a href=\"https:\/\/hub.docker.com\/r\/droidkos\/htr-mb-inference\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a>\u00a0(\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 Google Chrome).<\/p>\n<p>\u041c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0451 \u0441\u0435\u0440\u0438\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440 <a href=\"https:\/\/habr.com\/ru\/users\/Maxim_Doronkin\/\" rel=\"noopener noreferrer nofollow\">@Maxim_Doronkin<\/a> <\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/591255\/\"> https:\/\/habr.com\/ru\/articles\/591255\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439\u00a0<a href=\"https:\/\/newtechaudit.ru\/samostoyatelnaya-razmetka-dannyh-dlya-raspoznavaniya-russkogo-rukopisnogo-teksta\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>\u00a0\u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044e \u0440\u0443\u043a\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c (\u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0443\u044e \u0441\u0435\u0442\u044c), \u0435\u0451 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0447\u044c.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0430\u0432\u0441\u0442\u0440\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u0443\u0447\u0451\u043d\u043e\u0433\u043e \u0413\u0430\u0440\u0430\u043b\u044c\u0434\u0430 \u0428\u0430\u0439\u0434\u043b\u044f Simple HTR, \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432: \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0438 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u043e\u0433\u043e. \u0421\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f feature map (\u043a\u0430\u0440\u0442\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b). \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 5 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u044d\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435. \u0417\u0430\u0442\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0432\u0448\u0435\u043c\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445\u0441\u043b\u043e\u0439\u043d\u043e\u0439 LSTM, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442. \u0421\u0422\u0421 Loss \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0442\u0435\u0440\u044c. \u041e\u043d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u2013 32 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 32 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u043f\u043e\u0434\u0431\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 Simple HTR \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 (data loader) \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u043b\u043e\u043a\u0435 decoder_output_to_text, \u0433\u0434\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0435\u0439 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0412 \u0446\u0435\u043b\u043e\u043c \u0436\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0445\u043e\u0436\u0430 \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439, \u043c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041a\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 TensorFlow \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u044e\u0434\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 CNN \u0438 RNN (LSTM), \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<pre><code>def setup_cnn(self) -> None:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432\"\"\"     cnn_in4d = tf.expand_dims(input=self.input_imgs, axis=3)      # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432, stride \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f     kernel_vals = [5, 5, 3, 3, 3]     feature_vals = [1, 32, 64, 128, 128, 256]     stride_vals = pool_vals = [(2, 2), (2, 2), (1, 2), (1, 2), (1, 2)]     num_layers = len(stride_vals)      # C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0451\u0432     pool = cnn_in4d       for i in range(num_layers):         kernel = tf.Variable(             tf.random.truncated_normal([kernel_vals[i], kernel_vals[i], feature_vals[i], feature_vals[i + 1]],                                        stddev=0.1))         conv = tf.nn.conv2d(input=pool, filters=kernel, padding='SAME', strides=(1, 1, 1, 1))         conv_norm = tf.compat.v1.layers.batch_normalization(conv, training=self.is_train)         relu = tf.nn.relu(conv_norm)         pool = tf.nn.max_pool2d(input=relu, ksize=(1, pool_vals[i][0], pool_vals[i][1], 1),                                 strides=(1, stride_vals[i][0], stride_vals[i][1], 1), padding='VALID')      self.cnn_out_4d = pool  def setup_rnn(self) -> None:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0451\u0432.\"\"\"     rnn_in3d = tf.squeeze(self.cnn_out_4d, axis=[2])      num_hidden = 256     cells = [tf.compat.v1.nn.rnn_cell.LSTMCell(num_units=num_hidden, state_is_tuple=True) for _ in              range(2)]  # 2 \u0441\u043b\u043e\u044f LSTM      # \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u044f\u0447\u0435\u0439\u043a\u0438     stacked = tf.compat.v1.nn.rnn_cell.MultiRNNCell(cells, state_is_tuple=True)      # bidirectional RNN (\u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f)          (fw, bw), _ = tf.compat.v1.nn.bidirectional_dynamic_rnn(cell_fw=stacked, cell_bw=stacked, inputs=rnn_in3d,                                                             dtype=rnn_in3d.dtype)      # BxTxH + BxTxH -> BxTx2H -> BxTx1X2H  (\u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f)     concat = tf.expand_dims(tf.concat([fw, bw], 2), 2)      # \u0432\u044b\u0445\u043e\u0434 RNN \u0431\u043b\u043e\u043a\u0430     kernel = tf.Variable(tf.random.truncated_normal([1, 1, num_hidden * 2, len(self.char_list) + 1], stddev=0.1))     self.rnn_out_3d = tf.squeeze(tf.nn.atrous_conv2d(value=concat, filters=kernel, rate=1, padding='SAME'),                                  axis=[2])<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u043b\u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430 500 \u0431\u0430\u0442\u0447\u0435\u0439, \u043f\u0440\u043e\u0433\u043e\u043d \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0430\u0442\u0447\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 CPU \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 Google \u0434\u0438\u0441\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0442\u0447 \u0443\u0445\u043e\u0434\u0438\u043b\u043e 4 \u043c\u0438\u043d\u0443\u0442\u044b. \u0417\u0430\u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430 LMDB \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u0432 4 \u0440\u0430\u0437\u0430 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u043e\u043a\u043e\u043b\u043e 1 \u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430 \u0431\u0430\u0442\u0447. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 GPU \u043e\u0442 Google Colab (Nvidia Tesla p40, Nvidia Tesla v100), \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u0430\u0442\u0447 \u0441\u0442\u0430\u043b\u043e \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434. \u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 2-4 \u0430\u0441\u0442\u0440\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0430\u0441\u0430, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 LMDB \u043d\u0430 1 \u0413\u0411:<\/p>\n<pre><code>env = lmdb.open('lmdb', map_size=1024 * 1024 * 1024) imgs = (drive_path \/ 'images').walkfiles('*.jpg') with env.begin(write=True) as conn:      for idx, img in enumerate(imgs):          read_img = cv2.imread(img, cv2.IMREAD_GRAYSCALE)          bd_filename = '\/'.join(str(img).split('\/')[-3:]).encode(\"ascii\")          conn.put(bd_filename, pickle.dumps(read_img)) env.close()<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u0445:<\/p>\n<p>Character accuracy (CER) \u2014 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u044f \u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c).<\/p>\n<p>Line accuracy \u2014 \u043c\u0435\u0442\u0440\u0438\u043a\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u043c (\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043b\u044f \u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439).<\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u043e\u0434\u0431\u043e\u0440 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 (\u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432). \u041c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438 CTC Best Path \u0438 CTC Beam Search. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c Beam Search \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433, \u0441 \u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u0443\u0447\u0448\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a (\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u043b\u043e\u0432\u043e\u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0434\u0430\u0432\u0430\u043b\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435) \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u044d\u043f\u043e\u0445\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1 \u0421TC Best Path <\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0420\u0438\u0441\u0443\u043d\u043e\u043a 2 CTC Beam Search<\/figcaption><\/figure>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:\u00a0<strong>91,4 % Character Accuracy Rate, 36,7 % Line Accuracy Rate.<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u043a\u043e\u0434\u0435\u0440\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e Word Beam Search, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u0441\u043b\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0441\u043b\u043e\u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u042d\u0442\u043e \u0434\u0430\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0439 \u00ab\u0431\u0443\u0441\u0442\u00bb, \u0432\u044b\u0432\u0435\u0434\u044f Line Accuracy Rate \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043b\u043e 75%, \u0430 Character Accuracy Rate \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a 100%. \u041d\u043e \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c, \u043e\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u043d\u0430\u043b\u0438\u0447\u0438\u044e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0432\u043e\u0451\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0432\u0430 \u043e\u043d\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0432 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0430 \u043b\u0438\u0431\u043e \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 100% \u0441\u043b\u043e\u0432\u043e, \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0432\u043e\u0432\u0441\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u043a\u0430\u043a\u0438\u043c\u0438 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u043d\u0438 \u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u00a0\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u044e\u00a0<a href=\"https:\/\/towardsdatascience.com\/word-beam-search-a-ctc-decoding-algorithm-b051d28f3d2e\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443\u00a0<\/a>\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0443\u044e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Word Beam Search.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0441\u0432\u043e\u0434\u043a\u0430 \u043f\u043e \u043d\u0430\u0448\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 1<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 2<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 3<\/p>\n<\/td>\n<td>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5\u0421NN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<td>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c: 5CNN+2LSTM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 2 \u0447 15 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 35 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 45 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: 3 \u0447 30 \u043c\u0438\u043d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u042d\u043f\u043e\u0445: 36<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 166 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 25 \u0431\u0435\u0437 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439)<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 142 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 10 \u0431\u0435\u0437 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439)<\/p>\n<\/td>\n<td>\n<p>\u042d\u043f\u043e\u0445: 88<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<td>\n<p>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0411\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/td>\n<td>\n<p>\u0411\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/td>\n<td>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/td>\n<td>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u043d\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<td>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440: Adam<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC Bestpath<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC Bestpath<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440:CTC Beamsearch<\/p>\n<\/td>\n<td>\n<p>\u0414\u0435\u043a\u043e\u0434\u0435\u0440: CTC WordBeamsearch<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: Google Drive<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<td>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: LMDB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 21%Line accuracy: 15%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 11.0%Line accuracy: 26.73%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 8.61%Line accuracy: 36.7%<\/p>\n<\/td>\n<td>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a:CER: 4.17%Line accuracy: 75.52%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043d\u0430\u0448\u0443 \u043b\u0443\u0447\u0448\u0443\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u044e\u0449\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b.\u00a0<a href=\"https:\/\/hub.docker.com\/r\/droidkos\/htr-mb-inference\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a>\u00a0(\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 Google Chrome).<\/p>\n<p>\u041c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0451 \u0441\u0435\u0440\u0438\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440 <a href=\"https:\/\/habr.com\/ru\/users\/Maxim_Doronkin\/\" rel=\"noopener noreferrer nofollow\">@Maxim_Doronkin<\/a> <\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/591255\/\"> https:\/\/habr.com\/ru\/articles\/591255\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-383367","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/383367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=383367"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/383367\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=383367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=383367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=383367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}