self.softmax = nn.Softmax(dim=-1) #所有类的概率相加为1 self.detect = Detect(num_classes, 0, 200, 0.01, 0.45)
top_k, conf_thresh, nms_thresh分别表示
- 一张图片中,每一类的预测框数量
- 置信度阈值,低于该阈值的预测框会被舍弃
- 非极大值抑制,值越小表示要求的预测框重叠度越小,0.0表示不允许重叠
self.softmax = nn.Softmax(dim=-1) #所有类的概率相加为1 self.detect = Detect(num_classes, 0, 200, 0.01, 0.45)
top_k, conf_thresh, nms_thresh分别表示