Your package is firstly a Python Package. Therefore, it will look like:
You can create the following structure by running the command
aid new . It will promopt you to enter your package information, like below:
Solver is a
class extended from
aid.Solver class. In this class, you need to implement 2 functions:
infer. As their literal meanings, in the
init function, parameters in your package should be initiate, and in the
infer function, a image file path will be passed in the parameter, and the
infer function is supposed to return your result in a dict or list.
For example, a simple solver frame will look like
aid.toml is the entry file where aid will look for your solvers. It uses toml syntax and should look like the following format:
Make sure this file is located at the root path of your project.
In most occasions, your algorithms (or neural networks etc.) should be uploaded along with some pre-trained models. You can upload it onto any services that allow direct downloads via HTTP requests, e.g. GitHub releases or so.
You need to define your pre-trained models in
pretrained.toml file as following using toml syntax:
Make sure this file is located at the root path of your project. AID will automatically download the file when install packages.
We encourage you to upload your package to GitHub repositories, as long as you want it to be open sourced.