YOLOP
YOLOP copied to clipboard
训练车道线和车辆目标检测,该怎么修改config中的default?
训练车道线和车辆目标检测,该怎么修改config中的default?
You need to add a new flag, this will train only detection branch and lane lines (encoder and drivable area will be freezed)
Change 1
Alternating optimization
_C.TRAIN.SEG_ONLY = False # Only train two segmentation branchs _C.TRAIN.DET_ONLY = False # Only train detection branch _C.TRAIN.ENC_SEG_ONLY = False # Only train encoder and two segmentation branchs _C.TRAIN.ENC_DET_ONLY = False # Only train encoder and detection branch
Single task
_C.TRAIN.DRIVABLE_ONLY = False # Only train da_segmentation task _C.TRAIN.LANE_ONLY = False # Only train ll_segmentation task _C.TRAIN.DET_ONLY = False # Only train detection task
Add this line in config/default.py _C.TRAIN.LANE_AND_DETECTION_ONLY = True
Change2 Add this part in tools/train.py if cfg.TRAIN.LANE_AND_DETECTION_ONLY: logger.info('freeze encoder and Da_Seg heads...') # print(model.named_parameters) for k, v in model.named_parameters(): v.requires_grad = True # train all layers if k.split(".")[1] in Encoder_para_idx + Da_Seg_Head_para_idx : print('freezing %s' % k) v.requires_grad = False
Change3 Add this part in lib/core/loss.py in _forward_impl function : if cfg.LANE_AND_DETECTION_ONLY: lseg_da = 0 * lseg_da
Thank you!
Thank you!
车道线的Acc上不去,Lane line Segment: Acc(0.045) IOU (0.016) mIOU(0.491)
车道线的Acc上不去,Lane line Segment: Acc(0.045) IOU (0.016) mIOU(0.491)
你好,能加一下你的联系方式吗,希望能一起探讨问题
车道线的Acc上不去,Lane line Segment: Acc(0.045) IOU (0.016) mIOU(0.491)
你好,能加一下你的联系方式吗,希望能一起探讨问题 好的,非常感谢你的回复 QQ: 359894979