![]() |
import cv2
layer_names = net.getLayerNames() output_layers = [layer_names[i - 1] for i in net.getUnconnectedOutLayers()]
class_ids = [] confidences = [] boxes = [] for out in outs: for detection in out: scores = detection[5:] class_id = np.argmax(scores) confidence = scores[class_id] if confidence > 0.5 and classes[class_id] == "person": # Filter by class and confidence # Object detected center_x = int(detection[0] * width) center_y = int(detection[1] * height) w = int(detection[2] * width) h = int(detection[3] * height) # Rectangle coordinates x = int(center_x - w / 2) y = int(center_y - h / 2) boxes.append([x, y, w, h]) confidences.append(float(confidence)) class_ids.append(class_id)
# Load 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()]
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
import cv2
layer_names = net.getLayerNames() output_layers = [layer_names[i - 1] for i in net.getUnconnectedOutLayers()]
class_ids = [] confidences = [] boxes = [] for out in outs: for detection in out: scores = detection[5:] class_id = np.argmax(scores) confidence = scores[class_id] if confidence > 0.5 and classes[class_id] == "person": # Filter by class and confidence # Object detected center_x = int(detection[0] * width) center_y = int(detection[1] * height) w = int(detection[2] * width) h = int(detection[3] * height) # Rectangle coordinates x = int(center_x - w / 2) y = int(center_y - h / 2) boxes.append([x, y, w, h]) confidences.append(float(confidence)) class_ids.append(class_id)
# Load 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()]
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
![]() |
| Stichworte |
| brdige cs5 |
| Lesezeichen |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
| Â |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Problem mit den Einstellungen | TonyX | Hilfestellung, Tipps und Tricks | 3 | 23.09.12 23:29 |
| CS6 Einstellungen | WDASCH | Hilfestellung, Tipps und Tricks | 3 | 19.06.12 17:16 |
| Facebook Einstellungen | Sinux | Lounge | 13 | 15.12.11 18:31 |
| adobe bridge foto einstellungen | simonl | Hilfestellung, Tipps und Tricks | 7 | 26.06.11 13:01 |
| Bridge Camera Raw: Einstellungen werden nicht gespeichert | jkaros | Hilfestellung, Tipps und Tricks | 0 | 22.12.09 01:38 |
![]()