yolo的anchor使用問題
load_model(model_path, compile=False)
"model_path": 'model_data/yolo.h5',
調用yolo.h5即進入 yolo_body沒錯吧?
def yolo_body(inputs, num_anchors, num_classes):
return Model(inputs, [y1,y2,y3])
此時 y1_shape=(?, 13, 13, 255)
此時 y2_shape=(?, 26, 26, 255)
此時 y3_shape=(?, 52, 52, 255)
**問題A.**
y1,y2,y3,這個時候分類已經完成, coco 分類器的作用原理是如何進行的?
(xywh + 1 + 80 個各別機率)*3,為什麼只是filter數量上的變化就可以直接與COCO結合?
(train yolo loss 就可以自動分類好?)
以及
但是在擷取特徵的時候, Darknet怎麼知道 xywh+1+80 這個順序?
還是純粹訓練出來的?
**問題B.**
def yolo_eval(yolo_outputs,
anchors,num_classes,image_shape,max_boxes=20,score_threshold=.6,iou_threshold=.5):
第一行所輸入的"yolo_outputs"
yolo_outputs = [y1(?, 13, 13, 255),
y2(?, 26, 26, 255),
y3(?, 52, 52, 255)] 沒錯吧?
**問題C.**
def yolo_head(feats, anchors, num_classes, input_shape, calc_loss=False):
原本 feats = yolo_outputs =[y1(?, 13, 13, 255) or y2(?, 26, 26, 255) or y3(?, 52, 52, 255)]
後來 feats = K.reshape(feats, [-1, grid_shape[0], grid_shape[1], num_anchors, num_classes + 5])
feats變成 "[(?*3, 13, 13, 85) or (?*3, 26, 26, 85) or (?*3, 52, 52, 85)]" 這樣沒錯吧 ??
最後用 mask篩選出機率大的我的理解沒錯吧?
**問題D.**
self.yolo_model.input: image_data, 呼叫 =>
self.yolo_model = load_model(model_path, compile=False)
load_model(model_path, compile=False)
"model_path": 'model_data/yolo.h5',
本題範例中的yolo.h5是不是如以下包裝? 是否有所遺漏
model_body = yolo_body(image_input, num_anchors // 3, num_classes)
+ model_body.load_weights(weights_path, by_name=True, skip_mismatch=True)
return [y1,y2,y3]
進入 yolo_eval(yolo_outputs,anchors,num_classes,image_shape,max_boxes=20,score_threshold=.6,iou_threshold=.5):
回答列表
-
2020/02/03 下午 11:11Jeffrey贊同數:0不贊同數:0留言數:0