Skip to content

fsdb_import_images

plantdb.commons.cli.fsdb_import_images Link

Import the content of a folder as an 'images' Fileset to a new Scan dataset.

list_image_files Link

list_image_files(images_path)

List image files in the path.

Parameters:

Name Type Description Default
images_path Path

The path to the folder containing the dataset.

required

Returns:

Type Description
list

The list of image files, selected by their extensions.

Source code in plantdb/commons/cli/fsdb_import_images.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
def list_image_files(images_path):
    """List image files in the path.

    Parameters
    ----------
    images_path : pathlib.Path
        The path to the folder containing the dataset.

    Returns
    -------
    list
        The list of image files, selected by their extensions.
    """
    return [f for f in images_path.iterdir() if f.suffix in IMG_EXT]