Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yolox/data/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def pull_item(self, index):

target = self.load_anno(index)

img_info = (width, height)
img_info = (height, width)

return img, target, img_info, index

Expand Down
4 changes: 2 additions & 2 deletions yolox/models/yolo_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def get_output_and_grid(self, output, k, stride):
n_ch = 5 + self.num_classes
hsize, wsize = output.shape[-2:]
if grid.shape[2:4] != output.shape[2:4]:
xv, yv = meshgrid(F.arange(hsize), F.arange(wsize))
xv, yv = meshgrid(F.arange(wsize), F.arange(hsize))
grid = F.stack((xv, yv), 2).reshape(1, 1, hsize, wsize, 2)
self.grids[k] = grid

Expand All @@ -223,7 +223,7 @@ def decode_outputs(self, outputs):
grids = []
strides = []
for (hsize, wsize), stride in zip(self.hw, self.strides):
xv, yv = meshgrid(F.arange(hsize), F.arange(wsize))
xv, yv = meshgrid(F.arange(wsize), F.arange(hsize))
grid = F.stack((xv, yv), 2).reshape(1, -1, 2)
grids.append(grid)
shape = grid.shape[:2]
Expand Down