| 43 | } |
| 44 | |
| 45 | void init_int(py::dict d) |
| 46 | { |
| 47 | try |
| 48 | { |
| 49 | std::vector<std::string> argv; |
| 50 | argv.emplace_back("openpose.py"); |
| 51 | for (auto item : d){ |
| 52 | // Sanity check |
| 53 | std::size_t found = std::string(py::str(item.first)).find("="); |
| 54 | if (found != std::string::npos) |
| 55 | error("PyOpenPose does not support equal sign flags (e.g., " |
| 56 | + std::string(py::str(item.first)) + ").", __LINE__, __FUNCTION__, __FILE__); |
| 57 | // Add argument |
| 58 | argv.emplace_back("--" + std::string(py::str(item.first)) + "=" + std::string(py::str(item.second))); |
| 59 | } |
| 60 | parse_gflags(argv); |
| 61 | } |
| 62 | catch (const std::exception& e) |
| 63 | { |
| 64 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void init_argv(std::vector<std::string> argv) |
| 69 | { |
no test coverage detected