Optimizing Command Line speed with “PfCAIServer” by 10-30%

Exciting update! We’ve implemented improvements that make our Command Line faster than ever, boasting an impressive speed increase of 10-30%. Plus, it’s easier than ever to implement.

Our latest SDK (Version 10.6) improves processing performance of our “pfcaiserver” that is included with our command line tools (CLI), resulting in better ease of use and improved processing time.

What is the pfcaiserver ?

We have several “AI” processing components in our SDK: scene and skin tone detections, white balance detection, AI correction calculations…. the list gets longer every day! Each of these includes a data file that needs to be loaded to enable the processing, and this loading time can take a couple of seconds. The pfcaiserver can load these data files once, then provide these AI tools to separate calls from CLI’s. One pfcaiserver can support many concurrent CLI calls, and thus overall processing is sped up by not needing to re-load the data models on every CLI call, and also by distributing the AI processing to the external pfcaiserver.

How to use it?

If you are already using the CLI, then adding the pfcaiserver has two parts. Your custom SDK package from EyeQ will include an ‘aiserver’ folder with all the necessary components.

  1. Start the pfcaiserver before processing images. The aiserver will load the data models from disk and will remain resident, listening for calls from the CLI to process.
  2. Call the CLI with the “scene-detection-server” parameter, for example:
pfccmd --scene-detection-server=tcp://127.0.0.1:29170

That informs the CLI that the aiserver – still called “scene detection server” for backwards compatibility – exists and what address it’s listening to. You can change the IP address or port as needed.

What’s the benefit?

The performance gains depend on the OS being used – gains on Windows are much larger than on Linux or OSX – and by the way the CLI is called. The largest speed gains will be seen when the CLI is called with a single image to process; smaller gains will result when processing a folder of many images or when using the image-list-file calling process.

You should expect 10% to 30% speed improvement in most cases.

Keep Reading