From 063ac34e3ea59c291d9f58a9cd9a58721e4700a5 Mon Sep 17 00:00:00 2001 From: Dee61298 <104132762+Dee61298@users.noreply.github.com> Date: Thu, 21 Apr 2022 11:06:27 +0200 Subject: [PATCH] Fixed some issues added transforms to the setup (detr training not working otherwise) added missing "same_on_..." parameters to val_transform fixed a typo in setup (self_coco_train had val annotations) --- docsource/source/getting_started/alonet.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docsource/source/getting_started/alonet.ipynb b/docsource/source/getting_started/alonet.ipynb index 69939b49..ac5e075a 100644 --- a/docsource/source/getting_started/alonet.ipynb +++ b/docsource/source/getting_started/alonet.ipynb @@ -105,7 +105,7 @@ " )(frame)\n", " return frame.norm_resnet()\n", "\n", - " def val_transform(self, frame):\n", + " def val_transform(self, frame, same_on_sequence: bool = True, same_on_frames: bool = False):\n", " frame = T.RandomResizeWithAspectRatio(\n", " [800], max_size=1333, same_on_sequence=same_on_sequence, same_on_frames=same_on_frames\n", " )(frame)\n", @@ -116,11 +116,13 @@ " # Setup train/val loaders\n", " self.coco_train = alodataset.CocoBaseDataset(\n", " img_folder = \"train2017\",\n", - " ann_file = \"annotations/instances_val2017.json\"\n", + " ann_file = \"annotations/instances_train2017.json\",\n" + " transform_fn=self.train_transform \n" " )\n", " self.coco_val = alodataset.CocoBaseDataset(\n", " img_folder = \"val2017\",\n", " ann_file = \"annotations/instances_val2017.json\"\n", + " transform_fn=self.val_transform \n" " )\n", "\n", " def train_dataloader(self):\n",