sparkocr.utils.svs.tile_extraction#
Module Contents#
Functions#
|
Yield successive n-sized chunks from lst. |
|
|
|
Finds the thumbnail page using Aperio SVS conventions. |
|
|
|
Calculate optimal number of workers and batch size based on system memory and CPU. |
|
|
|
- chunk(lst, n)#
Yield successive n-sized chunks from lst.
- extract_tile(args)#
- find_thumbnail_page(tif)#
Finds the thumbnail page using Aperio SVS conventions.
- get_mid_level_tiles(flat_tiles_folder, output_folder=None)#
- get_optimal_workers_and_batch(mem_per_worker_gb=1.5, ram_fraction=0.75, min_batch=1, max_batch=8)#
Calculate optimal number of workers and batch size based on system memory and CPU. Leaves headroom (e.g., 35%) to avoid saturation.
- process_svs(svs_file, output_root, num_workers, level='auto', thumbnail=False)#
- svs_to_tiles(input_path, output_root, level='auto', thumbnail=False)#