Safemotion Lib
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
fastreid.data.transforms.autoaugment.RandAugment Class Reference

Public Member Functions

 __init__ (self, ops, num_layers=2, choice_weights=None)
 
 __call__ (self, img)
 

Public Attributes

 ops
 
 num_layers
 
 choice_weights
 

Detailed Description

Definition at line 616 of file autoaugment.py.

Constructor & Destructor Documentation

◆ __init__()

fastreid.data.transforms.autoaugment.RandAugment.__init__ ( self,
ops,
num_layers = 2,
choice_weights = None )

Definition at line 617 of file autoaugment.py.

617 def __init__(self, ops, num_layers=2, choice_weights=None):
618 self.ops = ops
619 self.num_layers = num_layers
620 self.choice_weights = choice_weights
621

Member Function Documentation

◆ __call__()

fastreid.data.transforms.autoaugment.RandAugment.__call__ ( self,
img )

Definition at line 622 of file autoaugment.py.

622 def __call__(self, img):
623 # no replacement when using weighted choice
624 ops = np.random.choice(
625 self.ops, self.num_layers, replace=self.choice_weights is None, p=self.choice_weights)
626 for op in ops:
627 img = op(img)
628 return img
629
630

Member Data Documentation

◆ choice_weights

fastreid.data.transforms.autoaugment.RandAugment.choice_weights

Definition at line 620 of file autoaugment.py.

◆ num_layers

fastreid.data.transforms.autoaugment.RandAugment.num_layers

Definition at line 619 of file autoaugment.py.

◆ ops

fastreid.data.transforms.autoaugment.RandAugment.ops

Definition at line 618 of file autoaugment.py.


The documentation for this class was generated from the following file: