Docstring additions (#122)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2022-12-31 13:42:45 +01:00
committed by GitHub
parent c9f3e469cb
commit df4fc14c10
10 changed files with 291 additions and 73 deletions

View File

@ -436,7 +436,9 @@ class LetterBox:
self.scaleup = scaleup
self.stride = stride
def __call__(self, labels={}, image=None):
def __call__(self, labels=None, image=None):
if labels is None:
labels = {}
img = labels.get("img") if image is None else image
shape = img.shape[:2] # current shape [height, width]
new_shape = labels.pop("rect_shape", self.new_shape)