Clean validator (#144)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
46cb657b64
commit
19334ebb16
9 changed files with 88 additions and 74 deletions
|
|
@ -179,6 +179,10 @@ class BaseDataset(Dataset):
|
|||
def get_label_info(self, index):
|
||||
label = self.labels[index].copy()
|
||||
label["img"], label["ori_shape"], label["resized_shape"] = self.load_image(index)
|
||||
label["ratio_pad"] = (
|
||||
label["resized_shape"][0] / label["ori_shape"][0],
|
||||
label["resized_shape"][1] / label["ori_shape"][1],
|
||||
) # for evaluation
|
||||
if self.rect:
|
||||
label["rect_shape"] = self.batch_shapes[self.batch[index]]
|
||||
label = self.update_labels_info(label)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue