|
| str | example.cfg_file = "../cfg/yolov4-tiny.cfg" |
| |
| | example.class_names = open(names_file).read().splitlines() |
| |
| | example.colours = darknet.class_colors(class_names) |
| |
| | example.darknet_image = darknet.make_image(width, height, 3) |
| |
| | example.detections = darknet.detect_image(network, class_names, darknet_image, thresh=prediction_threshold) |
| |
| | example.height = darknet.network_height(network) |
| |
| | example.image_bgr = cv2.imread(filename) |
| |
| | example.image_resized = cv2.resize(image_rgb, (width, height), interpolation=cv2.INTER_LINEAR) |
| |
| | example.image_rgb = cv2.cvtColor(image_bgr, cv2.COLOR_BGR2RGB) |
| |
| | example.image_with_boxes = darknet.draw_boxes(detections, image_resized, colours) |
| |
| str | example.log_file = "output.log" |
| |
| str | example.names_file = "../cfg/coco.names" |
| |
| | example.network = darknet.load_net_custom(cfg_file.encode("ascii"), weights_file.encode("ascii"), 0, 1) |
| |
| float | example.prediction_threshold = 0.5 |
| |
| str | example.weights_file = "../yolov4-tiny.weights" |
| |
| | example.width = darknet.network_width(network) |
| |