default

SupplementDetectionDataEncoder.default(obj)[source]

Convert objects to a dictionary.

The instance class, module and base_class relations are stored in the __class__, __module__ and __base_class__ keys. These are used by the related file decoder to restore the correct class instances.

Parameters

obj (object) – The instance to convert to a dictionary.

Returns

d – The dictionary representation of the instance obj. Convert the detection data instances to dictionaries.

Return type

dict