Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update dataset.py #1007

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions vision/classification_and_detection/python/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def resize_with_aspectratio(img, out_height, out_width, scale=87.5, inter_pol=cv
new_width = int(100. * out_width / scale)
if height > width:
w = new_width
h = int(new_height * height / width)
h = int (height * (new_width / width))
else:
h = new_height
w = int(new_width * width / height)
w = int(width * (new_height/ height))
img = cv2.resize(img, (w, h), interpolation=inter_pol)
return img

Expand Down
Loading