Skip to content

Commit

Permalink
Merge pull request #5 from fafa28/fix/reverse-aspect-ratio
Browse files Browse the repository at this point in the history
Change aspect ratio to avg_ver/avg_hor instead of avg_hor/avg_ver
  • Loading branch information
dev-strender authored Nov 24, 2020
2 parents c900b6b + 161203d commit 769dde2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion box_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def aspect_ratio(self):
avg_hor = (top_side + bottom_side) / 2
avg_ver = (right_side + left_side) / 2

return (avg_hor + 1e-5) / (avg_ver + 1e-5)
return (avg_ver + 1e-5) / (avg_hor + 1e-5)

def pseudo_transcription_length(self):
return min(round(0.5+(max(self.aspect_ratio(), 1/self.aspect_ratio()))), 10)
Expand Down

0 comments on commit 769dde2

Please sign in to comment.