Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_local_transformation(self):
"""
Generates Trasformation information for RetinaNet
Returns
-------
Nyoka's LocalTransformations object
"""
apply = pml.Apply(
function='KerasRetinaNet:getBase64StringFromBufferedInput',
FieldRef = [pml.FieldRef(field=self.input_format)],
Constant = [pml.Constant(valueOf_='tf' if self.backbone_name in ['mobilenet', 'densenet'] else 'caffe')]
)
der_fld = pml.DerivedField(
name="base64String",
optype="categorical",
dataType="string",
Apply = apply
)
return pml.LocalTransformations(DerivedField = [der_fld])