deepdisc.model.loaders

Classes

DataMapper

Base class that will map data to the format necessary for the model

DictMapper

Class that will map COCO dictionary data to the format necessary for the model

MagRedshiftDictMapper

Base class that will map data to the format necessary for the model

RedshiftDictMapper

Base class that will map data to the format necessary for the model

GoldRedshiftDictMapper

Base class that will map data to the format necessary for the model

RedshiftEBVDictMapper

Base class that will map data to the format necessary for the model

GoldRedshiftDictMapperEval

Base class that will map data to the format necessary for the model

RedshiftDictMapperEval

Base class that will map data to the format necessary for the model

WCSDictmapper

Base class that will map data to the format necessary for the model

RedshiftEBVDictMapper

Base class that will map data to the format necessary for the model

Functions

return_train_loader(cfg, mapper)

Returns a train loader

return_test_loader(cfg, mapper)

Returns a test loader

Module Contents

class DataMapper(imreader=None, key_mapper=None, augmentations=None)[source]

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

IR[source]
km[source]
augmentations[source]
map_data(data)[source]
class DictMapper(*args, **kwargs)[source]

Bases: DataMapper

Class that will map COCO dictionary data to the format necessary for the model

map_data(dataset_dict)[source]

Map COCO dict data to the correct format

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances

class MagRedshiftDictMapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class RedshiftDictMapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class GoldRedshiftDictMapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class RedshiftEBVDictMapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class GoldRedshiftDictMapperEval(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class RedshiftDictMapperEval(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class WCSDictmapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

class RedshiftEBVDictMapper(*args, **kwargs)[source]

Bases: DataMapper

Base class that will map data to the format necessary for the model

To implement a data mapper for a new class, the derived class needs to have an __init__() function that calls super().__init__(*args, **kwargs) and a custom version of map_data().

map_data(dataset_dict)[source]

Map COCO dict data to the correct format, add ground truth redhshift

Parameters:

dataset_dict (dict) – a dictionary of COCO formatted metadata

Return type:

reformatted dictionary including image and instances+redshift

return_train_loader(cfg, mapper)[source]

Returns a train loader

Parameters:
  • cfg (LazyConfig) – The lazy config, which contains data loader config values

  • functionality (**kwargs for the read_image)

Return type:

a train loader

return_test_loader(cfg, mapper)[source]

Returns a test loader

Parameters:
  • cfg (LazyConfig) – The lazy config, which contains data loader config values

  • functionality (**kwargs for the read_image)

Return type:

a test loader