1 // Copyright (C) 2018 Intel Corporation
3 // SPDX-License-Identifier: Apache-2.0
10 #include <gflags/gflags.h>
14 #include <os/windows/w_dirent.h>
19 /// @brief message for help argument
20 static const char help_message[] = "Print a usage message.";
22 /// @brief message for images argument
23 static const char image_message[] = "Required. Path to a folder with images or path to an image files: a .ubyte file for LeNet"\
24 "and a .bmp file for the other networks.";
26 /// @brief message for plugin_path argument
27 static const char plugin_path_message[] = "Path to a plugin folder.";
29 /// @brief message for model argument
30 static const char model_message[] = "Required. Path to an .xml file with a trained model.";
32 /// @brief message for assigning cnn calculation to device
33 static const char target_device_message[] = "Specify the target device to infer on; CPU, GPU, FPGA or MYRIAD is acceptable. " \
34 "Sample will look for a suitable plugin for device specified (CPU by default)";
36 /// @brief message for performance counters
37 static const char performance_counter_message[] = "Enables per-layer performance report";
39 /// @brief message for top results number
40 static const char ntop_message[] = "Number of top results (default 10)";
42 /// @brief message for iterations count
43 static const char iterations_count_message[] = "Number of iterations (default 1)";
45 /// @brief message for clDNN custom kernels desc
46 static const char custom_cldnn_message[] = "Required for clDNN (GPU)-targeted custom kernels."\
47 "Absolute path to the xml file with the kernels desc.";
49 /// @brief message for user library argument
50 static const char custom_cpu_library_message[] = "Required for MKLDNN (CPU)-targeted custom layers." \
51 "Absolute path to a shared library with the kernels impl.";
53 /// @brief message for plugin messages
54 static const char plugin_message[] = "Enables messages from a plugin";
56 /// @brief Define flag for showing help message <br>
57 DEFINE_bool(h, false, help_message);
59 /// @brief Define parameter for set image file <br>
60 /// It is a required parameter
61 DEFINE_string(i, "", image_message);
63 /// @brief Define parameter for set model file <br>
64 /// It is a required parameter
65 DEFINE_string(m, "", model_message);
67 /// @brief Define parameter for set path to plugins <br>
68 DEFINE_string(pp, "", plugin_path_message);
70 /// @brief device the target device to infer on <br>
71 DEFINE_string(d, "CPU", target_device_message);
73 /// @brief Top results number (default 10) <br>
74 DEFINE_int32(nt, 10, ntop_message);
76 /// @brief Enable per-layer performance report
77 DEFINE_bool(pc, false, performance_counter_message);
79 /// @brief Define parameter for clDNN custom kernels path <br>
81 DEFINE_string(c, "", custom_cldnn_message);
83 /// @brief Absolute path to CPU library with user layers <br>
84 /// It is a optional parameter
85 DEFINE_string(l, "", custom_cpu_library_message);
87 /// @brief Iterations count (default 1)
88 DEFINE_int32(ni, 1, iterations_count_message);
90 /// @brief Enable plugin messages
91 DEFINE_bool(p_msg, false, plugin_message);
94 * @brief This function show a help message
96 static void showUsage() {
97 std::cout << std::endl;
98 std::cout << "classification_sample [OPTION]" << std::endl;
99 std::cout << "Options:" << std::endl;
100 std::cout << std::endl;
101 std::cout << " -h " << help_message << std::endl;
102 std::cout << " -i \"<path>\" " << image_message << std::endl;
103 std::cout << " -m \"<path>\" " << model_message << std::endl;
104 std::cout << " -l \"<absolute_path>\" " << custom_cpu_library_message << std::endl;
105 std::cout << " Or" << std::endl;
106 std::cout << " -c \"<absolute_path>\" " << custom_cldnn_message << std::endl;
107 std::cout << " -pp \"<path>\" " << plugin_path_message << std::endl;
108 std::cout << " -d \"<device>\" " << target_device_message << std::endl;
109 std::cout << " -nt \"<integer>\" " << ntop_message << std::endl;
110 std::cout << " -ni \"<integer>\" " << iterations_count_message << std::endl;
111 std::cout << " -pc " << performance_counter_message << std::endl;
112 std::cout << " -p_msg " << plugin_message << std::endl;