import_landmark_files¶
-
menpo.io.import_landmark_files(pattern, max_landmarks=None, shuffle=False, as_generator=False, verbose=False)[source]¶ Import Multiple landmark files.
For each landmark file found returns an importer then returns a
LabelledPointUndirectedGraphor aPointCloud.Note that this is a function returns a
LazyList. Therefore, the function will return immediately and indexing into the returned list will load the landmarks at run time. If all landmarks should be loaded, then simply wrap the returnedLazyListin a Python list.- Parameters
pattern (str) – A glob path pattern to search for landmark files. Every landmark file found to match the glob will be imported one by one. See
landmark_file_pathsfor more details of what landmark files will be found.max_landmarks (positive int, optional) – If not
None, only import the firstmax_landmark_filesfound. Else, import all.shuffle (bool, optional) – If
True, the order of the returned landmark files will be randomised. IfFalse, the order of the returned landmark files will be alphanumerically ordered.as_generator (bool, optional) – If
True, the function returns a generator and assets will be yielded one after another when the generator is iterated over.verbose (bool, optional) – If
Trueprogress of the importing will be dynamically reported.
- Returns
lazy_list (
LazyListor generator) – ALazyListor generator yieldingPointCloudorLabelledPointUndirectedGraphinstances found to match the glob pattern provided.- Raises
ValueError – If no landmarks are found at the provided glob.