Dataset

class mouffet.data.dataset.Dataset(db_type='test', database=None, file_list=None)[source]

Bases: DataStructure

default_subfolders(file_type)[source]

Generate subfolders based on a list provided in the ‘use_subfolders’ option. For each item in the list, this function will try to call the get_itemname_folder_path(database) method from the DataHandler instance, where itemname is the name of the current item in the list. For example, if the item is “class”, then the function will attempt to call the ‘get_class_folder_path’ method. If the method is not found, the option is skipped. Note that the called function should have the following signature: get_itemname_folder_path(database) -> str or pathlib.Path

Parameters:

database (dict) – The dictionary holding all option for the specific database.

Returns:

a Path

Return type:

pathlib.Path

exists(file_types=None)[source]

_summary_

Returns:

_description_

Return type:

_type_

get_class_subfolder_path()[source]

Function called if data is to be saved using a class subfolder. By default uses the value of the “class_type” option.

Parameters:

database (dict) – The dictionary holding all option for the specific database.

Returns:

The class name

Return type:

str

get_ground_truth()[source]

_summary_

get_raw_data()[source]

_summary_

get_save_dest_paths(dest_dir)[source]

Create

Parameters:
  • dest_dir ([type]) – [description]

  • db_type ([type]) – [description]

  • subfolders ([type]) – [description]

Returns:

[description]

Return type:

[type]

load(load_opts=None)[source]

_summary_

Parameters:

load_opts (_type_, optional) – _description_. Defaults to None.

save(data, missing=None)[source]

_summary_

Parameters:

data (_type_) – _description_

summarize()[source]

_summary_

Returns:

_description_

Return type:

_type_