Skip to content

Commit

Permalink
Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryRyumin committed Mar 27, 2024
1 parent 6124cf9 commit f005a07
Show file tree
Hide file tree
Showing 8 changed files with 567 additions and 47 deletions.
4 changes: 2 additions & 2 deletions oceanai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
__uri__ = "https://github.com/DmitryRyumin/oceanai"

__version__ = "1.0"
__release__ = __version__ + ".0a20"
__release__ = __version__ + ".0a21"

__author__ru__ = "Рюмина Елена, Рюмин Дмитрий, Карпов Алексей"
__author__en__ = "Elena Ryumina, Dmitry Ryumin, Alexey Karpov"
Expand All @@ -29,4 +29,4 @@
__maintainer_email__ = "ryumina_ev@mail.ru, dl_03.03.1991@mail.ru"

__license__ = "BSD License"
__copyright__ = "2022-23. Speech and Multimodal Interfaces Laboratory Team"
__copyright__ = "2022-24. Speech and Multimodal Interfaces Laboratory Team"
4 changes: 2 additions & 2 deletions oceanai/modules/lab/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import librosa # Обработка аудио
import audioread # Декодирование звука
import math
import gradio

from urllib.parse import urlparse
from urllib.error import URLError
Expand Down Expand Up @@ -1181,8 +1182,7 @@ def _get_acoustic_features(
try:
# Проверка аргументов
if (
type(path) is not str
or not path
(type(path) is not str or not path) and (type(path) is not gradio.utils.NamedString)
or type(sr) is not int
or sr < 1
or ((type(window) is not int or window < 1) and (type(window) is not float or window <= 0))
Expand Down
18 changes: 9 additions & 9 deletions oceanai/modules/lab/keras_vggface/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def resnet_identity_block(input_tensor, kernel_size, filters, stage, block, bias
conv3_name = "conv" + str(stage) + "_" + str(block) + "_3x3"

x = Conv2D(filters1, (1, 1), use_bias=bias, name=conv1_reduce_name)(input_tensor)
x = BatchNormalization(axis=bn_axis, name=conv1_reduce_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv1_reduce_name + "_bn")(x)
x = Activation("relu")(x)

x = Conv2D(filters2, kernel_size, use_bias=bias, padding="same", name=conv3_name)(x)
x = BatchNormalization(axis=bn_axis, name=conv3_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv3_name + "_bn")(x)
x = Activation("relu")(x)

x = Conv2D(filters3, (1, 1), use_bias=bias, name=conv1_increase_name)(x)
x = BatchNormalization(axis=bn_axis, name=conv1_increase_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv1_increase_name + "_bn")(x)

x = layers.add([x, input_tensor])
x = Activation("relu")(x)
Expand All @@ -65,18 +65,18 @@ def resnet_conv_block(input_tensor, kernel_size, filters, stage, block, strides=
conv3_name = "conv" + str(stage) + "_" + str(block) + "_3x3"

x = Conv2D(filters1, (1, 1), strides=strides, use_bias=bias, name=conv1_reduce_name)(input_tensor)
x = BatchNormalization(axis=bn_axis, name=conv1_reduce_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv1_reduce_name + "_bn")(x)
x = Activation("relu")(x)

x = Conv2D(filters2, kernel_size, padding="same", use_bias=bias, name=conv3_name)(x)
x = BatchNormalization(axis=bn_axis, name=conv3_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv3_name + "_bn")(x)
x = Activation("relu")(x)

x = Conv2D(filters3, (1, 1), name=conv1_increase_name, use_bias=bias)(x)
x = BatchNormalization(axis=bn_axis, name=conv1_increase_name + "/bn")(x)
x = BatchNormalization(axis=bn_axis, name=conv1_increase_name + "_bn")(x)

shortcut = Conv2D(filters3, (1, 1), strides=strides, use_bias=bias, name=conv1_proj_name)(input_tensor)
shortcut = BatchNormalization(axis=bn_axis, name=conv1_proj_name + "/bn")(shortcut)
shortcut = BatchNormalization(axis=bn_axis, name=conv1_proj_name + "_bn")(shortcut)

x = layers.add([x, shortcut])
x = Activation("relu")(x)
Expand All @@ -100,8 +100,8 @@ def RESNET50(include_top=True, weights="vggface", input_shape=None, pooling=None
else:
bn_axis = 1

x = Conv2D(64, (7, 7), use_bias=False, strides=(2, 2), padding="same", name="conv1/7x7_s2")(img_input)
x = BatchNormalization(axis=bn_axis, name="conv1/7x7_s2/bn")(x)
x = Conv2D(64, (7, 7), use_bias=False, strides=(2, 2), padding="same", name="conv1_7x7_s2")(img_input)
x = BatchNormalization(axis=bn_axis, name="conv1_7x7_s2_bn")(x)
x = Activation("relu")(x)
x = MaxPooling2D((3, 3), strides=(2, 2))(x)

Expand Down
Loading

0 comments on commit f005a07

Please sign in to comment.