yolov2_predict.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:chainer-object-detection 作者: dsanno 项目源码 文件源码
def __init__(self, model_path, config):
        # hyper parameters
        self.n_boxes = 5
        self.config = config
        self.labels = config['categories']
        self.n_classes = len(self.labels)
        self.detection_thresh = config['confidence']
        self.iou_thresh = config['iou']
        anchors = config['anchors']
        # load model
        print('loading model...')
        yolov2 = YOLOv2(n_classes=self.n_classes, n_boxes=self.n_boxes)
        serializers.load_npz(model_path, yolov2)
        model = YOLOv2Predictor(yolov2)
        model.init_anchor(anchors)
        model.predictor.finetune = False
        self.model = model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号