Hi, Python has GIL - Global Interpreter Lock, so python code itself always run on a single core at a time.
But footprints_to_shapes.py and automatic_masking.py runs faster because while their python-part code is still runs on a single CPU core at a time - C++-part of code takes major part of their execution time and can be executed on multiple CPU cores.
For example inside of
these calls of project/pickPoint and inside of
these calls of image processing operations inside of scipy (they are also written in C++) executions moves from Python-part of code to C++-part of code. And so these calls release Python's GIL at their start and makes multi-core execution possible. They still fallbacks to single-core execution after that, because when they returns to Python-part of code - it is required to acquire GIL back again.