MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / getOutputsNames

Method getOutputsNames

src/CVObjectDetection.cpp:273–288  ·  view source on GitHub ↗

Get the names of the output layers

Source from the content-addressed store, hash-verified

271
272// Get the names of the output layers
273std::vector<cv::String> CVObjectDetection::getOutputsNames(const cv::dnn::Net& net)
274{
275 static std::vector<cv::String> names;
276
277 //Get the indices of the output layers, i.e. the layers with unconnected outputs
278 std::vector<int> outLayers = net.getUnconnectedOutLayers();
279
280 //get the names of all the layers in the network
281 std::vector<cv::String> layersNames = net.getLayerNames();
282
283 // Get the names of the output layers in names
284 names.resize(outLayers.size());
285 for (size_t i = 0; i < outLayers.size(); ++i)
286 names[i] = layersNames[outLayers[i] - 1];
287 return names;
288}
289
290CVDetectionData CVObjectDetection::GetDetectionData(size_t frameId){
291 // Check if the stabilizer info for the requested frame exists

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected