Repository: openvinotoolkit/open_model_zoo (language: python)

Issue:
added intel models to downloader
@moslex @snosov1 
Please review


Discussion / hints:
This was reviewed in internal repo, with few comments fixed and all other questions/comments received are not relevant to this PR.
@atsyplen, thanks for contribution!

Fix patch:
diff --git a/demos/common/cpp/monitors/src/presenter.cpp b/demos/common/cpp/monitors/src/presenter.cpp
index 9011dce22ad..14f5f6f7e25 100644
--- a/demos/common/cpp/monitors/src/presenter.cpp
+++ b/demos/common/cpp/monitors/src/presenter.cpp
@@ -19,7 +19,13 @@ const std::map<int, MonitorType> keyToMonitorType{
 
 std::set<MonitorType> strKeysToMonitorSet(const std::string& keys) {
     std::set<MonitorType> enabledMonitors;
+    if (keys == "h") {
+        return enabledMonitors;
+    }
     for (unsigned char key: keys) {
+        if (key == 'h') {
+            throw std::runtime_error("Unacceptable combination of monitor types-can't show and hide info at the same time");
+        }
         auto iter = keyToMonitorType.find(std::toupper(key));
         if (keyToMonitorType.end() == iter) {
             throw std::runtime_error("Unknown monitor type");
diff --git a/demos/interactive_face_detection_demo/cpp/README.md b/demos/interactive_face_detection_demo/cpp/README.md
index a806639bd98..e4fb88c60cc 100644
--- a/demos/interactive_face_detection_demo/cpp/README.md
+++ b/demos/interactive_face_detection_demo/cpp/README.md
@@ -69,42 +69,42 @@ omz_converter --list models.lst
 
 ## Running
 
-Running the application with the `-h` option yields the following usage message:
+Running the demo with `-h` shows this help message:
 
 ```
-interactive_face_detection_demo [OPTION]
-Options:
-
-    -h                         Print a usage message
-    -i                         Required. An input to process. The input must be a single image, a folder of images, video file or camera id.
-    -loop                      Optional. Enable reading the input in a loop.
-    -o "<path>"                Optional. Name of the output file(s) to save.
-    -limit "<num>"             Optional. Number of frames to store in output. If 0 is set, all frames are stored.
-    -m "<path>"                Required. Path to an .xml file with a trained Face Detection model.
-    -m_ag "<path>"             Optional. Path to an .xml file with a trained Age/Gender Recognition model.
-    -m_hp "<path>"             Optional. Path to an .xml file with a trained Head Pose Estimation model.
-    -m_em "<path>"             Optional. Path to an .xml file with a trained Emotions Recognition model.
-    -m_lm "<path>"             Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.
-    -m_am "<path>"             Optional. Path to an .xml file with a trained Antispoofing Classification model.
-    -d <device>                Specify a target device to infer on (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. Use "-d MULTI:<comma-separated_devices_list>" format to specify MULTI plugin. The application looks for a suitable plugin for the specified device.
-    -no_show                   Optional. Don't show output.
-    -r                         Optional. Output inference results as raw values
-    -t                         Optional. Probability threshold for detections
-    -bb_enlarge_coef           Optional. Coefficient to enlarge/reduce the size of the bounding box around the detected face
-    -dx_coef                   Optional. Coefficient to shift the bounding box around the detected face along the Ox axis
-    -dy_coef                   Optional. Coefficient to shift the bounding box around the detected face along the Oy axis
-    -fps                       Optional. Maximum FPS for playing video
-    -no_smooth                 Optional. Do not smooth person attributes
-    -no_show_emotion_bar       Optional. Do not show emotion bar
-    -u                         Optional. List of monitors to show initially.
+    [ -h]                                         show the help message and exit
+    [--help]                                      print help on all arguments
+      -m <MODEL FILE>                             path to an .xml file with a trained Face Detection model
+    [ -i <INPUT>]                                 an input to process. The input must be a single image, a folder of images, video file or camera id. Default is 0
+    [--bb_enlarge_coef <NUMBER>]                  coefficient to enlarge/reduce the size of the bounding box around the detected face. Default is 1.2
+    [ -d <DEVICE>]                                specify a device to infer on (the list of available devices is shown below). Use '-d HETERO:<comma-separated_devices_list>' format to specify HETERO plugin. Use '-d MULTI:<comma-separated_devices_list>' format to specify MULTI plugin. Default is CPU
+    [--dx_coef <NUMBER>]                          coefficient to shift the bounding box around the detected face along the Ox axis
+    [--dy_coef <NUMBER>]                          coefficient to shift the bounding box around the detected face along the Oy axis
+    [--fps <NUMBER>]                              maximum FPS for playing video
+    [--lim <NUMBER>]                              number of frames to store in output. If 0 is set, all frames are stored. Default is 1000
+    [--loop]                                      enable reading the input in a loop
+    [--mag <MODEL FILE>]                          path to an .xml file with a trained Age/Gender Recognition model
+    [--mam <MODEL FILE>]                          path to an .xml file with a trained Antispoofing Classification model
+    [--mem <MODEL FILE>]                          path to an .xml file with a trained Emotions Recognition model
+    [--mhp <MODEL FILE>]                          path to an .xml file with a trained Head Pose Estimation model
+    [--mlm <MODEL FILE>]                          path to an .xml file with a trained Facial Landmarks Estimation model
+    [ -o <OUTPUT>]                                name of the output file(s) to save
+    [ -r]                                         output inference results as raw values
+    [--show] ([--noshow])                         (don't) show output
+    [--show_emotion_bar] ([--noshow_emotion_bar]) (don't) show emotion bar
+    [--smooth] ([--nosmooth])                     (don't) smooth person attributes
+    [ -t <NUMBER>]                                probability threshold for detections. Default is 0.5
+    [ -u <DEVICE>]                                resource utilization graphs. Default is cdm. c - average CPU load, d - load distribution over cores, m - memory usage, h - hide
+    Key bindings:
+        Q, q, Esc - Quit
+        P, p, 0, spacebar - Pause
+        C - average CPU load, D - load distribution over cores, M - memory usage, H - hide
 ```
 
-Running the application with an empty list of options yields the usage message given above and an error message.
-
 For example, to do inference on a GPU with the OpenVINO&trade; toolkit pre-trained models, run the following command:
 
 ```sh
-./interactive_face_detection_demo -i <path_to_video>/<input_video>.mp4 -m <path_to_model>/face-detection-adas-0001.xml -m_ag <path_to_model>/age-gender-recognition-retail-0013.xml -m_hp <path_to_model>/head-pose-estimation-adas-0001.xml -m_em <path_to_model>/emotions-recognition-retail-0003.xml -m_lm <path_to_model>/facial-landmarks-35-adas-0002.xml -m_am <path_to_model>/anti-spoof-mn3.xml -d GPU
+./interactive_face_detection_demo -i <path_to_video>/<input_video>.mp4 -m <path_to_model>/face-detection-adas-0001.xml --mag <path_to_model>/age-gender-recognition-retail-0013.xml --mhp <path_to_model>/head-pose-estimation-adas-0001.xml --mem <path_to_model>/emotions-recognition-retail-0003.xml --mlm <path_to_model>/facial-landmarks-35-adas-0002.xml --mam <path_to_model>/anti-spoof-mn3.xml -d GPU
 ```
 
 >**NOTE**: If you provide a single image as an input, the demo processes and renders it quickly, then exits. To continuously visualize inference results on the screen, apply the `loop` option, which enforces processing a single image in a loop.
@@ -113,7 +113,7 @@ You can save processed results to a Motion JPEG AVI file or separate JPEG or PNG
 
 * To save processed results in an AVI file, specify the name of the output file with `avi` extension, for example: `-o output.avi`.
 * To save processed results as images, specify the template name of the output image file with `jpg` or `png` extension, for example: `-o output_%03d.jpg`. The actual file names are constructed from the template at runtime by replacing regular expression `%03d` with the frame number, resulting in the following: `output_000.jpg`, `output_001.jpg`, and so on.
-To avoid disk space overrun in case of continuous input stream, like camera, you can limit the amount of data stored in the output file(s) with the `limit` option. The default value is 1000. To change it, you can apply the `-limit N` option, where `N` is the number of frames to store.
+To avoid disk space overrun in case of continuous input stream, like camera, you can limit the amount of data stored in the output file(s) with the `--lim` option. The default value is 1000. To change it, you can apply the `--lim N` option, where `N` is the number of frames to store.
 
 >**NOTE**: Windows\* systems may not have the Motion JPEG codec installed by default. If this is the case, you can download OpenCV FFMPEG back end using the PowerShell script provided with the OpenVINO &trade; install package and located at `<INSTALL_DIR>/opencv/ffmpeg-download.ps1`. The script should be run with administrative privileges if OpenVINO &trade; is installed in a system protected folder (this is a typical case). Alternatively, you can save results as images.
 
diff --git a/demos/interactive_face_detection_demo/cpp/interactive_face_detection.hpp b/demos/interactive_face_detection_demo/cpp/interactive_face_detection.hpp
deleted file mode 100644
index f7d709853e8..00000000000
--- a/demos/interactive_face_detection_demo/cpp/interactive_face_detection.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (C) 2018-2022 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-#include <utils/default_flags.hpp>
-
-#include <gflags/gflags.h>
-#include <iostream>
-#include <limits>
-
-DEFINE_INPUT_FLAGS
-DEFINE_OUTPUT_FLAGS
-
-static const char help_message[] = "Print a usage message";
-static const char face_detection_model_message[] = "Required. Path to an .xml file with a trained Face Detection model.";
-static const char age_gender_model_message[] = "Optional. Path to an .xml file with a trained Age/Gender Recognition model.";
-static const char head_pose_model_message[] = "Optional. Path to an .xml file with a trained Head Pose Estimation model.";
-static const char emotions_model_message[] = "Optional. Path to an .xml file with a trained Emotions Recognition model.";
-static const char facial_landmarks_model_message[] = "Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.";
-static const char antispoofing_model_message[] = "Optional. Path to an .xml file with a trained Antispoofing Classification model.";
-static const char device_message[] =
-    "Specify a target device to infer on (the list of available devices is shown below). "
-    "Default value is CPU. Use \"-d HETERO:<comma-separated_devices_list>\" format to specify "
-    "HETERO plugin. "
-    "Use \"-d MULTI:<comma-separated_devices_list>\" format to specify MULTI plugin. "
-    "The application looks for a suitable plugin for the specified device.";
-static const char thresh_output_message[] = "Optional. Probability threshold for detections";
-static const char bb_enlarge_coef_output_message[] = "Optional. Coefficient to enlarge/reduce the size of the bounding box around the detected face";
-static const char raw_output_message[] = "Optional. Output inference results as raw values";
-static const char no_show_message[] = "Optional. Don't show output.";
-static const char dx_coef_output_message[] = "Optional. Coefficient to shift the bounding box around the detected face along the Ox axis";
-static const char dy_coef_output_message[] = "Optional. Coefficient to shift the bounding box around the detected face along the Oy axis";
-static const char fps_output_message[] = "Optional. Maximum FPS for playing video";
-static const char no_smooth_output_message[] = "Optional. Do not smooth person attributes";
-static const char no_show_emotion_bar_message[] = "Optional. Do not show emotion bar";
-static const char utilization_monitors_message[] = "Optional. List of monitors to show initially.";
-
-DEFINE_bool(h, false, help_message);
-DEFINE_string(m, "", face_detection_model_message);
-DEFINE_string(m_ag, "", age_gender_model_message);
-DEFINE_string(m_hp, "", head_pose_model_message);
-DEFINE_string(m_em, "", emotions_model_message);
-DEFINE_string(m_lm, "", facial_landmarks_model_message);
-DEFINE_string(m_am, "", antispoofing_model_message);
-DEFINE_string(d, "CPU", device_message);
-DEFINE_bool(r, false, raw_output_message);
-DEFINE_double(t, 0.5, thresh_output_message);
-DEFINE_double(bb_enlarge_coef, 1.2, bb_enlarge_coef_output_message);
-DEFINE_bool(no_show, false, no_show_message);
-DEFINE_double(dx_coef, 1, dx_coef_output_message);
-DEFINE_double(dy_coef, 1, dy_coef_output_message);
-DEFINE_double(fps, -std::numeric_limits<double>::infinity(), fps_output_message);
-DEFINE_bool(no_smooth, false, no_smooth_output_message);
-DEFINE_bool(no_show_emotion_bar, false, no_show_emotion_bar_message);
-DEFINE_string(u, "", utilization_monitors_message);
-
-static void showUsage() {
-    std::cout << std::endl;
-    std::cout << "interactive_face_detection_demo [OPTION]" << std::endl;
-    std::cout << "Options:" << std::endl;
-    std::cout << std::endl;
-    std::cout << "    -h                         " << help_message << std::endl;
-    std::cout << "    -i                         " << input_message << std::endl;
-    std::cout << "    -loop                      " << loop_message << std::endl;
-    std::cout << "    -o \"<path>\"                " << output_message << std::endl;
-    std::cout << "    -limit \"<num>\"             " << limit_message << std::endl;
-    std::cout << "    -m \"<path>\"                " << face_detection_model_message << std::endl;
-    std::cout << "    -m_ag \"<path>\"             " << age_gender_model_message << std::endl;
-    std::cout << "    -m_hp \"<path>\"             " << head_pose_model_message << std::endl;
-    std::cout << "    -m_em \"<path>\"             " << emotions_model_message << std::endl;
-    std::cout << "    -m_lm \"<path>\"             " << facial_landmarks_model_message << std::endl;
-    std::cout << "    -m_am \"<path>\"             " << antispoofing_model_message << std::endl;
-    std::cout << "    -d <device>                " << device_message << std::endl;
-    std::cout << "    -no_show                   " << no_show_message << std::endl;
-    std::cout << "    -r                         " << raw_output_message << std::endl;
-    std::cout << "    -t                         " << thresh_output_message << std::endl;
-    std::cout << "    -bb_enlarge_coef           " << bb_enlarge_coef_output_message << std::endl;
-    std::cout << "    -dx_coef                   " << dx_coef_output_message << std::endl;
-    std::cout << "    -dy_coef                   " << dy_coef_output_message << std::endl;
-    std::cout << "    -fps                       " << fps_output_message << std::endl;
-    std::cout << "    -no_smooth                 " << no_smooth_output_message << std::endl;
-    std::cout << "    -no_show_emotion_bar       " << no_show_emotion_bar_message << std::endl;
-    std::cout << "    -u                         " << utilization_monitors_message << std::endl;
-}
diff --git a/demos/interactive_face_detection_demo/cpp/main.cpp b/demos/interactive_face_detection_demo/cpp/main.cpp
index 90fb090e11c..d23ffdc8ab7 100644
--- a/demos/interactive_face_detection_demo/cpp/main.cpp
+++ b/demos/interactive_face_detection_demo/cpp/main.cpp
@@ -2,225 +2,316 @@
 // SPDX-License-Identifier: Apache-2.0
 //
 
-#include "interactive_face_detection.hpp"
+#include <iostream>
+#include <limits>
+
+#include <gflags/gflags.h>
+#include <utils/images_capture.h>
+#include <monitors/presenter.h>
+
 #include "detectors.hpp"
 #include "face.hpp"
 #include "visualizer.hpp"
-#include <monitors/presenter.h>
-#include <utils/images_capture.h>
 
-bool ParseAndCheckCommandLine(int argc, char *argv[]) {
-    // ---------------------------Parsing and validating input arguments--------------------------------------
-    gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
-    if (FLAGS_h) {
-        showUsage();
+namespace {
+constexpr char h_msg[] = "show the help message and exit";
+DEFINE_bool(h, false, h_msg);
+
+constexpr char m_msg[] = "path to an .xml file with a trained Face Detection model";
+DEFINE_string(m, "", m_msg);
+
+constexpr char i_msg[] = "an input to process. The input must be a single image, a folder of images, video file or camera id. Default is 0";
+DEFINE_string(i, "0", i_msg);
+
+constexpr char bb_enlarge_coef_msg[] = "coefficient to enlarge/reduce the size of the bounding box around the detected face. Default is 1.2";
+DEFINE_double(bb_enlarge_coef, 1.2, bb_enlarge_coef_msg);
+
+constexpr char d_msg[] =
+    "specify a device to infer on (the list of available devices is shown below). "
+    "Use '-d HETERO:<comma-separated_devices_list>' format to specify HETERO plugin. "
+    "Use '-d MULTI:<comma-separated_devices_list>' format to specify MULTI plugin. "
+    "Default is CPU";
+DEFINE_string(d, "CPU", d_msg);
+
+constexpr char dx_coef_msg[] = "coefficient to shift the bounding box around the detected face along the Ox axis";
+DEFINE_double(dx_coef, 1, dx_coef_msg);
+
+constexpr char dy_coef_msg[] = "coefficient to shift the bounding box around the detected face along the Oy axis";
+DEFINE_double(dy_coef, 1, dy_coef_msg);
+
+constexpr char fps_msg[] = "maximum FPS for playing video";
+DEFINE_double(fps, -std::numeric_limits<double>::infinity(), fps_msg);
+
+constexpr char lim_msg[] = "number of frames to store in output. If 0 is set, all frames are stored. Default is 1000";
+DEFINE_uint32(lim, 1000, lim_msg);
+
+constexpr char loop_msg[] = "enable reading the input in a loop";
+DEFINE_bool(loop, false, loop_msg);
+
+constexpr char mag_msg[] = "path to an .xml file with a trained Age/Gender Recognition model";
+DEFINE_string(mag, "", mag_msg);
+
+constexpr char mam_msg[] = "path to an .xml file with a trained Antispoofing Classification model";
+DEFINE_string(mam, "", mam_msg);
+
+constexpr char mem_msg[] = "path to an .xml file with a trained Emotions Recognition model";
+DEFINE_string(mem, "", mem_msg);
+
+constexpr char mhp_msg[] = "path to an .xml file with a trained Head Pose Estimation model";
+DEFINE_string(mhp, "", mhp_msg);
+
+constexpr char mlm_msg[] = "path to an .xml file with a trained Facial Landmarks Estimation model";
+DEFINE_string(mlm, "", mlm_msg);
+
+constexpr char o_msg[] = "name of the output file(s) to save";
+DEFINE_string(o, "", o_msg);
+
+constexpr char r_msg[] = "output inference results as raw values";
+DEFINE_bool(r, false, r_msg);
+
+constexpr char show_msg[] = "(don't) show output";
+DEFINE_bool(show, true, show_msg);
+
+constexpr char show_emotion_bar_msg[] = "(don't) show emotion bar";
+DEFINE_bool(show_emotion_bar, true, show_emotion_bar_msg);
+
+constexpr char smooth_msg[] = "(don't) smooth person attributes";
+DEFINE_bool(smooth, true, smooth_msg);
+
+constexpr char t_msg[] = "probability threshold for detections. Default is 0.5";
+DEFINE_double(t, 0.5, t_msg);
+
+constexpr char u_msg[] = "resource utilization graphs. Default is cdm. "
+    "c - average CPU load, d - load distribution over cores, m - memory usage, h - hide";
+DEFINE_string(u, "cdm", u_msg);
+
+void parse(int argc, char *argv[]) {
+    gflags::ParseCommandLineFlags(&argc, &argv, false);
+    if (FLAGS_h || 1 == argc) {
+        std::cout <<   "\t[ -h]                                         " << h_msg
+                  << "\n\t[--help]                                      print help on all arguments"
+                  << "\n\t  -m <MODEL FILE>                             " << m_msg
+                  << "\n\t[ -i <INPUT>]                                 " << i_msg
+                  << "\n\t[--bb_enlarge_coef <NUMBER>]                  " << bb_enlarge_coef_msg
+                  << "\n\t[ -d <DEVICE>]                                " << d_msg
+                  << "\n\t[--dx_coef <NUMBER>]                          " << dx_coef_msg
+                  << "\n\t[--dy_coef <NUMBER>]                          " << dy_coef_msg
+                  << "\n\t[--fps <NUMBER>]                              " << fps_msg
+                  << "\n\t[--lim <NUMBER>]                              " << lim_msg
+                  << "\n\t[--loop]                                      " << loop_msg
+                  << "\n\t[--mag <MODEL FILE>]                          " << mag_msg
+                  << "\n\t[--mam <MODEL FILE>]                          " << mam_msg
+                  << "\n\t[--mem <MODEL FILE>]                          " << mem_msg
+                  << "\n\t[--mhp <MODEL FILE>]                          " << mhp_msg
+                  << "\n\t[--mlm <MODEL FILE>]                          " << mlm_msg
+                  << "\n\t[ -o <OUTPUT>]                                " << o_msg
+                  << "\n\t[ -r]                                         " << r_msg
+                  << "\n\t[--show] ([--noshow])                         " << show_msg
+                  << "\n\t[--show_emotion_bar] ([--noshow_emotion_bar]) " << show_emotion_bar_msg
+                  << "\n\t[--smooth] ([--nosmooth])                     " << smooth_msg
+                  << "\n\t[ -t <NUMBER>]                                " << t_msg
+                  << "\n\t[ -u <DEVICE>]                                " << u_msg
+                  << "\n\tKey bindings:"
+                     "\n\t\tQ, q, Esc - Quit"
+                     "\n\t\tP, p, 0, spacebar - Pause"
+                     "\n\t\tC - average CPU load, D - load distribution over cores, M - memory usage, H - hide\n";
         showAvailableDevices();
-        return false;
+        std::cout << ov::get_openvino_version() << std::endl;
+        exit(0);
+    } if (FLAGS_i.empty()) {
+        throw std::invalid_argument{"-i <INPUT> can't be empty"};
+    } if (FLAGS_m.empty()) {
+        throw std::invalid_argument{"-m <MODEL FILE> can't be empty"};
     }
-
-    if (FLAGS_i.empty()) {
-        throw std::logic_error("Parameter -i is not set");
-    }
-
-    if (FLAGS_m.empty()) {
-        throw std::logic_error("Parameter -m is not set");
-    }
-    return true;
+    slog::info << ov::get_openvino_version() << slog::endl;
 }
+} // namespace
 
 int main(int argc, char *argv[]) {
-    try {
-        PerformanceMetrics metrics;
-
-        // ------------------------------ Parsing and validating of input arguments --------------------------
-        if (!ParseAndCheckCommandLine(argc, argv)) {
-            return 0;
-        }
+    std::set_terminate(catcher);
+    parse(argc, argv);
+    PerformanceMetrics metrics;
+
+    // --------------------------- 1. Loading Inference Engine -----------------------------
+    ov::Core core;
+
+    FaceDetection faceDetector(FLAGS_m, FLAGS_t, FLAGS_r,
+                                static_cast<float>(FLAGS_bb_enlarge_coef), static_cast<float>(FLAGS_dx_coef), static_cast<float>(FLAGS_dy_coef));
+    AgeGenderDetection ageGenderDetector(FLAGS_mag, FLAGS_r);
+    HeadPoseDetection headPoseDetector(FLAGS_mhp, FLAGS_r);
+    EmotionsDetection emotionsDetector(FLAGS_mem, FLAGS_r);
+    FacialLandmarksDetection facialLandmarksDetector(FLAGS_mlm, FLAGS_r);
+    AntispoofingClassifier antispoofingClassifier(FLAGS_mam, FLAGS_r);
+    // ---------------------------------------------------------------------------------------------------
+
+    // --------------------------- 2. Reading IR models and loading them to plugins ----------------------
+    Load(faceDetector).into(core, FLAGS_d);
+    Load(ageGenderDetector).into(core, FLAGS_d);
+    Load(headPoseDetector).into(core, FLAGS_d);
+    Load(emotionsDetector).into(core, FLAGS_d);
+    Load(facialLandmarksDetector).into(core, FLAGS_d);
+    Load(antispoofingClassifier).into(core, FLAGS_d);
+    // ----------------------------------------------------------------------------------------------------
+
+    Timer timer;
+    std::ostringstream out;
+    size_t framesCounter = 0;
+    double msrate = 1000.0 / FLAGS_fps;
+    std::list<Face::Ptr> faces;
+    size_t id = 0;
+
+    std::unique_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop);
+
+    auto startTime = std::chrono::steady_clock::now();
+    cv::Mat frame = cap->read();
+    if (!frame.data) {
+        throw std::runtime_error("Can't read an image from the input");
+    }
 
-        // --------------------------- 1. Loading OpenVINO runtime -----------------------------
-        slog::info << ov::get_openvino_version() << slog::endl;
-        ov::Core core;
-
-        FaceDetection faceDetector(FLAGS_m, FLAGS_t, FLAGS_r,
-                                   static_cast<float>(FLAGS_bb_enlarge_coef), static_cast<float>(FLAGS_dx_coef), static_cast<float>(FLAGS_dy_coef));
-        AgeGenderDetection ageGenderDetector(FLAGS_m_ag, FLAGS_r);
-        HeadPoseDetection headPoseDetector(FLAGS_m_hp, FLAGS_r);
-        EmotionsDetection emotionsDetector(FLAGS_m_em, FLAGS_r);
-        FacialLandmarksDetection facialLandmarksDetector(FLAGS_m_lm, FLAGS_r);
-        AntispoofingClassifier antispoofingClassifier(FLAGS_m_am, FLAGS_r);
-        // ---------------------------------------------------------------------------------------------------
-
-        // --------------------------- 2. Reading IR models and loading them to plugins ----------------------
-        Load(faceDetector).into(core, FLAGS_d);
-        Load(ageGenderDetector).into(core, FLAGS_d);
-        Load(headPoseDetector).into(core, FLAGS_d);
-        Load(emotionsDetector).into(core, FLAGS_d);
-        Load(facialLandmarksDetector).into(core, FLAGS_d);
-        Load(antispoofingClassifier).into(core, FLAGS_d);
-        // ----------------------------------------------------------------------------------------------------
-
-        Timer timer;
-        std::ostringstream out;
-        size_t framesCounter = 0;
-        double msrate = 1000.0 / FLAGS_fps;
-        std::list<Face::Ptr> faces;
-        size_t id = 0;
-
-        std::unique_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop);
-
-        auto startTime = std::chrono::steady_clock::now();
-        cv::Mat frame = cap->read();
-
-        Presenter presenter(FLAGS_u, 60, {frame.cols / 4, 60});
-
-        Visualizer visualizer{frame.size()};
-        if (!FLAGS_no_show_emotion_bar && emotionsDetector.enabled()) {
-                visualizer.enableEmotionBar(emotionsDetector.emotionsVec);
-        }
+    Presenter presenter(FLAGS_u, 60, {frame.cols / 4, 60});
 
-        LazyVideoWriter videoWriter{FLAGS_o, FLAGS_fps > 0.0 ? FLAGS_fps : cap->fps(), FLAGS_limit};
+    Visualizer visualizer{frame.size()};
+    if (FLAGS_show_emotion_bar && emotionsDetector.enabled()) {
+        visualizer.enableEmotionBar(emotionsDetector.emotionsVec);
+    }
 
-        // Detecting all faces on the first frame and reading the next one
-        faceDetector.submitRequest(frame);
+    LazyVideoWriter videoWriter{FLAGS_o, FLAGS_fps > 0.0 ? FLAGS_fps : cap->fps(), FLAGS_lim};
 
-        auto startTimeNextFrame = std::chrono::steady_clock::now();
-        cv::Mat nextFrame = cap->read();
-        while (frame.data) {
-            timer.start("total");
-            const auto startTimePrevFrame = startTime;
-            cv::Mat prevFrame = std::move(frame);
-            startTime = startTimeNextFrame;
-            frame = std::move(nextFrame);
-            framesCounter++;
+    // Detecting all faces on the first frame and reading the next one
+    faceDetector.submitRequest(frame);
 
-            // Retrieving face detection results for the previous frame
-            std::vector<FaceDetection::Result> prev_detection_results = faceDetector.fetchResults();
+    auto startTimeNextFrame = std::chrono::steady_clock::now();
+    cv::Mat nextFrame = cap->read();
+    while (frame.data) {
+        timer.start("total");
+        const auto startTimePrevFrame = startTime;
+        cv::Mat prevFrame = std::move(frame);
+        startTime = startTimeNextFrame;
+        frame = std::move(nextFrame);
+        framesCounter++;
 
-            // No valid frame to infer if previous frame is the last
-            if (frame.data) {
-                if (frame.size() != prevFrame.size()) {
-                    throw std::runtime_error("Images of different size are not supported");
-                }
-                faceDetector.submitRequest(frame);
-            }
+        // Retrieving face detection results for the previous frame
+        std::vector<FaceDetection::Result> prev_detection_results = faceDetector.fetchResults();
 
-            // Filling inputs of face analytics networks
-            for (auto &&face : prev_detection_results) {
-                cv::Rect clippedRect = face.location & cv::Rect({0, 0}, prevFrame.size());
-                const cv::Mat& crop = prevFrame(clippedRect);
-                ageGenderDetector.enqueue(crop);
-                headPoseDetector.enqueue(crop);
-                emotionsDetector.enqueue(crop);
-                facialLandmarksDetector.enqueue(crop);
-                antispoofingClassifier.enqueue(crop);
+        // No valid frame to infer if previous frame is the last
+        if (frame.data) {
+            if (frame.size() != prevFrame.size()) {
+                throw std::runtime_error("Images of different size are not supported");
             }
+            faceDetector.submitRequest(frame);
+        }
 
-            // Running Age/Gender Recognition, Head Pose Estimation, Emotions Recognition, Facial Landmarks Estimation and Antispoofing Classifier networks simultaneously
-            ageGenderDetector.submitRequest();
-            headPoseDetector.submitRequest();
-            emotionsDetector.submitRequest();
-            facialLandmarksDetector.submitRequest();
-            antispoofingClassifier.submitRequest();
+        // Filling inputs of face analytics networks
+        for (auto &&face : prev_detection_results) {
+            cv::Rect clippedRect = face.location & cv::Rect({0, 0}, prevFrame.size());
+            const cv::Mat& crop = prevFrame(clippedRect);
+            ageGenderDetector.enqueue(crop);
+            headPoseDetector.enqueue(crop);
+            emotionsDetector.enqueue(crop);
+            facialLandmarksDetector.enqueue(crop);
+            antispoofingClassifier.enqueue(crop);
+        }
 
-            // Read the next frame while waiting for inference results
-            startTimeNextFrame = std::chrono::steady_clock::now();
-            nextFrame = cap->read();
+        // Running Age/Gender Recognition, Head Pose Estimation, Emotions Recognition, Facial Landmarks Estimation and Antispoofing Classifier networks simultaneously
+        ageGenderDetector.submitRequest();
+        headPoseDetector.submitRequest();
+        emotionsDetector.submitRequest();
+        facialLandmarksDetector.submitRequest();
+        antispoofingClassifier.submitRequest();
 
-            //  Postprocessing
-            std::list<Face::Ptr> prev_faces;
+        // Read the next frame while waiting for inference results
+        startTimeNextFrame = std::chrono::steady_clock::now();
+        nextFrame = cap->read();
 
-            if (!FLAGS_no_smooth) {
-                prev_faces.insert(prev_faces.begin(), faces.begin(), faces.end());
-            }
+        //  Postprocessing
+        std::list<Face::Ptr> prev_faces;
 
-            faces.clear();
+        if (!FLAGS_smooth) {
+            prev_faces.insert(prev_faces.begin(), faces.begin(), faces.end());
+        }
 
-            // For every detected face
-            for (size_t i = 0; i < prev_detection_results.size(); i++) {
-                auto& result = prev_detection_results[i];
-                cv::Rect rect = result.location & cv::Rect({0, 0}, prevFrame.size());
+        faces.clear();
 
-                Face::Ptr face;
-                if (!FLAGS_no_smooth) {
-                    face = matchFace(rect, prev_faces);
-                    float intensity_mean = calcMean(prevFrame(rect));
+        // For every detected face
+        for (size_t i = 0; i < prev_detection_results.size(); i++) {
+            auto& result = prev_detection_results[i];
+            cv::Rect rect = result.location & cv::Rect({0, 0}, prevFrame.size());
 
-                    if ((face == nullptr) ||
-                        ((std::abs(intensity_mean - face->_intensity_mean) / face->_intensity_mean) > 0.07f)) {
-                        face = std::make_shared<Face>(id++, rect);
-                    } else {
-                        prev_faces.remove(face);
-                    }
+            Face::Ptr face;
+            if (FLAGS_smooth) {
+                face = matchFace(rect, prev_faces);
+                float intensity_mean = calcMean(prevFrame(rect));
 
-                    face->_intensity_mean = intensity_mean;
-                    face->_location = rect;
-                } else {
+                if ((face == nullptr) ||
+                    ((std::abs(intensity_mean - face->_intensity_mean) / face->_intensity_mean) > 0.07f)) {
                     face = std::make_shared<Face>(id++, rect);
+                } else {
+                    prev_faces.remove(face);
                 }
 
-                face->ageGenderEnable(ageGenderDetector.enabled());
-                if (face->isAgeGenderEnabled()) {
-                    AgeGenderDetection::Result ageGenderResult = ageGenderDetector[i];
-                    face->updateGender(ageGenderResult.maleProb);
-                    face->updateAge(ageGenderResult.age);
-                }
+                face->_intensity_mean = intensity_mean;
+                face->_location = rect;
+            } else {
+                face = std::make_shared<Face>(id++, rect);
+            }
 
-                face->emotionsEnable(emotionsDetector.enabled());
-                if (face->isEmotionsEnabled()) {
-                    face->updateEmotions(emotionsDetector[i]);
-                }
+            face->ageGenderEnable(ageGenderDetector.enabled());
+            if (face->isAgeGenderEnabled()) {
+                AgeGenderDetection::Result ageGenderResult = ageGenderDetector[i];
+                face->updateGender(ageGenderResult.maleProb);
+                face->updateAge(ageGenderResult.age);
+            }
 
-                face->headPoseEnable(headPoseDetector.enabled());
-                if (face->isHeadPoseEnabled()) {
-                    face->updateHeadPose(headPoseDetector[i]);
-                }
+            face->emotionsEnable(emotionsDetector.enabled());
+            if (face->isEmotionsEnabled()) {
+                face->updateEmotions(emotionsDetector[i]);
+            }
 
-                face->landmarksEnable(facialLandmarksDetector.enabled());
-                if (face->isLandmarksEnabled()) {
-                    face->updateLandmarks(facialLandmarksDetector[i]);
-                }
+            face->headPoseEnable(headPoseDetector.enabled());
+            if (face->isHeadPoseEnabled()) {
+                face->updateHeadPose(headPoseDetector[i]);
+            }
 
-                face->antispoofingEnable(antispoofingClassifier.enabled());
-                if (face->isAntispoofingEnabled()) {
-                    face->updateRealFaceConfidence(antispoofingClassifier[i]);
-                }
+            face->landmarksEnable(facialLandmarksDetector.enabled());
+            if (face->isLandmarksEnabled()) {
+                face->updateLandmarks(facialLandmarksDetector[i]);
+            }
 
-                faces.push_back(face);
+            face->antispoofingEnable(antispoofingClassifier.enabled());
+            if (face->isAntispoofingEnabled()) {
+                face->updateRealFaceConfidence(antispoofingClassifier[i]);
             }
 
-            // drawing faces
-            visualizer.draw(prevFrame, faces);
+            faces.push_back(face);
+        }
 
-            presenter.drawGraphs(prevFrame);
-            metrics.update(startTimePrevFrame, prevFrame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX, 0.65);
+        // drawing faces
+        visualizer.draw(prevFrame, faces);
 
-            timer.finish("total");
+        presenter.drawGraphs(prevFrame);
+        metrics.update(startTimePrevFrame, prevFrame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX, 0.65);
 
-            videoWriter.write(prevFrame);
+        timer.finish("total");
 
-            int delay = std::max(1, static_cast<int>(msrate - timer["total"].getLastCallDuration()));
-            if (!FLAGS_no_show) {
-                cv::imshow("Detection results", prevFrame);
-                int key = cv::waitKey(delay);
-                if (27 == key || 'Q' == key || 'q' == key) {
-                    break;
-                }
-                presenter.handleKey(key);
+        videoWriter.write(prevFrame);
+
+        int delay = std::max(1, static_cast<int>(msrate - timer["total"].getLastCallDuration()));
+        if (FLAGS_show) {
+            cv::imshow(argv[0], prevFrame);
+            int key = cv::waitKey(delay);
+            if ('P' == key || 'p' == key || '0' == key || ' ' == key) {
+                key = cv::waitKey(0);
             }
+            if (27 == key || 'Q' == key || 'q' == key) {
+                break;
+            }
+            presenter.handleKey(key);
         }
-
-        slog::info << "Metrics report:" << slog::endl;
-        metrics.logTotal();
-        slog::info << presenter.reportMeans() << slog::endl;
-    }
-    catch (const std::exception& error) {
-        slog::err << error.what() << slog::endl;
-        return 1;
-    }
-    catch (...) {
-        slog::err << "Unknown/internal exception happened." << slog::endl;
-        return 1;
     }
 
+    slog::info << "Metrics report:" << slog::endl;
+    metrics.logTotal();
+    slog::info << presenter.reportMeans() << slog::endl;
+
     return 0;
 }
diff --git a/demos/interactive_face_detection_demo/cpp_gapi/README.md b/demos/interactive_face_detection_demo/cpp_gapi/README.md
index 7a94e0d5ca3..2c78b06ef6f 100644
--- a/demos/interactive_face_detection_demo/cpp_gapi/README.md
+++ b/demos/interactive_face_detection_demo/cpp_gapi/README.md
@@ -67,42 +67,43 @@ omz_converter --list models.lst
 
 ## Running
 
-Running the application with the `-h` option yields the following usage message:
+Running the demo with `-h` shows this help message:
 
 ```
-interactive_face_detection_demo_gapi [OPTION]
-Options:
-
-    -h                         Print a usage message
-    -i "<path>"                Required. Path to a video file (specify "cam" to work with camera).
-    -o "<path>"                Optional. Name of the output file(s) to save.
-    -limit "<num>"             Optional. Number of frames to store in output. If 0 is set, all frames are stored.
-    -m "<path>"                Required. Path to an .xml file with a trained Face Detection model.
-    -m_ag "<path>"             Optional. Path to an .xml file with a trained Age/Gender Recognition model.
-    -m_hp "<path>"             Optional. Path to an .xml file with a trained Head Pose Estimation model.
-    -m_em "<path>"             Optional. Path to an .xml file with a trained Emotions Recognition model.
-    -m_lm "<path>"             Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.
-    -m_am "<path>"             Optional. Path to an .xml file with a trained Antispoofing Classification model.
-    -d "<device>"              Optional. Target device for Face Detection network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
-    -d_ag "<device>"           Optional. Target device for Age/Gender Recognition network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
-    -d_hp "<device>"           Optional. Target device for Head Pose Estimation network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
-    -d_em "<device>"           Optional. Target device for Emotions Recognition network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for a specified device.
-    -d_lm "<device>"           Optional. Target device for Facial Landmarks Estimation network (the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for device specified.
-    -d_am "<device>"           Optional. Target device for Antispoofing Classification network (the list of available devices is shown below). Default value is CPU. Use "-d HETERO:<comma-separated_devices_list>" format to specify HETERO plugin. The demo will look for a suitable plugin for a specified device.
-    -no_show                   Optional. Don't show output.
-    -r                         Optional. Output inference results as raw values
-    -t                         Optional. Probability threshold for detections
-    -bb_enlarge_coef           Optional. Coefficient to enlarge/reduce the size of the bounding box around the detected face
-    -dx_coef                   Optional. Coefficient to shift the bounding box around the detected face along the Ox axis
-    -dy_coef                   Optional. Coefficient to shift the bounding box around the detected face along the Oy axis
-    -loop                Optional. Enable playing video on a loop
-    -no_smooth                 Optional. Do not smooth person attributes
-    -no_show_emotion_bar       Optional. Do not show emotion bar
-    -u                         Optional. List of monitors to show initially.
+    [ -h]                                         show the help message and exit
+    [--help]                                      print help on all arguments
+      -m <MODEL FILE>                             path to an .xml file with a trained Face Detection model
+    [ -i <INPUT>]                                 an input to process. The input must be a single image, a folder of images, video file or camera id. Default is 0
+    [--bb_enlarge_coef <NUMBER>]                  coefficient to enlarge/reduce the size of the bounding box around the detected face. Default is 1.2
+    [ -d <DEVICE>]                                specify a device to infer on (the list of available devices is shown below). Use '-d HETERO:<comma-separated_devices_list>' format to specify HETERO plugin. Use '-d MULTI:<comma-separated_devices_list>' format to specify MULTI plugin. Default is CPU
+    [--dag <DEVICE>]                              target device for Age/Gender Recognition network (the list of available devices is shown below). The demo will look for a suitable plugin for a specified device. Default is CPU
+    [--dam <DEVICE>]                              target device for Antispoofing Classification network (the list of available devices is shown below). Use \"-d HETERO:<comma-separated_devices_list>\" format to specify HETERO plugin. The demo will look for a suitable plugin for a specified device. Default is CPU
+    [--dem <DEVICE>]                              target device for Emotions Recognition network (the list of available devices is shown below). The demo will look for a suitable plugin for a specified device. Default is CPU
+    [--dhp <DEVICE>]                              target device for Head Pose Estimation network (the list of available devices is shown below). The demo will look for a suitable plugin for a specified device. Default is CPU
+    [--dlm <DEVICE>]                              target device for Facial Landmarks Estimation network (the list of available devices is shown below). The demo will look for a suitable plugin for device specified. Default is CPU
+    [--dx_coef <NUMBER>]                          coefficient to shift the bounding box around the detected face along the Ox axis
+    [--dy_coef <NUMBER>]                          coefficient to shift the bounding box around the detected face along the Oy axis
+    [--fps <NUMBER>]                              maximum FPS for playing video
+    [--lim <NUMBER>]                              number of frames to store in output. If 0 is set, all frames are stored. Default is 1000
+    [--loop]                                      enable reading the input in a loop
+    [--mag <MODEL FILE>]                          path to an .xml file with a trained Age/Gender Recognition model
+    [--mam <MODEL FILE>]                          path to an .xml file with a trained Antispoofing Classification model
+    [--mem <MODEL FILE>]                          path to an .xml file with a trained Emotions Recognition model
+    [--mhp <MODEL FILE>]                          path to an .xml file with a trained Head Pose Estimation model
+    [--mlm <MODEL FILE>]                          path to an .xml file with a trained Facial Landmarks Estimation model
+    [ -o <OUTPUT>]                                name of the output file(s) to save
+    [ -r]                                         output inference results as raw values
+    [--show] ([--noshow])                         (don't) show output
+    [--show_emotion_bar] ([--noshow_emotion_bar]) (don't) show emotion bar
+    [--smooth] ([--nosmooth])                     (don't) smooth person attributes
+    [ -t <NUMBER>]                                probability threshold for detections. Default is 0.5
+    [ -u <DEVICE>]                                resource utilization graphs. Default is cdm. c - average CPU load, d - load distribution over cores, m - memory usage, h - hide
+    Key bindings:
+        Q, q, Esc - Quit
+        P, p, 0, spacebar - Pause
+        C - average CPU load, D - load distribution over cores, M - memory usage, H - hide
 ```
 
-Running the application with an empty list of options yields the usage message given above and an error message.
-
 For example, to do inference on a GPU with the OpenVINO&trade; toolkit pre-trained models, run the following command:
 
 ```sh
@@ -110,11 +111,11 @@ For example, to do inference on a GPU with the OpenVINO&trade; toolkit pre-train
   -d GPU \
   -i <path_to_video>/inputVideo.mp4 \
   -m <path_to_model>/face-detection-adas-0001.xml \
-  -m_ag <path_to_model>/age-gender-recognition-retail-0013.xml \
-  -m_hp <path_to_model>/head-pose-estimation-adas-0001.xml \
-  -m_em <path_to_model>/emotions-recognition-retail-0003.xml \
-  -m_lm <path_to_model>/facial-landmarks-35-adas-0002.xml \
-  -m_am <path_to_model>/anti-spoof-mn3.xml
+  --mag <path_to_model>/age-gender-recognition-retail-0013.xml \
+  --mhp <path_to_model>/head-pose-estimation-adas-0001.xml \
+  --mem <path_to_model>/emotions-recognition-retail-0003.xml \
+  --mlm <path_to_model>/facial-landmarks-35-adas-0002.xml \
+  --mam <path_to_model>/anti-spoof-mn3.xml
 ```
 
 >**NOTE**: If you provide a single image as an input, the demo processes and renders it quickly, then exits. To continuously visualize inference results on the screen, apply the `loop` option, which enforces processing a single image in a loop.
@@ -123,7 +124,7 @@ You can save processed results to a Motion JPEG AVI file or separate JPEG or PNG
 
 * To save processed results in an AVI file, specify the name of the output file with `avi` extension, for example: `-o output.avi`.
 * To save processed results as images, specify the template name of the output image file with `jpg` or `png` extension, for example: `-o output_%03d.jpg`. The actual file names are constructed from the template at runtime by replacing regular expression `%03d` with the frame number, resulting in the following: `output_000.jpg`, `output_001.jpg`, and so on.
-To avoid disk space overrun in case of continuous input stream, like camera, you can limit the amount of data stored in the output file(s) with the `limit` option. The default value is 1000. To change it, you can apply the `-limit N` option, where `N` is the number of frames to store.
+To avoid disk space overrun in case of continuous input stream, like camera, you can limit the amount of data stored in the output file(s) with the `--lim` option. The default value is 1000. To change it, you can apply the `--lim N` option, where `N` is the number of frames to store.
 
 >**NOTE**: Windows\* systems may not have the Motion JPEG codec installed by default. If this is the case, you can download OpenCV FFMPEG back end using the PowerShell script provided with the OpenVINO &trade; install package and located at `<INSTALL_DIR>/opencv/ffmpeg-download.ps1`. The script should be run with administrative privileges if OpenVINO &trade; is installed in a system protected folder (this is a typical case). Alternatively, you can save results as images.
 
diff --git a/demos/interactive_face_detection_demo/cpp_gapi/interactive_face_detection_gapi.hpp b/demos/interactive_face_detection_demo/cpp_gapi/interactive_face_detection_gapi.hpp
deleted file mode 100644
index 9fa2236ddb3..00000000000
--- a/demos/interactive_face_detection_demo/cpp_gapi/interactive_face_detection_gapi.hpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-#include <gflags/gflags.h>
-#include <utils/default_flags.hpp>
-
-DEFINE_OUTPUT_FLAGS
-
-static const char help_message[] = "Print a usage message";
-static const char input_video_message[] = "Required. Path to a video file (specify \"cam\" to work with camera).";
-static const char face_detection_model_message[] = "Required. Path to an .xml file with a trained Face Detection model.";
-static const char age_gender_model_message[] = "Optional. Path to an .xml file with a trained Age/Gender Recognition model.";
-static const char head_pose_model_message[] = "Optional. Path to an .xml file with a trained Head Pose Estimation model.";
-static const char emotions_model_message[] = "Optional. Path to an .xml file with a trained Emotions Recognition model.";
-static const char facial_landmarks_model_message[] = "Optional. Path to an .xml file with a trained Facial Landmarks Estimation model.";
-static const char antispoofing_model_message[] = "Optional. Path to an .xml file with a trained Antispoofing Classification model.";
-static const char target_device_message[] = "Optional. Target device for Face Detection network (the list of available devices is shown below). "
-                                            "Default value is CPU. The demo will look for a suitable plugin for a specified device.";
-static const char target_device_message_ag[] = "Optional. Target device for Age/Gender Recognition network (the list of available devices is shown below). "
-                                               "Default value is CPU. The demo will look for a suitable plugin for a specified device.";
-static const char target_device_message_hp[] = "Optional. Target device for Head Pose Estimation network (the list of available devices is shown below). "
-                                               "Default value is CPU. The demo will look for a suitable plugin for a specified device.";
-static const char target_device_message_em[] = "Optional. Target device for Emotions Recognition network (the list of available devices is shown below). "
-                                               "Default value is CPU. The demo will look for a suitable plugin for a specified device.";
-static const char target_device_message_lm[] = "Optional. Target device for Facial Landmarks Estimation network "
-                                               "(the list of available devices is shown below). Default value is CPU. The demo will look for a suitable plugin for device specified.";
-static const char target_device_message_am[] = "Optional. Target device for Antispoofing Classification network (the list of available devices is shown below). "
-                                               "Default value is CPU. Use \"-d HETERO:<comma-separated_devices_list>\" format to specify HETERO plugin. "
-                                               "The demo will look for a suitable plugin for a specified device.";
-static const char thresh_output_message[] = "Optional. Probability threshold for detections";
-static const char bb_enlarge_coef_output_message[] = "Optional. Coefficient to enlarge/reduce the size of the bounding box around the detected face";
-static const char raw_output_message[] = "Optional. Output inference results as raw values";
-static const char no_show_message[] = "Optional. Don't show output.";
-static const char dx_coef_output_message[] = "Optional. Coefficient to shift the bounding box around the detected face along the Ox axis";
-static const char dy_coef_output_message[] = "Optional. Coefficient to shift the bounding box around the detected face along the Oy axis";
-// TODO: Make this option valid for single image case
-static const char loop_output_message[] = "Optional. Enable playing video on a loop";
-static const char no_smooth_output_message[] = "Optional. Do not smooth person attributes";
-static const char no_show_emotion_bar_message[] = "Optional. Do not show emotion bar";
-static const char utilization_monitors_message[] = "Optional. List of monitors to show initially.";
-
-// TODO: Support options:
-// Set number of maximum simultaneously processed faces for Age/Gender,
-// Head Pose Estimation, Emotions Recognition, Facial Landmarks Estimation networks
-
-// Enabling dynamic batch size for Age/Gender, Head Pose Estimation, Emotions Recognition,
-// Facial Landmarks Estimation networks
-
-// Enabling per-layer performance report
-
-// Enabling using of CPU custom layers.
-// Enabling using of GPU custom kernels.
-
-// Set maximum FPS for playing video
-
-DEFINE_bool(h, false, help_message);
-DEFINE_string(i, "", input_video_message);
-DEFINE_string(m, "", face_detection_model_message);
-DEFINE_string(m_ag, "", age_gender_model_message);
-DEFINE_string(m_hp, "", head_pose_model_message);
-DEFINE_string(m_em, "", emotions_model_message);
-DEFINE_string(m_lm, "", facial_landmarks_model_message);
-DEFINE_string(m_am, "", antispoofing_model_message);
-DEFINE_string(d, "CPU", target_device_message);
-DEFINE_string(d_ag, "CPU", target_device_message_ag);
-DEFINE_string(d_hp, "CPU", target_device_message_hp);
-DEFINE_string(d_em, "CPU", target_device_message_em);
-DEFINE_string(d_lm, "CPU", target_device_message_lm);
-DEFINE_string(d_am, "CPU", target_device_message_am);
-DEFINE_bool(r, false, raw_output_message);
-DEFINE_double(t, 0.5, thresh_output_message);
-DEFINE_double(bb_enlarge_coef, 1.2, bb_enlarge_coef_output_message);
-DEFINE_bool(no_show, false, no_show_message);
-DEFINE_double(dx_coef, 1, dx_coef_output_message);
-DEFINE_double(dy_coef, 1, dy_coef_output_message);
-DEFINE_bool(loop, false, loop_output_message);
-DEFINE_bool(no_smooth, false, no_smooth_output_message);
-DEFINE_bool(no_show_emotion_bar, false, no_show_emotion_bar_message);
-DEFINE_string(u, "", utilization_monitors_message);
-
-/**
-* \brief This function shows a help message
-*/
-
-static void showUsage() {
-    std::cout << std::endl;
-    std::cout << "interactive_face_detection_demo_gapi [OPTION]" << std::endl;
-    std::cout << "Options:" << std::endl;
-    std::cout << std::endl;
-    std::cout << "    -h                         " << help_message << std::endl;
-    std::cout << "    -i \"<path>\"                " << input_video_message << std::endl;
-    std::cout << "    -o \"<path>\"                " << output_message << std::endl;
-    std::cout << "    -limit \"<num>\"             " << limit_message << std::endl;
-    std::cout << "    -m \"<path>\"                " << face_detection_model_message<< std::endl;
-    std::cout << "    -m_ag \"<path>\"             " << age_gender_model_message << std::endl;
-    std::cout << "    -m_hp \"<path>\"             " << head_pose_model_message << std::endl;
-    std::cout << "    -m_em \"<path>\"             " << emotions_model_message << std::endl;
-    std::cout << "    -m_lm \"<path>\"             " << facial_landmarks_model_message << std::endl;
-    std::cout << "    -m_am \"<path>\"             " << antispoofing_model_message << std::endl;
-    std::cout << "    -d \"<device>\"              " << target_device_message << std::endl;
-    std::cout << "    -d_ag \"<device>\"           " << target_device_message_ag << std::endl;
-    std::cout << "    -d_hp \"<device>\"           " << target_device_message_hp << std::endl;
-    std::cout << "    -d_em \"<device>\"           " << target_device_message_em << std::endl;
-    std::cout << "    -d_lm \"<device>\"           " << target_device_message_lm << std::endl;
-    std::cout << "    -d_am \"<device>\"           " << target_device_message_am << std::endl;
-    std::cout << "    -no_show                   " << no_show_message << std::endl;
-    std::cout << "    -r                         " << raw_output_message << std::endl;
-    std::cout << "    -t                         " << thresh_output_message << std::endl;
-    std::cout << "    -bb_enlarge_coef           " << bb_enlarge_coef_output_message << std::endl;
-    std::cout << "    -dx_coef                   " << dx_coef_output_message << std::endl;
-    std::cout << "    -dy_coef                   " << dy_coef_output_message << std::endl;
-    std::cout << "    -loop                " << loop_output_message << std::endl;
-    std::cout << "    -no_smooth                 " << no_smooth_output_message << std::endl;
-    std::cout << "    -no_show_emotion_bar       " << no_show_emotion_bar_message << std::endl;
-    std::cout << "    -u                         " << utilization_monitors_message << std::endl;
-}
diff --git a/demos/interactive_face_detection_demo/cpp_gapi/main.cpp b/demos/interactive_face_detection_demo/cpp_gapi/main.cpp
index ae7dd3d2794..74f6e8d96e6 100644
--- a/demos/interactive_face_detection_demo/cpp_gapi/main.cpp
+++ b/demos/interactive_face_detection_demo/cpp_gapi/main.cpp
@@ -7,10 +7,11 @@
 * \file interactive_face_detection_demo_gapi/main.cpp
 * \example interactive_face_detection_demo_gapi/main.cpp
 */
-
-#include <string>
-#include <tuple>
-#include <vector>
+#include <gflags/gflags.h>
+#include <utils/ocv_common.hpp>
+#include <utils/performance_metrics.hpp>
+#include <utils/slog.hpp>
+#include <utils_gapi/stream_source.hpp>
 
 #include <openvino/openvino.hpp>
 #include <opencv2/gapi.hpp>
@@ -25,10 +26,142 @@
 #include <utils/slog.hpp>
 #include <utils_gapi/stream_source.hpp>
 
-#include "interactive_face_detection_gapi.hpp"
 #include "face.hpp"
 #include "visualizer.hpp"
 
+namespace {
+constexpr char h_msg[] = "show the help message and exit";
+DEFINE_bool(h, false, h_msg);
+
+constexpr char m_msg[] = "path to an .xml file with a trained Face Detection model";
+DEFINE_string(m, "", m_msg);
+
+constexpr char i_msg[] = "an input to process. The input must be a single image, a folder of images, video file or camera id. Default is 0";
+DEFINE_string(i, "0", i_msg);
+
+constexpr char bb_enlarge_coef_msg[] = "coefficient to enlarge/reduce the size of the bounding box around the detected face. Default is 1.2";
+DEFINE_double(bb_enlarge_coef, 1.2, bb_enlarge_coef_msg);
+
+constexpr char d_msg[] = "target device for Face Detection network (the list of available devices is shown below). "
+                                            "The demo will look for a suitable plugin for a specified device. Default is CPU";
+DEFINE_string(d, "CPU", d_msg);
+
+constexpr char dag_msg[] = "target device for Age/Gender Recognition network (the list of available devices is shown below). "
+                                               "The demo will look for a suitable plugin for a specified device. Default is CPU";
+DEFINE_string(dag, "CPU", dag_msg);
+
+constexpr char dam_msg[] = "target device for Antispoofing Classification network (the list of available devices is shown below). "
+                                               "Use \"-d HETERO:<comma-separated_devices_list>\" format to specify HETERO plugin. "
+                                               "The demo will look for a suitable plugin for a specified device. Default is CPU";
+DEFINE_string(dam, "CPU", dam_msg);
+
+constexpr char dem_msg[] = "target device for Emotions Recognition network (the list of available devices is shown below). "
+                                               "The demo will look for a suitable plugin for a specified device. Default is CPU";
+DEFINE_string(dem, "CPU", dem_msg);
+
+constexpr char dhp_msg[] = "target device for Head Pose Estimation network (the list of available devices is shown below). "
+                                               "The demo will look for a suitable plugin for a specified device. Default is CPU";
+DEFINE_string(dhp, "CPU", dhp_msg);
+
+constexpr char dlm_msg[] = "target device for Facial Landmarks Estimation network "
+                                               "(the list of available devices is shown below). The demo will look for a suitable plugin for device specified. Default is CPU";
+DEFINE_string(dlm, "CPU", dlm_msg);
+
+constexpr char dx_coef_msg[] = "coefficient to shift the bounding box around the detected face along the Ox axis";
+DEFINE_double(dx_coef, 1, dx_coef_msg);
+
+constexpr char dy_coef_msg[] = "coefficient to shift the bounding box around the detected face along the Oy axis";
+DEFINE_double(dy_coef, 1, dy_coef_msg);
+
+constexpr char lim_msg[] = "number of frames to store in output. If 0 is set, all frames are stored. Default is 1000";
+DEFINE_uint32(lim, 1000, lim_msg);
+
+// TODO: Make this option valid for single image case
+constexpr char loop_msg[] = "enable playing video on a loop";
+DEFINE_bool(loop, false, loop_msg);
+
+constexpr char mag_msg[] = "path to an .xml file with a trained Age/Gender Recognition model";
+DEFINE_string(mag, "", mag_msg);
+
+constexpr char mam_msg[] = "path to an .xml file with a trained Antispoofing Classification model";
+DEFINE_string(mam, "", mam_msg);
+
+constexpr char mem_msg[] = "path to an .xml file with a trained Emotions Recognition model";
+DEFINE_string(mem, "", mem_msg);
+
+constexpr char mhp_msg[] = "path to an .xml file with a trained Head Pose Estimation model";
+DEFINE_string(mhp, "", mhp_msg);
+
+constexpr char mlm_msg[] = "path to an .xml file with a trained Facial Landmarks Estimation model";
+DEFINE_string(mlm, "", mlm_msg);
+
+constexpr char o_msg[] = "name of the output file(s) to save";
+DEFINE_string(o, "", o_msg);
+
+constexpr char r_msg[] = "output inference results as raw values";
+DEFINE_bool(r, false, r_msg);
+
+constexpr char show_msg[] = "(don't) show output";
+DEFINE_bool(show, true, show_msg);
+
+constexpr char show_emotion_bar_msg[] = "(don't) show emotion bar";
+DEFINE_bool(show_emotion_bar, true, show_emotion_bar_msg);
+
+constexpr char smooth_msg[] = "(don't) smooth person attributes";
+DEFINE_bool(smooth, true, smooth_msg);
+
+constexpr char t_msg[] = "probability threshold for detections. Default is 0.5";
+DEFINE_double(t, 0.5, t_msg);
+
+constexpr char u_msg[] = "resource utilization graphs. Default is cdm. "
+    "c - average CPU load, d - load distribution over cores, m - memory usage, h - hide";
+DEFINE_string(u, "cdm", u_msg);
+
+void parse(int argc, char *argv[]) {
+    gflags::ParseCommandLineFlags(&argc, &argv, false);
+    if (FLAGS_h || 1 == argc) {
+        std::cout <<   "\t[ -h]                                         " << h_msg
+                  << "\n\t[--help]                                      print help on all arguments"
+                  << "\n\t  -m <MODEL FILE>                             " << m_msg
+                  << "\n\t[ -i <INPUT>]                                 " << i_msg
+                  << "\n\t[--bb_enlarge_coef <NUMBER>]                  " << bb_enlarge_coef_msg
+                  << "\n\t[ -d <DEVICE>]                                " << d_msg
+                  << "\n\t[--dag <DEVICE>]                              " << dag_msg
+                  << "\n\t[--dam <DEVICE>]                              " << dam_msg
+                  << "\n\t[--dem <DEVICE>]                              " << dem_msg
+                  << "\n\t[--dhp <DEVICE>]                              " << dhp_msg
+                  << "\n\t[--dlm <DEVICE>]                              " << dlm_msg
+                  << "\n\t[--dx_coef <NUMBER>]                          " << dx_coef_msg
+                  << "\n\t[--dy_coef <NUMBER>]                          " << dy_coef_msg
+                  << "\n\t[--lim <NUMBER>]                              " << lim_msg
+                  << "\n\t[--loop]                                      " << loop_msg
+                  << "\n\t[--mag <MODEL FILE>]                          " << mag_msg
+                  << "\n\t[--mam <MODEL FILE>]                          " << mam_msg
+                  << "\n\t[--mem <MODEL FILE>]                          " << mem_msg
+                  << "\n\t[--mhp <MODEL FILE>]                          " << mhp_msg
+                  << "\n\t[--mlm <MODEL FILE>]                          " << mlm_msg
+                  << "\n\t[ -o <OUTPUT>]                                " << o_msg
+                  << "\n\t[ -r]                                         " << r_msg
+                  << "\n\t[--show] ([--noshow])                         " << show_msg
+                  << "\n\t[--show_emotion_bar] ([--noshow_emotion_bar]) " << show_emotion_bar_msg
+                  << "\n\t[--smooth] ([--nosmooth])                     " << smooth_msg
+                  << "\n\t[ -t <NUMBER>]                                " << t_msg
+                  << "\n\t[ -u <DEVICE>]                                " << u_msg
+                  << "\n\tKey bindings:"
+                     "\n\t\tQ, q, Esc - Quit"
+                     "\n\t\tP, p, 0, spacebar - Pause"
+                     "\n\t\tC - average CPU load, D - load distribution over cores, M - memory usage, H - hide\n";
+        showAvailableDevices();
+        std::cout << ov::get_openvino_version() << std::endl;
+        exit(0);
+    } if (FLAGS_i.empty()) {
+        throw std::invalid_argument{"-i <INPUT> can't be empty"};
+    } if (FLAGS_m.empty()) {
+        throw std::invalid_argument{"-m <MODEL FILE> can't be empty"};
+    }
+    slog::info << ov::get_openvino_version() << slog::endl;
+}
+
 static const std::vector<std::string> EMOTION_VECTOR = {"neutral",
                                                         "happy",
                                                         "sad",
@@ -262,295 +395,277 @@ void ASpoofDataUpdate(const Face::Ptr& face, const cv::Mat& out_a_spoof) {
     const auto real_face_conf = as_data[0] * 100;
     face->updateRealFaceConfidence(real_face_conf);
 }
+} // namespace
 
 int main(int argc, char *argv[]) {
-    try {
-        PerformanceMetrics metrics;
-        /** ---------- Parsing and validating input arguments ----------**/
-        gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
-        if (FLAGS_h) {
-            showUsage();
-            showAvailableDevices();
-            return 0;
-        }
+    std::set_terminate(catcher);
+    parse(argc, argv);
+    PerformanceMetrics metrics;
+    /** ---------------- Graph of demo ---------------- **/
+    cv::GMat in;
+
+    cv::GMat detections = cv::gapi::infer<Faces>(in);
+
+    cv::GOpaque<cv::Size> sz = cv::gapi::streaming::size(in);
+    cv::GArray<cv::Rect> faces_rects =
+        cv::gapi::parseSSD(detections, sz, float(FLAGS_t), false, false);
+    cv::GArray<cv::Rect> faces = PostProc::on(faces_rects, sz,
+                                                FLAGS_bb_enlarge_coef,
+                                                FLAGS_dx_coef,
+                                                FLAGS_dy_coef);
+    auto outs = GOut(cv::gapi::copy(in), detections, faces);
+
+    cv::GArray<cv::GMat> ages, genders;
+    if (!FLAGS_mag.empty()) {
+        std::tie(ages, genders) = cv::gapi::infer<AgeGender>(faces, in);
+        outs += GOut(ages, genders);
+    }
 
-        if (FLAGS_i.empty())
-            throw std::logic_error("Parameter -i is not set");
-        if (FLAGS_m.empty())
-            throw std::logic_error("Parameter -m is not set");
+    cv::GArray<cv::GMat> y_fc, p_fc, r_fc;
+    if (!FLAGS_mhp.empty()) {
+        std::tie(y_fc, p_fc, r_fc) = cv::gapi::infer<HeadPose>(faces, in);
+        outs += GOut(y_fc, p_fc, r_fc);
+    }
 
-        slog::info << ov::get_openvino_version() << slog::endl;
+    cv::GArray<cv::GMat> emotions;
+    if (!FLAGS_mem.empty()) {
+        emotions = cv::gapi::infer<Emotions>(faces, in);
+        outs += GOut(emotions);
+    }
 
-        /** ---------------- Graph of demo ---------------- **/
-        cv::GMat in;
+    cv::GArray<cv::GMat> landmarks;
+    if (!FLAGS_mlm.empty()) {
+        landmarks = cv::gapi::infer<FacialLandmark>(faces, in);
+        outs += GOut(landmarks);
+    }
 
-        cv::GMat detections = cv::gapi::infer<Faces>(in);
+    cv::GArray<cv::GMat> a_spoof;
+    if (!FLAGS_mam.empty()) {
+        a_spoof = cv::gapi::infer<ASpoof>(faces, in);
+        outs += GOut(a_spoof);
+    }
+    auto pipeline = cv::GComputation(cv::GIn(in), std::move(outs));
+    /** ---------------- End of graph ---------------- **/
+    /** Configure networks **/
+    auto det_net = cv::gapi::ie::Params<Faces> {
+        FLAGS_m,                         // path to model
+        fileNameNoExt(FLAGS_m) + ".bin", // path to weights
+        FLAGS_d                          // device to use
+    };
+    slog::info << "The Face Detection model " << FLAGS_m << " is loaded to " << FLAGS_d << " device." << slog::endl;
+
+    auto age_net = cv::gapi::ie::Params<AgeGender> {
+        FLAGS_mag,                         // path to model
+        fileNameNoExt(FLAGS_mag) + ".bin", // path to weights
+        FLAGS_dag                          // device to use
+    }.cfgOutputLayers({ "age_conv3", "prob" });
+    if (!FLAGS_mag.empty()) {
+        slog::info << "The Age/Gender Recognition model " << FLAGS_mag << " is loaded to " << FLAGS_dag << " device." << slog::endl;
+    } else {
+        slog::info << "Age/Gender Recognition DISABLED." << slog::endl;
+    }
 
-        cv::GOpaque<cv::Size> sz = cv::gapi::streaming::size(in);
-        cv::GArray<cv::Rect> faces_rects =
-            cv::gapi::parseSSD(detections, sz, float(FLAGS_t), false, false);
-        cv::GArray<cv::Rect> faces = PostProc::on(faces_rects, sz,
-                                                  FLAGS_bb_enlarge_coef,
-                                                  FLAGS_dx_coef,
-                                                  FLAGS_dy_coef);
-        auto outs = GOut(cv::gapi::copy(in), detections, faces);
+    auto hp_net = cv::gapi::ie::Params<HeadPose> {
+        FLAGS_mhp,                         // path to model
+        fileNameNoExt(FLAGS_mhp) + ".bin", // path to weights
+        FLAGS_dhp                          // device to use
+    }.cfgOutputLayers({ "angle_y_fc", "angle_p_fc", "angle_r_fc" });
+    if (!FLAGS_mhp.empty()) {
+        slog::info << "The Head Pose Estimation model " << FLAGS_mhp << " is loaded to " << FLAGS_dhp << " device." << slog::endl;
+    } else {
+        slog::info << "Head Pose Estimation DISABLED." << slog::endl;
+    }
 
-        cv::GArray<cv::GMat> ages, genders;
-        if (!FLAGS_m_ag.empty()) {
-            std::tie(ages, genders) = cv::gapi::infer<AgeGender>(faces, in);
-            outs += GOut(ages, genders);
-        }
+    auto lm_net = cv::gapi::ie::Params<FacialLandmark> {
+        FLAGS_mlm,                         // path to model
+        fileNameNoExt(FLAGS_mlm) + ".bin", // path to weights
+        FLAGS_dlm                          // device to use
+    }.cfgOutputLayers({ "align_fc3" });
+    if (!FLAGS_mlm.empty()) {
+        slog::info << "The Facial Landmarks Estimation model " << FLAGS_mlm << " is loaded to " << FLAGS_dlm << " device." << slog::endl;
+    } else {
+        slog::info << "Facial Landmarks Estimation DISABLED." << slog::endl;
+    }
 
-        cv::GArray<cv::GMat> y_fc, p_fc, r_fc;
-        if (!FLAGS_m_hp.empty()) {
-            std::tie(y_fc, p_fc, r_fc) = cv::gapi::infer<HeadPose>(faces, in);
-            outs += GOut(y_fc, p_fc, r_fc);
-        }
+    auto am_net = cv::gapi::ie::Params<ASpoof> {
+        FLAGS_mam,                         // path to model
+        fileNameNoExt(FLAGS_mam) + ".bin", // path to weights
+        FLAGS_dam                          // device to use
+    };
+    if (!FLAGS_mam.empty()) {
+        slog::info << "The Anti Spoof model " << FLAGS_mam << " is loaded to " << FLAGS_dam << " device." << slog::endl;
+    } else {
+        slog::info << "Anti Spoof DISABLED." << slog::endl;
+    }
 
-        cv::GArray<cv::GMat> emotions;
-        if (!FLAGS_m_em.empty()) {
-            emotions = cv::gapi::infer<Emotions>(faces, in);
-            outs += GOut(emotions);
-        }
+    auto emo_net = cv::gapi::ie::Params<Emotions> {
+        FLAGS_mem,                         // path to model
+        fileNameNoExt(FLAGS_mem) + ".bin", // path to weights
+        FLAGS_dem                          // device to use
+    };
+    if (!FLAGS_mem.empty()) {
+        slog::info << "The Emotions Recognition model " << FLAGS_mem << " is loaded to " << FLAGS_dem << " device." << slog::endl;
+    } else {
+        slog::info << "Emotions Recognition DISABLED." << slog::endl;
+    }
 
-        cv::GArray<cv::GMat> landmarks;
-        if (!FLAGS_m_lm.empty()) {
-            landmarks = cv::gapi::infer<FacialLandmark>(faces, in);
-            outs += GOut(landmarks);
-        }
+    /** Custom kernels **/
+    auto kernels = cv::gapi::kernels<OCVPostProc>();
+    auto networks = cv::gapi::networks(det_net, age_net, hp_net, lm_net, emo_net, am_net);
+    auto stream = pipeline.compileStreaming(cv::compile_args(kernels, networks));
 
-        cv::GArray<cv::GMat> a_spoof;
-        if (!FLAGS_m_am.empty()) {
-            a_spoof = cv::gapi::infer<ASpoof>(faces, in);
-            outs += GOut(a_spoof);
-        }
-        auto pipeline = cv::GComputation(cv::GIn(in), std::move(outs));
-        /** ---------------- End of graph ---------------- **/
-        /** Configure networks **/
-        auto det_net = cv::gapi::ie::Params<Faces> {
-            FLAGS_m,                         // path to model
-            fileNameNoExt(FLAGS_m) + ".bin", // path to weights
-            FLAGS_d                          // device to use
-        };
-        slog::info << "The Face Detection model " << FLAGS_m << " is loaded to " << FLAGS_d << " device." << slog::endl;
-
-        auto age_net = cv::gapi::ie::Params<AgeGender> {
-            FLAGS_m_ag,                         // path to model
-            fileNameNoExt(FLAGS_m_ag) + ".bin", // path to weights
-            FLAGS_d_ag                          // device to use
-        }.cfgOutputLayers({ "age_conv3", "prob" });
-        if (!FLAGS_m_ag.empty()) {
-            slog::info << "The Age/Gender Recognition model " << FLAGS_m_ag << " is loaded to " << FLAGS_d_ag << " device." << slog::endl;
-        } else {
-            slog::info << "Age/Gender Recognition DISABLED." << slog::endl;
-        }
+    /** Output containers for results **/
+    cv::Mat frame, ssd_res;
+    std::vector<cv::Rect> face_hub;
+    auto out_vector = cv::gout(frame, ssd_res, face_hub);
 
-        auto hp_net = cv::gapi::ie::Params<HeadPose> {
-            FLAGS_m_hp,                         // path to model
-            fileNameNoExt(FLAGS_m_hp) + ".bin", // path to weights
-            FLAGS_d_hp                          // device to use
-        }.cfgOutputLayers({ "angle_y_fc", "angle_p_fc", "angle_r_fc" });
-        if (!FLAGS_m_hp.empty()) {
-            slog::info << "The Head Pose Estimation model " << FLAGS_m_hp << " is loaded to " << FLAGS_d_hp << " device." << slog::endl;
-        } else {
-            slog::info << "Head Pose Estimation DISABLED." << slog::endl;
-        }
+    std::vector<cv::Mat> out_ages, out_genders;
+    if (!FLAGS_mag.empty()) out_vector += cv::gout(out_ages, out_genders);
 
-        auto lm_net = cv::gapi::ie::Params<FacialLandmark> {
-            FLAGS_m_lm,                         // path to model
-            fileNameNoExt(FLAGS_m_lm) + ".bin", // path to weights
-            FLAGS_d_lm                          // device to use
-        }.cfgOutputLayers({ "align_fc3" });
-        if (!FLAGS_m_lm.empty()) {
-            slog::info << "The Facial Landmarks Estimation model " << FLAGS_m_lm << " is loaded to " << FLAGS_d_lm << " device." << slog::endl;
-        } else {
-            slog::info << "Facial Landmarks Estimation DISABLED." << slog::endl;
+    std::vector<cv::Mat> out_y_fc, out_p_fc, out_r_fc;
+    if (!FLAGS_mhp.empty()) out_vector += cv::gout(out_y_fc, out_p_fc, out_r_fc);
+
+    std::vector<cv::Mat> out_emotions;
+    if (!FLAGS_mem.empty()) out_vector += cv::gout(out_emotions);
+
+    std::vector<cv::Mat> out_landmarks;
+    if (!FLAGS_mlm.empty()) out_vector += cv::gout(out_landmarks);
+
+    std::vector<cv::Mat> out_a_spoof;
+    if (!FLAGS_mam.empty()) out_vector += cv::gout(out_a_spoof);
+
+    Visualizer::Ptr visualizer = std::make_shared<Visualizer>(!FLAGS_mag.empty(),
+                                                                !FLAGS_mem.empty(),
+                                                                !FLAGS_mhp.empty(),
+                                                                !FLAGS_mlm.empty(),
+                                                                !FLAGS_mam.empty());
+
+    std::list<Face::Ptr> out_faces;
+    std::ostringstream out;
+    size_t id = 0;
+
+    const cv::Point THROUGHPUT_METRIC_POSITION{10, 30};
+    std::unique_ptr<Presenter> presenter;
+
+    /** Get information about frame **/
+    std::shared_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop);
+    const auto tmp = cap->read();
+    cap.reset();
+    if (!tmp.data) {
+        throw std::runtime_error("Couldn't grab first frame");
+    }
+    cap = openImagesCapture(FLAGS_i, FLAGS_loop, read_type::safe, 0, FLAGS_lim);
+    /** ---------------- The execution part ---------------- **/
+    stream.setSource<custom::CommonCapSrc>(cap);
+
+    /** Save output result **/
+    LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_lim};
+
+    bool isStart = true;
+    const auto startTime = std::chrono::steady_clock::now();
+    stream.start();
+    while (stream.pull(cv::GRunArgsP(out_vector))) {
+        if (!FLAGS_mem.empty() && FLAGS_show_emotion_bar) {
+            visualizer->enableEmotionBar(frame.size(), EMOTION_VECTOR);
         }
 
-        auto am_net = cv::gapi::ie::Params<ASpoof> {
-            FLAGS_m_am,                         // path to model
-            fileNameNoExt(FLAGS_m_am) + ".bin", // path to weights
-            FLAGS_d_am                          // device to use
-        };
-        if (!FLAGS_m_am.empty()) {
-            slog::info << "The Anti Spoof model " << FLAGS_m_am << " is loaded to " << FLAGS_d_am << " device." << slog::endl;
-        } else {
-            slog::info << "Anti Spoof DISABLED." << slog::endl;
+        /** Init presenter **/
+        if (presenter == nullptr) {
+            cv::Size graphSize{static_cast<int>(frame.rows / 4), 60};
+            presenter.reset(new Presenter(FLAGS_u, THROUGHPUT_METRIC_POSITION.y + 15, graphSize));
         }
 
-        auto emo_net = cv::gapi::ie::Params<Emotions> {
-            FLAGS_m_em,                         // path to model
-            fileNameNoExt(FLAGS_m_em) + ".bin", // path to weights
-            FLAGS_d_em                          // device to use
-        };
-        if (!FLAGS_m_em.empty()) {
-            slog::info << "The Emotions Recognition model " << FLAGS_m_em << " is loaded to " << FLAGS_d_em << " device." << slog::endl;
-        } else {
-            slog::info << "Emotions Recognition DISABLED." << slog::endl;
+        /**  Postprocessing **/
+        std::list<Face::Ptr> prev_faces;
+
+        if (FLAGS_smooth) {
+            prev_faces.insert(prev_faces.begin(), out_faces.begin(), out_faces.end());
         }
 
-        /** Custom kernels **/
-        auto kernels = cv::gapi::kernels<OCVPostProc>();
-        auto networks = cv::gapi::networks(det_net, age_net, hp_net, lm_net, emo_net, am_net);
-        auto stream = pipeline.compileStreaming(cv::compile_args(kernels, networks));
-
-        /** Output containers for results **/
-        cv::Mat frame, ssd_res;
-        std::vector<cv::Rect> face_hub;
-        auto out_vector = cv::gout(frame, ssd_res, face_hub);
-
-        std::vector<cv::Mat> out_ages, out_genders;
-        if (!FLAGS_m_ag.empty()) out_vector += cv::gout(out_ages, out_genders);
-
-        std::vector<cv::Mat> out_y_fc, out_p_fc, out_r_fc;
-        if (!FLAGS_m_hp.empty()) out_vector += cv::gout(out_y_fc, out_p_fc, out_r_fc);
-
-        std::vector<cv::Mat> out_emotions;
-        if (!FLAGS_m_em.empty()) out_vector += cv::gout(out_emotions);
-
-        std::vector<cv::Mat> out_landmarks;
-        if (!FLAGS_m_lm.empty()) out_vector += cv::gout(out_landmarks);
-
-        std::vector<cv::Mat> out_a_spoof;
-        if (!FLAGS_m_am.empty()) out_vector += cv::gout(out_a_spoof);
-
-        Visualizer::Ptr visualizer = std::make_shared<Visualizer>(!FLAGS_m_ag.empty(),
-                                                                  !FLAGS_m_em.empty(),
-                                                                  !FLAGS_m_hp.empty(),
-                                                                  !FLAGS_m_lm.empty(),
-                                                                  !FLAGS_m_am.empty());
-
-        std::list<Face::Ptr> out_faces;
-        std::ostringstream out;
-        size_t id = 0;
-
-        const cv::Point THROUGHPUT_METRIC_POSITION{10, 30};
-        std::unique_ptr<Presenter> presenter;
-
-         /** Get information about frame **/
-        std::shared_ptr<ImagesCapture> cap = openImagesCapture(FLAGS_i, FLAGS_loop);
-        const auto tmp = cap->read();
-        cap.reset();
-        cap = openImagesCapture(FLAGS_i, FLAGS_loop, read_type::safe, 0, FLAGS_limit);
-        /** ---------------- The execution part ---------------- **/
-        stream.setSource<custom::CommonCapSrc>(cap);
-
-        /** Save output result **/
-        LazyVideoWriter videoWriter{FLAGS_o, cap->fps(), FLAGS_limit};
-
-        bool isStart = true;
-        const auto startTime = std::chrono::steady_clock::now();
-        stream.start();
-        while (stream.pull(cv::GRunArgsP(out_vector))) {
-            if (!FLAGS_m_em.empty() && !FLAGS_no_show_emotion_bar) {
-                visualizer->enableEmotionBar(frame.size(), EMOTION_VECTOR);
-            }
+        out_faces.clear();
 
-            /** Init presenter **/
-            if (presenter == nullptr) {
-                cv::Size graphSize{static_cast<int>(frame.rows / 4), 60};
-                presenter.reset(new Presenter(FLAGS_u, THROUGHPUT_METRIC_POSITION.y + 15, graphSize));
-            }
+        /** Raw output of detected faces **/
+        if (FLAGS_r) {
+            rawOutputDetections(ssd_res, frame.size(), FLAGS_t);
+        }
 
-            /**  Postprocessing **/
-            std::list<Face::Ptr> prev_faces;
+        /** For every detected face **/
+        for (size_t i = 0; i < face_hub.size(); i++) {
+            Face::Ptr face;
 
-            if (!FLAGS_no_smooth) {
-                prev_faces.insert(prev_faces.begin(), out_faces.begin(), out_faces.end());
-            }
+            cv::Rect rect = face_hub[i] & cv::Rect({0, 0}, frame.size());
+            faceDataUpdate(frame, face, rect,
+                            prev_faces, face_hub,
+                            id, FLAGS_smooth);
 
-            out_faces.clear();
+            if (!FLAGS_mag.empty()) {
+                ageGenderDataUpdate(face, out_ages[i], out_genders[i]);
+                if (FLAGS_r)
+                    rawOutputAgeGender(i, out_ages[i], out_genders[i]);
+            }
 
-            /** Raw output of detected faces **/
-            if (FLAGS_r) {
-                rawOutputDetections(ssd_res, frame.size(), FLAGS_t);
+            if (!FLAGS_mem.empty()) {
+                emotionsDataUpdate(face, out_emotions[i]);
+                if (FLAGS_r)
+                    rawOutputEmotions(i, out_emotions[i]);
             }
 
-            /** For every detected face **/
-            for (size_t i = 0; i < face_hub.size(); i++) {
-                Face::Ptr face;
-
-                cv::Rect rect = face_hub[i] & cv::Rect({0, 0}, frame.size());
-                faceDataUpdate(frame, face, rect,
-                               prev_faces, face_hub,
-                               id, FLAGS_no_smooth);
-
-                if (!FLAGS_m_ag.empty()) {
-                    ageGenderDataUpdate(face, out_ages[i], out_genders[i]);
-                    if (FLAGS_r)
-                        rawOutputAgeGender(i, out_ages[i], out_genders[i]);
-                }
-
-                if (!FLAGS_m_em.empty()) {
-                    emotionsDataUpdate(face, out_emotions[i]);
-                    if (FLAGS_r)
-                        rawOutputEmotions(i, out_emotions[i]);
-                }
-
-                if (!FLAGS_m_hp.empty()) {
-                    headPoseDataUpdate(face, out_y_fc[i], out_p_fc[i], out_r_fc[i]);
-                    if (FLAGS_r)
-                        rawOutputHeadpose(i, out_y_fc[i], out_p_fc[i], out_r_fc[i]);
-                }
-
-                if (!FLAGS_m_lm.empty()) {
-                    landmarksDataUpdate(face, out_landmarks[i]);
-                    if (FLAGS_r)
-                        rawOutputLandmarks(i, out_landmarks[i]);
-                }
-
-                if (!FLAGS_m_am.empty()) {
-                    ASpoofDataUpdate(face, out_a_spoof[i]);
-                    if (FLAGS_r)
-                        rawOutputSpoof(i, out_a_spoof[i]);
-                }
-
-                /** End of face postprocessing **/
-                out_faces.push_back(face);
+            if (!FLAGS_mhp.empty()) {
+                headPoseDataUpdate(face, out_y_fc[i], out_p_fc[i], out_r_fc[i]);
+                if (FLAGS_r)
+                    rawOutputHeadpose(i, out_y_fc[i], out_p_fc[i], out_r_fc[i]);
             }
 
-            /** Drawing faces **/
-            visualizer->draw(frame, out_faces);
+            if (!FLAGS_mlm.empty()) {
+                landmarksDataUpdate(face, out_landmarks[i]);
+                if (FLAGS_r)
+                    rawOutputLandmarks(i, out_landmarks[i]);
+            }
 
-            presenter->drawGraphs(frame);
-            if (isStart) {
-                metrics.update(startTime, frame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX,
-                    0.65, { 200, 10, 10 }, 2, PerformanceMetrics::MetricTypes::FPS);
-                isStart = false;
-            } else {
-                metrics.update({}, frame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX,
-                    0.65, { 200, 10, 10 }, 2, PerformanceMetrics::MetricTypes::FPS);
+            if (!FLAGS_mam.empty()) {
+                ASpoofDataUpdate(face, out_a_spoof[i]);
+                if (FLAGS_r)
+                    rawOutputSpoof(i, out_a_spoof[i]);
             }
 
-            /** Visualizing results **/
-            if (!FLAGS_no_show) {
-                cv::imshow("Detection results", frame);
+            /** End of face postprocessing **/
+            out_faces.push_back(face);
+        }
 
-                int key = cv::waitKey(1);
-                if (27 == key || 'Q' == key || 'q' == key) {
-                    stream.stop();
-                } else {
-                    presenter->handleKey(key);
-                }
-            }
+        /** Drawing faces **/
+        visualizer->draw(frame, out_faces);
 
-            videoWriter.write(frame);
+        presenter->drawGraphs(frame);
+        if (isStart) {
+            metrics.update(startTime, frame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX,
+                0.65, { 200, 10, 10 }, 2, PerformanceMetrics::MetricTypes::FPS);
+            isStart = false;
+        } else {
+            metrics.update({}, frame, { 10, 22 }, cv::FONT_HERSHEY_COMPLEX,
+                0.65, { 200, 10, 10 }, 2, PerformanceMetrics::MetricTypes::FPS);
         }
 
-        cv::destroyAllWindows();
+        /** Visualizing results **/
+        if (FLAGS_show) {
+            cv::imshow(argv[0], frame);
 
-        slog::info << "Metrics report:" << slog::endl;
-        slog::info << "\tFPS: " << std::fixed << std::setprecision(1) << metrics.getTotal().fps << slog::endl;
-        slog::info << presenter->reportMeans() << slog::endl;
-    }
-    catch (const std::exception& error) {
-        slog::err << error.what() << slog::endl;
-        return 1;
-    }
-    catch (...) {
-        slog::err << "Unknown/internal exception happened." << slog::endl;
-        return 1;
+            int key = cv::waitKey(1);
+            if ('P' == key || 'p' == key || '0' == key || ' ' == key) {
+                key = cv::waitKey(0);
+            }
+            if (27 == key || 'Q' == key || 'q' == key) {
+                stream.stop();
+            } else {
+                presenter->handleKey(key);
+            }
+        }
+
+        videoWriter.write(frame);
     }
 
+    slog::info << "Metrics report:" << slog::endl;
+    slog::info << "\tFPS: " << std::fixed << std::setprecision(1) << metrics.getTotal().fps << slog::endl;
+    slog::info << presenter->reportMeans() << slog::endl;
+
     return 0;
 }
diff --git a/demos/noise_suppression_demo/cpp/README.md b/demos/noise_suppression_demo/cpp/README.md
index 38b4a2ea866..0fe5d242e90 100644
--- a/demos/noise_suppression_demo/cpp/README.md
+++ b/demos/noise_suppression_demo/cpp/README.md
@@ -34,7 +34,15 @@ omz_converter --list models.lst
 
 ## Running
 
-Running the application with an empty list of options yields an error message.
+Running the demo with `-h` shows this help message:
+```
+  [ -h]               show this help message and exit
+  [--help]            print help on all arguments
+    -m <MODEL FILE>   path to an .xml file with a trained model
+    -i <WAV>          path to an input WAV file
+  [ -d <DEVICE>]      specify a device to infer on (the list of available devices is shown below). Default is CPU
+  [ -o <WAV>]         path to an output WAV file. Default is noise_suppression_demo_out.wav
+```
 
 For example, to do inference on a CPU, run the following command:
 


Test patch:
diff --git a/demos/tests/cases.py b/demos/tests/cases.py
index 798a9a0f07b..6236dd818a9 100644
--- a/demos/tests/cases.py
+++ b/demos/tests/cases.py
@@ -219,26 +219,6 @@ def single_option_cases(key, *args):
                           '-m_o': ModelArg('mtcnn-o')}),
     )),
 
-    CppDemo(name='interactive_face_detection_demo', implementation='cpp_gapi',
-            model_keys=['-m', '-m_ag', '-m_em', '-m_lm', '-m_hp', '-m_am'],
-            device_keys=['-d', '-d_ag', '-d_em', '-d_lm', '-d_hp', '-d_am'],
-            test_cases=combine_cases(
-        TestCase(options={'-no_show': None,
-            **MONITORS,
-            '-i': DataPatternArg('375x500')}),
-        [
-            TestCase(options={
-                '-m': ModelArg('face-detection-retail-0004'),
-                '-m_ag': ModelArg('age-gender-recognition-retail-0013'),
-                '-m_am': ModelArg('anti-spoof-mn3'),
-                '-m_em': ModelArg('emotions-recognition-retail-0003'),
-                '-m_hp': ModelArg('head-pose-estimation-adas-0001'),
-                '-m_lm': ModelArg('facial-landmarks-35-adas-0002'),
-            }),
-            TestCase(options={'-m': ModelArg('face-detection-adas-0001')})
-        ]
-    )),
-
     CppDemo(name='smart_classroom_demo', implementation='cpp_gapi',
             model_keys=['-m_act', '-m_fd', '-m_lm', '-m_reid'],
             device_keys=['-d_act', '-d_fd', '-d_lm', '-d_reid'],
@@ -387,19 +367,39 @@ def single_option_cases(key, *args):
     )),
 
     CppDemo(name='interactive_face_detection_demo',
-            model_keys=['-m', '-m_ag', '-m_em', '-m_lm', '-m_hp', '-m_am'],
+            model_keys=['-m', '--mag', '--mem', '--mlm', '--mhp', '--mam'],
             device_keys=['-d'], test_cases=combine_cases(
-        TestCase(options={'-no_show': None,
+        TestCase(options={'--noshow': None,
+            **MONITORS,
+            '-i': DataPatternArg('375x500')}),
+        [
+            TestCase(options={
+                '-m': ModelArg('face-detection-retail-0004'),
+                '--mag': ModelArg('age-gender-recognition-retail-0013'),
+                '--mam': ModelArg('anti-spoof-mn3'),
+                '--mem': ModelArg('emotions-recognition-retail-0003'),
+                '--mhp': ModelArg('head-pose-estimation-adas-0001'),
+                '--mlm': ModelArg('facial-landmarks-35-adas-0002'),
+            }),
+            TestCase(options={'-m': ModelArg('face-detection-adas-0001')})
+        ]
+    )),
+
+    CppDemo(name='interactive_face_detection_demo', implementation='cpp_gapi',
+            model_keys=['-m', '--mag', '--mem', '--mlm', '--mhp', '--mam'],
+            device_keys=['-d', '--dag', '--dem', '--dlm', '--dhp', '--dam'],
+            test_cases=combine_cases(
+        TestCase(options={'--noshow': None,
             **MONITORS,
             '-i': DataPatternArg('375x500')}),
         [
             TestCase(options={
                 '-m': ModelArg('face-detection-retail-0004'),
-                '-m_ag': ModelArg('age-gender-recognition-retail-0013'),
-                '-m_am': ModelArg('anti-spoof-mn3'),
-                '-m_em': ModelArg('emotions-recognition-retail-0003'),
-                '-m_hp': ModelArg('head-pose-estimation-adas-0001'),
-                '-m_lm': ModelArg('facial-landmarks-35-adas-0002'),
+                '--mag': ModelArg('age-gender-recognition-retail-0013'),
+                '--mam': ModelArg('anti-spoof-mn3'),
+                '--mem': ModelArg('emotions-recognition-retail-0003'),
+                '--mhp': ModelArg('head-pose-estimation-adas-0001'),
+                '--mlm': ModelArg('facial-landmarks-35-adas-0002'),
             }),
             TestCase(options={'-m': ModelArg('face-detection-adas-0001')})
         ]