Custom Metrics
Last updated
Last updated
Sextant supports custom Metrics algorithms, you just need to upload the algorithm of your metrics to Github Repo and enter its Url into Sextant.
The algorithm of your metrics should be written with python and upload to Github.
Sextant supports two types of indicators, Float and Curve, and users can set their valid range.
The output is a floating point value, which is displayed on the front end as a "name=value" style, e.g. mAP=0.75.
The output is two one-dimensional arrays named x and y. It will be displayed as a curve in the front-end, with the values of x and y corresponding to the horizontal and vertical coordinates of the points on the curve.
Sextant supports setting the valid range of metrics to data or dataset.
Each data evaluated will return a corresponding value, such as the average value of IoU.
Each evaluation will only return one corresponding value, such as the mAP of this evaluation.
The algorithm of your metrics needs to comply with the following rules:
If you need additional dependency packages in your code, you need to create requirements.txt in the root directory and write dependencies in it (GPU operations for deep learning frameworks such as torch, tensorflow, etc. are not supported).
You need to create an __init__.py, file in the root path of GitHub to ensure that the path to the repo can generate a class called Evaluator as a python package when it is cloned locally.
There is one and only one class named Evaluator in the python library.
The Evaluator needs to have the method to obtain the annotation scores of a single image. evaluate_one_data(input_source: dict, input_target: dict) -> dict method. Please refer to Graviti's docs for input_source and input_target values.
The Evaluator needs to have a method to obtain the overall annotation scores. get_result() -> dict.
The return values of the above two methods must comply with the following structure. (Currently, only two types of data are supported: float and curve.)