Skip to content

Commit

Permalink
fix: loading GT from CSV was broken because of other commits
Browse files Browse the repository at this point in the history
Former-commit-id: 58557fe92493dc3abeff8a813312f80e9b120a14
  • Loading branch information
Javi Ribera committed May 23, 2018
1 parent 657a039 commit d22a00e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions object-locator/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ def __getitem__(self, idx):
dictionary['count'] = torch.tensor(
[dictionary['count']], dtype=torch.get_default_dtype())

# Size before resizing
orig_width, orig_height = \
get_image_size.get_image_size(img_abspath)
with torch.no_grad():
orig_height = torch.tensor(orig_height,
dtype=torch.get_default_dtype())
orig_width = torch.tensor(orig_width,
dtype=torch.get_default_dtype())
dictionary['orig_width'] = orig_width
dictionary['orig_height'] = orig_height

img_transformed = img
transformed_dictionary = dictionary

Expand Down

0 comments on commit d22a00e

Please sign in to comment.