ml.postprocessing.darknet --- Darknet

โมดูล ml.postprocessing.darknet มีตัวประมวลผลหลังการทำงานสำหรับโมเดลตรวจจับวัตถุแบบ Darknet

class YoloV2 -- YOLO V2

ตัวประมวลผลหลังการทำงานสำหรับเอาต์พุตของโมเดล YOLO V2

class ml.postprocessing.darknet.YoloV2(threshold: float = 0.6, anchors: numpy.ndarray = None, nms_threshold: float = 0.1, nms_sigma: float = 0.1)

สร้างตัวประมวลผลหลังการทำงาน YOLO V2

threshold ค่าขีดแบ่งสำหรับ score ที่ใช้ก่อนการทำ non-maximum suppression

anchors numpy.ndarray สองมิติที่มี shape (N, 2) เก็บมิติ anchor box (w, h) ที่โมเดลได้รับการฝึกมา หาก None จะใช้ชุด anchor เริ่มต้นที่มีอยู่ภายใน 5 ตัว

nms_threshold ค่าขีดแบ่งที่ส่งให้ non-maximum suppression

nms_sigma ค่า Sigma ที่ส่งให้ non-maximum suppression

__call__(model: ml.Model, inputs: list, outputs: list) list

ถูกเรียกโดย ml.Model.predict() เพื่อประมวลผลเอาต์พุตของโมเดลหลังการอนุมาน

model อินสแตนซ์ ml.Model ที่ตัวประมวลผลหลังการทำงานนี้แนบอยู่

inputs รายการออบเจ็กต์อินพุตของโมเดล (ใช้เพื่อรับ ROI ของอินพุต)

outputs รายการเทนเซอร์เอาต์พุตดิบของโมเดล

คืนรายการของรายการ ((x, y, w, h), score) tuple แยกตามคลาส เช่น [[((x, y, w, h), score), ...], ...] รายการคลาสว่างจะถูกเก็บไว้เพื่อให้แต่ละดัชนีรายการตรงกับดัชนีคลาสของโมเดล คืนค่า tuple ว่าง () เมื่อไม่มีการตรวจจับใดผ่านค่าขีดแบ่ง score

class YoloLC -- YOLO LC

ตัวประมวลผลหลังการทำงานสำหรับเอาต์พุตของโมเดล YOLO LC เป็น subclass ของ YoloV2 ที่มีชุด anchor เริ่มต้นต่างกันซึ่งปรับแต่งสำหรับโมเดล YOLO LC

class ml.postprocessing.darknet.YoloLC(threshold: float = 0.6, anchors: numpy.ndarray = None, nms_threshold: float = 0.1, nms_sigma: float = 0.1)

สร้างตัวประมวลผลหลังการทำงาน YOLO LC

threshold ค่าขีดแบ่งสำหรับ score ที่ใช้ก่อนการทำ non-maximum suppression

anchors numpy.ndarray สองมิติที่มี shape (N, 2) เก็บมิติ anchor box (w, h) ที่โมเดลได้รับการฝึกมา หาก None จะใช้ชุด anchor YOLO LC เริ่มต้นที่มีอยู่ภายใน 5 ตัว

nms_threshold ค่าขีดแบ่งที่ส่งให้ non-maximum suppression

nms_sigma ค่า Sigma ที่ส่งให้ non-maximum suppression

__call__(model: ml.Model, inputs: list, outputs: list) list

รับช่วงต่อจาก YoloV2 ดู YoloV2.__call__()