sort.sort_images

sort.sort_images(id_df, all_image_dir, output_dir)

Sort images into subfolders by proposed ID then encounter.

Copy images from the flat all_image_dir into the output_dir, where the output_dir is now divided in subfolders by proposed ID then encounter.

Parameters

Name Type Description Default
id_df pd.DataFrame Pandas DataFrame with columns ['image', 'proposed_id', 'encounter']. required
all_image_dir str Path to flat directory with every image in the id_df. required
output_dir str Path to new directory into which sort_images will copy files. required

Returns

Name Type Description
None Copies images to the output_dir.

Examples

For a complete working example with real images, see: