Detection support (#60)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
Ayush Chaurasia
2022-12-03 21:01:23 +05:30
committed by GitHub
parent 5a52e7663a
commit 7ec7cf3aef
9 changed files with 545 additions and 11 deletions

View File

@ -250,7 +250,7 @@ class SegmentationTrainer(BaseTrainer):
cls,
bboxes,
masks,
paths,
paths=paths,
fname=self.save_dir / f"train_batch{ni}.jpg")
def plot_metrics(self):

View File

@ -252,7 +252,7 @@ class SegmentationValidator(BaseValidator):
if len(self.plot_masks):
plot_masks = torch.cat(self.plot_masks, dim=0)
batch_idx, cls, bboxes, conf = output_to_target(preds[0], max_det=15)
plot_images_and_masks(images, batch_idx, cls, bboxes, plot_masks, paths, conf,
plot_images_and_masks(images, batch_idx, cls, bboxes, plot_masks, conf, paths,
self.save_dir / f'val_batch{ni}_pred.jpg', self.names) # pred
self.plot_masks.clear()