I almost searched every where on internet but i could not find out the working and output of below functions. Specially what they do in YOLO
algorithm.
getLayerNames()
getUnconnectedOutLayers()
code is as follows:
import cv2
import numpy as np
import time
#Loading Yolo
net = cv2.dnn.readNet("yolov3.weights", "yolov3.cfg")
classes = []
with open("coco.names", "r") as f:
classes = [line.strip() for line in f.readlines()]
layer_names = net.getLayerNames()
outputlayers=[layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]