bai 3 years ago
parent
commit
50b508709a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      test.py

+ 2
- 2
test.py View File

@@ -138,7 +138,7 @@ def test(data,
predn = pred.clone()
scale_coords(img[si].shape[1:], predn[:, :4], shapes[si][0], shapes[si][1]) # native-space pred

# Append to text file(文本
# Append to text file(文本)
if save_txt:
gn = torch.tensor(shapes[si][0])[[1, 0, 1, 0]] # normalization gain whwh
for *xyxy, conf, cls in predn.tolist():
@@ -171,7 +171,7 @@ def test(data,
'bbox': [round(x, 3) for x in b],
'score': round(p[4], 5)})

# Assign all predictions as incorrect tes
# Assign all predictions as incorrect test inc
correct = torch.zeros(pred.shape[0], niou, dtype=torch.bool, device=device)
if nl:
detected = [] # target indices


Loading…
Cancel
Save