Help Center> Huawei HiLens> Developer Guide> Hard Example Upload Module> Obtaining Hard Example Configurations
Updated on 2022-02-22 GMT+08:00

Obtaining Hard Example Configurations

This API is used to read the hard example configuration file. The path of the hard example configuration file is the data directory of the corresponding skill, for example, /home/hilens/skills/***skill_path/data/hardsample_config.json.

  • API calling

    hilens.get_hard_sample_config()

  • Return value

    Hard example configuration file in JSON format. Example:

    {
    "hard_sample_setting" :
        [
          {
            "camera_names" :["123"],
            "data_count" : 100,
            "datacur_count" : 100,
            "dataset_name" : "dataset-a3ae",
            "dataset_path" : "https://a.b.csss.obs.cn-north-7.ulanqab.huawei.com/nali/",
            "model_algorithm" : "image_classification",
            "model_id" : "073c4c8674164307ae300b713a4a050c",
            "model_name" : "model-framework5",
            "setting_config" :
                {
                    "thr" : 0.5
                }
          }
        ]
    }
    Table 1 Parameters

    Parameter

    Description

    camera_names

    Camera name. Data of different cameras can be distinguished during data upload.

    data_count

    Total number of uploaded images

    datacur_count

    Number of images that have been uploaded

    dataset_name

    Name of the target dataset

    dataset_path

    Target path, which corresponds to the URL of the dataset

    model_algorithm

    Algorithm of a model. Generally, the algorithm is classification or detection.

    model_id

    Model ID

    model_name

    Model name. Data of different models can be distinguished during data upload.

    setting_config

    Other settings. Some configurations are custom, such as the threshold.

    thr

    Threshold. You can deliver thresholds on the hard example upload configuration page so that different thresholds can be used in different scenarios.