Skip to content

Commit f36f351

Browse files
nlgrangerdatumbox
andauthored
Fix #6550 (#6551)
Changes image size convention to (h, w). I don't think this is used by models other than SSD which assumes this convention. Co-authored-by: Nicolas Granger <[email protected]> Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent 8acf1ca commit f36f351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/models/detection/anchor_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ def _grid_default_boxes(
213213
for k, f_k in enumerate(grid_sizes):
214214
# Now add the default boxes for each width-height pair
215215
if self.steps is not None:
216-
x_f_k = image_size[0] / self.steps[k]
217-
y_f_k = image_size[1] / self.steps[k]
216+
x_f_k = image_size[1] / self.steps[k]
217+
y_f_k = image_size[0] / self.steps[k]
218218
else:
219219
y_f_k, x_f_k = f_k
220220

0 commit comments

Comments
 (0)