Licensing delay using the API to focus stack huge batches
Posted: 09.02.2026 10:08
I need to process thousands of focus stacks from a microscope raster scanner. (>5000 stacks per job)
I have a Python script that calls the Helicon Focus API with the code at the end of this post.
It's way too slow taking more than 10 hours to process 5000 stacks with 30 images per stack on a core i5-11300h with a RTX 3060 laptop GPU.
I tried multithreading the python script and that sped it up slightly cutting the total time by about 30%, but after a few stacks I start getting popups from helicon focus about fetching the license with a loading bar that delays the script.
Even without multithreading (sending multiple calls to helicon focus simultaneously) there is a strange pause between subsequent stacks which I assume is the time spent waiting for helicon focus to authenticate the license?
Python code calling the Helicon focus API:
cmd = [
HELICON_PATH,
"-silent",
"-m:B", "-r:50", "-s:4",
input_folder_path,
f"-save:{output_file_path}"
]
subprocess.run(cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
I have a Python script that calls the Helicon Focus API with the code at the end of this post.
It's way too slow taking more than 10 hours to process 5000 stacks with 30 images per stack on a core i5-11300h with a RTX 3060 laptop GPU.
I tried multithreading the python script and that sped it up slightly cutting the total time by about 30%, but after a few stacks I start getting popups from helicon focus about fetching the license with a loading bar that delays the script.
Even without multithreading (sending multiple calls to helicon focus simultaneously) there is a strange pause between subsequent stacks which I assume is the time spent waiting for helicon focus to authenticate the license?
Python code calling the Helicon focus API:
cmd = [
HELICON_PATH,
"-silent",
"-m:B", "-r:50", "-s:4",
input_folder_path,
f"-save:{output_file_path}"
]
subprocess.run(cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)