Skip to content

Commit ab54588

Browse files
authored
Pad tile to image size (512 x 512) (#3887)
* update * update resnet recipe
1 parent 9c88dec commit ab54588

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/otx/algorithms/detection/configs/base/data/tiling/base_iseg_tile_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
dict(type="Resize", img_scale=img_size, keep_ratio=True),
1818
dict(type="RandomFlip", flip_ratio=0.5),
1919
dict(type="Normalize", **img_norm_cfg),
20-
dict(type="Pad", pad_to_square=True),
20+
dict(type="Pad", size=img_size),
2121
dict(type="DefaultFormatBundle"),
2222
dict(
2323
type="Collect",
@@ -45,7 +45,7 @@
4545
dict(type="Resize", keep_ratio=True),
4646
dict(type="RandomFlip"),
4747
dict(type="Normalize", **img_norm_cfg),
48-
dict(type="Pad", pad_to_square=True),
48+
dict(type="Pad", size=img_size),
4949
dict(type="ImageToTensor", keys=["img"]),
5050
dict(type="Collect", keys=["img"]),
5151
],

src/otx/algorithms/detection/configs/base/data/tiling/efficientnet_iseg_tile_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
dict(type="Resize", img_scale=img_size, keep_ratio=True),
1818
dict(type="RandomFlip", flip_ratio=0.5),
1919
dict(type="Normalize", **img_norm_cfg),
20-
dict(type="Pad", pad_to_square=True),
20+
dict(type="Pad", size=img_size),
2121
dict(type="DefaultFormatBundle"),
2222
dict(
2323
type="Collect",
@@ -45,7 +45,7 @@
4545
dict(type="Resize", keep_ratio=True),
4646
dict(type="RandomFlip"),
4747
dict(type="Normalize", **img_norm_cfg),
48-
dict(type="Pad", pad_to_square=True),
48+
dict(type="Pad", size=img_size),
4949
dict(type="ImageToTensor", keys=["img"]),
5050
dict(type="Collect", keys=["img"]),
5151
],

src/otx/algorithms/detection/configs/rotated_detection/efficientnetb2b_maskrcnn/tile_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
dict(type="Resize", img_scale=img_size, keep_ratio=False),
1818
dict(type="RandomFlip", flip_ratio=0.5),
1919
dict(type="Normalize", **img_norm_cfg),
20-
dict(type="Pad", pad_to_square=True),
20+
dict(type="Pad", size=img_size),
2121
dict(type="DefaultFormatBundle"),
2222
dict(
2323
type="Collect",
@@ -45,7 +45,7 @@
4545
dict(type="Resize", keep_ratio=False),
4646
dict(type="RandomFlip"),
4747
dict(type="Normalize", **img_norm_cfg),
48-
dict(type="Pad", pad_to_square=True),
48+
dict(type="Pad", size=img_size),
4949
dict(type="ImageToTensor", keys=["img"]),
5050
dict(type="Collect", keys=["img"]),
5151
],

src/otx/algorithms/detection/configs/rotated_detection/resnet50_maskrcnn/tile_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
dict(type="Resize", img_scale=img_size, keep_ratio=True),
1818
dict(type="RandomFlip", flip_ratio=0.5),
1919
dict(type="Normalize", **img_norm_cfg),
20-
dict(type="Pad", pad_to_square=True),
20+
dict(type="Pad", size=img_size),
2121
dict(type="DefaultFormatBundle"),
2222
dict(
2323
type="Collect",
@@ -45,7 +45,7 @@
4545
dict(type="Resize", keep_ratio=True),
4646
dict(type="RandomFlip"),
4747
dict(type="Normalize", **img_norm_cfg),
48-
dict(type="Pad", pad_to_square=True),
48+
dict(type="Pad", size=img_size),
4949
dict(type="ImageToTensor", keys=["img"]),
5050
dict(type="Collect", keys=["img"]),
5151
],

0 commit comments

Comments
 (0)