agsantos | ef9f856 | 2020-06-25 16:43:25 -0400 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2004-2020 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 21 | #ifndef _PLUGINPARAMETERS_H_ |
| 22 | #define _PLUGINPARAMETERS_H_ |
| 23 | |
| 24 | // #pragma once |
| 25 | #include <string> |
| 26 | #include <map> |
| 27 | |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 28 | struct PluginParameters { |
| 29 | std::string stream = "out"; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 30 | #ifdef TFLITE |
agsantos | 66b9adb | 2020-06-23 10:40:48 -0400 | [diff] [blame] | 31 | bool useGPU = false; //only used when on desktop |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 32 | #ifdef __ANDROID |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 33 | std::string model = "model_256_Qlatency.tflite"; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 34 | #else |
| 35 | std::string model = "model_256_F_16.tflite"; |
agsantos | 66b9adb | 2020-06-23 10:40:48 -0400 | [diff] [blame] | 36 | #endif |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 37 | #else |
agsantos | 66b9adb | 2020-06-23 10:40:48 -0400 | [diff] [blame] | 38 | bool useGPU = true; //only used when on desktop |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 39 | std::string model = "frozen_inference_graph.pb"; |
| 40 | #endif //TFLITE |
| 41 | std::string image = "background2.png"; |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | void setGlobalPluginParameters(std::map<std::string, std::string> pp); |
| 45 | |
| 46 | void getGlobalPluginParameters(PluginParameters* mPluginParameters); |
| 47 | PluginParameters* getGlobalPluginParameters(); |
| 48 | |
| 49 | #endif //__PLUGINPREFERENCE_H_ |