| 94 | } |
| 95 | |
| 96 | void EfficientDet::check() |
| 97 | { |
| 98 | int idx; |
| 99 | nvinfer1::Dims dims; |
| 100 | |
| 101 | sample::gLogInfo << "the engine's info:" << std::endl; |
| 102 | for (auto layer_name : m_param.input_output_names) |
| 103 | { |
| 104 | idx = this->m_engine->getBindingIndex(layer_name.c_str()); |
| 105 | dims = this->m_engine->getBindingDimensions(idx); |
| 106 | sample::gLogInfo << "idx = " << idx << ", " << layer_name << ": "; |
| 107 | for (int i = 0; i < dims.nbDims; i++) |
| 108 | { |
| 109 | sample::gLogInfo << dims.d[i] << ", "; |
| 110 | } |
| 111 | sample::gLogInfo << std::endl; |
| 112 | } |
| 113 | |
| 114 | sample::gLogInfo << "the context's info:" << std::endl; |
| 115 | for (auto layer_name : m_param.input_output_names) |
| 116 | { |
| 117 | idx = this->m_engine->getBindingIndex(layer_name.c_str()); |
| 118 | dims = this->m_context->getBindingDimensions(idx); |
| 119 | sample::gLogInfo << "idx = " << idx << ", " << layer_name << ": "; |
| 120 | for (int i = 0; i < dims.nbDims; i++) |
| 121 | { |
| 122 | sample::gLogInfo << dims.d[i] << ", "; |
| 123 | } |
| 124 | sample::gLogInfo << std::endl; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | void EfficientDet::copy(const std::vector<cv::Mat>& imgsBatch) |
| 129 | { |