Add DeepStream 5.1 support

This commit is contained in:
Marcos Luciano
2023-05-31 15:58:17 -03:00
parent b2c4bee8dc
commit 3f14b0d95d
14 changed files with 236 additions and 4 deletions

View File

@@ -54,7 +54,13 @@ Yolo::createEngine(nvinfer1::IBuilder* builder, nvinfer1::IBuilderConfig* config
nvinfer1::INetworkDefinition *network = builder->createNetworkV2(0);
if (parseModel(*network) != NVDSINFER_SUCCESS) {
#ifdef LEGACY
network->destroy();
#else
delete network;
#endif
return nullptr;
}
@@ -105,7 +111,12 @@ Yolo::createEngine(nvinfer1::IBuilder* builder, nvinfer1::IBuilderConfig* config
else
std::cerr << "Building engine failed\n" << std::endl;
delete network;
#ifdef LEGACY
network->destroy();
#else
delete network;
#endif
return engine;
}