Skip to content

Instantly share code, notes, and snippets.

@erichare
Created June 30, 2022 23:24
Show Gist options
  • Save erichare/ef8e9afd331364443c4a51330a2d255b to your computer and use it in GitHub Desktop.
Save erichare/ef8e9afd331364443c4a51330a2d255b to your computer and use it in GitHub Desktop.
Sample of the YOLO v6 Daisi Code
def yolo(image: np.ndarray=None, return_type: list=["Image", "Labels"]):
...
inferer = Inferer(source, weights, device="", yaml="coco.yaml",
img_size=new_width, half=False)
inferer.infer(conf_thres=.25, iou_thres=.45, classes=None,
agnostic_nms=False, max_det=1000, save_dir=tmpdir,
save_txt=save_txt, save_img=save_img, hide_labels=False, hide_conf=False)
...
return yolo_result, label_result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment