The open source APEER SDKs help to read the inputs and to write the outputs of your module. They help you to create your own module without the pain of considering environment variables or JSONs.
Usage of the Python ADK
This docs article is a small version of the blog article about the APEER SDK Family.
The main idea of the ADKs is that it keeps the technical code to communicate with the APEER environment completely seperate from your code. So you can concentrate on the actual image processing problem and test and use your code independently from APEER.
All our examples have a apeer_main file that serves as the entry point to your module and uses the ADK to read the inputs, writes the outputs and just calls your code, which we will just call your_code.py and assume it has a method run(input_image, threshold).
The Python ADK can easily be installed via pip install apeer-dev-kit.
That’s it. That’s all the technical code you need to execute your module on APEER. You can know go ahead and implement your_code.run(...). It actually doesn’t matter how you return the results generated by your code but we recommend a dictionary.
defrun(input_image_path, red, green, blue):
# your processing code goes here ...
# just make sure you save all result files and return their paths