|
|
@@ -146,7 +146,6 @@ def line_vectorizer_loss(result, x, ys, idx, jcs, n_batch, ps, n_out_line, n_out
|
|
|
return result
|
|
|
|
|
|
|
|
|
-
|
|
|
def wirepoint_head_line_loss(targets, output, x, y, idx, loss_weight):
|
|
|
# output, feature: head返回结果
|
|
|
# x, y, idx : line中间生成结果
|
|
|
@@ -1054,7 +1053,8 @@ class RoIHeads(nn.Module):
|
|
|
features_lcnn = features['0']
|
|
|
if self.has_line():
|
|
|
# print('has line_head')
|
|
|
- outputs = self.line_head(features_lcnn)
|
|
|
+ # outputs = self.line_head(features_lcnn)
|
|
|
+ outputs = features_lcnn[:, 0:5, :, :]
|
|
|
loss_weight = {'junc_map': 8.0, 'line_map': 0.5, 'junc_offset': 0.25, 'lpos': 1, 'lneg': 1}
|
|
|
x, y, idx, jcs, n_batch, ps, n_out_line, n_out_junc = self.line_predictor(
|
|
|
inputs=outputs, features=features_lcnn, targets=targets)
|
|
|
@@ -1082,8 +1082,6 @@ class RoIHeads(nn.Module):
|
|
|
pass
|
|
|
# print('has not line_head')
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if self.has_mask():
|
|
|
mask_proposals = [p["boxes"] for p in result]
|
|
|
if self.training:
|