NVIDIA DeepStream SDK API Reference

6.4 Release
gstnvinferaudio_custom_parser.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #pragma once
24 
25 #include <initializer_list>
26 #include <iostream>
27 #include <vector>
28 
29 constexpr unsigned int NB_COARSE_LABEL_AUDIO = 8;
30 
31 constexpr auto LABELS_AUDIO = {
32  "1_engine",
33  "2_machinery-impact",
34  "3_non-machinery-impact",
35  "4_powered-saw",
36  "5_alert-signal",
37  "6_music",
38  "7_human-voice",
39  "8_dog",
40  "1-1_small-sounding-engine",
41  "1-2_medium-sounding-engine",
42  "1-3_large-sounding-engine",
43  "2-1_rock-drill",
44  "2-2_jackhammer",
45  "2-3_hoe-ram",
46  "2-4_pile-driver",
47  "3-1_non-machinery-impact",
48  "4-1_chainsaw",
49  "4-2_small-medium-rotating-saw",
50  "4-3_large-rotating-saw",
51  "5-1_car-horn",
52  "5-2_car-alarm",
53  "5-3_siren",
54  "5-4_reverse-beeper",
55  "6-1_stationary-music",
56  "6-2_mobile-music",
57  "6-3_ice-cream-truck",
58  "7-1_person-or-small-group-talking",
59  "7-2_person-or-small-group-shouting",
60  "7-3_large-crowd",
61  "7-4_amplified-speech",
62  "8-1_dog-barking-whining"};
63 
64 /* This is a sample audio neural network parsing function. */
65 
66 extern "C"
67 {
68  bool NvDsInferParseCustomAudio(std::vector<NvDsInferLayerInfo> const &outputLayersInfo,
69  NvDsInferNetworkInfo const &networkInfo, float classifierThreshold,
70  std::vector<NvDsInferAttribute> &attrList, std::string &attrString);
71 }
72 
73 std::vector<unsigned int> index_giver_subcategory(const char *label);
index_giver_subcategory
std::vector< unsigned int > index_giver_subcategory(const char *label)
NB_COARSE_LABEL_AUDIO
constexpr unsigned int NB_COARSE_LABEL_AUDIO
Definition: gstnvinferaudio_custom_parser.h:29
NvDsInferNetworkInfo
Holds information about the model network.
Definition: nvdsinfer.h:110
NvDsInferParseCustomAudio
bool NvDsInferParseCustomAudio(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, float classifierThreshold, std::vector< NvDsInferAttribute > &attrList, std::string &attrString)
LABELS_AUDIO
constexpr auto LABELS_AUDIO
Definition: gstnvinferaudio_custom_parser.h:31