Formation of neural network architectures of models and downloading their weights to obtain the personality traits scores (audio and video fusion)


  • _b5.av_models_b5_ - Neural network models tf.keras.Model for obtaining the personality traits scores

Import required packages

[2]:
from oceanai.modules.lab.build import Run

Build

[3]:
_b5 = Run(
    lang = 'en',              # Inference language
    color_simple = '#333',    # Plain text color (hexadecimal code)
    color_info = '#1776D2',   # The color of the text containing the information (hexadecimal code)
    color_err = '#FF0000',    # Error text color (hexadecimal code)
    color_true = '#008001',   # Text color containing positive information (hexadecimal code)
    bold_text = True,         # Bold text
    num_to_df_display = 30,   # Number of rows to display in tables
    text_runtime = 'Runtime', # Runtime text
    metadata = True           # Displaying information about library
)

[2023-12-14 22:44:38] OCEANAI - personal traits:    Authors:        Elena Ryumina [ryumina_ev@mail.ru]        Dmitry Ryumin [dl_03.03.1991@mail.ru]        Alexey Karpov [karpov@iias.spb.su]    Maintainers:        Elena Ryumina [ryumina_ev@mail.ru]        Dmitry Ryumin [dl_03.03.1991@mail.ru]    Version: 1.0.0a16    License: BSD License

Formation of neural network architectures of models

[4]:
res_load_av_models_b5 = _b5.load_av_models_b5(
    show_summary = False, # Displaying the formed neural network architecture of the model
    out = True,           # Display
    runtime = True,       # Runtime count
    run = True            # Run blocking
)

[2023-12-14 22:44:38] Formation of neural network architectures of models for obtaining the personality traits scores (multimodal fusion) …

— Runtime: 0.095 sec. —

Downloading weights of neural network models

[5]:
# Core settings
_b5.path_to_save_ = './models' # Directory to save the file
_b5.chunk_size_ = 2000000 # File download size from network in 1 step

url_openness = _b5.weights_for_big5_['av']['fi']['b5']['openness']['sberdisk']
url_conscientiousness = _b5.weights_for_big5_['av']['fi']['b5']['conscientiousness']['sberdisk']
url_extraversion = _b5.weights_for_big5_['av']['fi']['b5']['extraversion']['sberdisk']
url_agreeableness = _b5.weights_for_big5_['av']['fi']['b5']['agreeableness']['sberdisk']
url_non_neuroticism = _b5.weights_for_big5_['av']['fi']['b5']['non_neuroticism']['sberdisk']

res_load_av_models_weights_b5 = _b5.load_av_models_weights_b5(
    url_openness = url_openness, # Openness
    url_conscientiousness = url_conscientiousness, # Conscientiousness
    url_extraversion = url_extraversion, # Extraversion
    url_agreeableness = url_agreeableness, # Agreeableness
    url_non_neuroticism = url_non_neuroticism, # Non-Neuroticism
    force_reload = True, # Forced download of a file with weights of a neural network model from the network
    out = True, # Display
    runtime = True, # Runtime count
    run = True # Run blocking
)

[2023-12-14 22:44:53] Downloading the weights of neural network models to obtain the personality traits scores (multimodal fusion) …

[2023-12-14 22:44:53] File download “weights_2022-08-28_11-14-35.h5” (100.0%) … Openness

[2023-12-14 22:44:54] File download “weights_2022-08-28_11-08-10.h5” (100.0%) … Conscientiousness

[2023-12-14 22:44:54] File download “weights_2022-08-28_11-17-57.h5” (100.0%) … Extraversion

[2023-12-14 22:44:54] File download “weights_2022-08-28_11-25-11.h5” (100.0%) … Agreeableness

[2023-12-14 22:44:54] File download “weights_2022-06-14_21-44-09.h5” (100.0%) … Non-Neuroticism

— Runtime: 0.914 sec. —

Displaying the formed neural network architecture of the model

  • Openness

  • Conscientiousness

  • Extraversion

  • Agreeableness

  • Non-Neuroticism

[6]:
_b5.av_models_b5_['openness'].summary()
Model: "model"
_________________________________________________________________
 Layer (type)                Output Shape              Param #
=================================================================
 input_1 (InputLayer)        [(None, 64)]              0

 dense_1 (Dense)             (None, 1)                 65

 activ_1 (Activation)        (None, 1)                 0

=================================================================
Total params: 65 (260.00 Byte)
Trainable params: 65 (260.00 Byte)
Non-trainable params: 0 (0.00 Byte)
_________________________________________________________________