Utils#
Functions:
|
|
|
Gets paths of all image files in the dir_path recursively. |
|
Updates nested dictionary |
|
|
|
|
|
Updates df with columns of new_df (must have same number of rows). |
- cleanvision.utils.utils.get_filepaths(dir_path)[source]#
- Gets paths of all image files in the dir_path recursively.
All image files with extension in TYPES are allowed. Returns a sorted list of sorted filepaths
- Parameters:
dir_path (str) – Path to the dir containing image files, can be relative or absolute path
- Returns:
Sorted list of image filepaths, note that all paths in this list are absolute paths
- Return type:
List[str]
- cleanvision.utils.utils.deep_update_dict(d, u)[source]#
Updates nested dictionary
- Parameters:
d (dict) – dictionary to update
u (dict) – Updates
- Returns:
Updated dictionary
- Return type:
dict
- cleanvision.utils.utils.update_df(df, new_df, overwrite=True)[source]#
Updates df with columns of new_df (must have same number of rows). New columns in new_df not present in df are appended as extra columns. Columns in df that are present in new_df have their values overwritten if
overwrite==True
.- Return type:
DataFrame