Ultralytics Code Refactor https://ultralytics.com/actions (#13153)
* Refactor code for speed and clarity * Update dataloaders.py Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> --------- Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
b9019671f4
commit
100a423b66
14 files changed
+30
No files matched your search
@@ -30,6 +30,7 @@ def random_perspective(
|
||||
# torchvision.transforms.RandomAffine(degrees=(-10, 10), translate=(.1, .1), scale=(.9, 1.1), shear=(-10, 10))
|
||||
# targets = [cls, xyxy]
|
||||
|
||||
"""Applies random perspective, rotation, scale, shear, and translation augmentations to an image and targets."""
|
||||
height = im.shape[0] + border[0] * 2 # shape(h,w,c)
|
||||
width = im.shape[1] + border[1] * 2
|
||||
|
||||
|
||||
Reference in new issue
Block a user