Help Center/ Huawei HiLens/ FAQs/ Algorithm Issues/ Why Does a Model with a High Accuracy Verified in ModelArts Perform Poorly on Test Datasets on HiLens Studio?
Updated on 2022-08-18 GMT+08:00

Why Does a Model with a High Accuracy Verified in ModelArts Perform Poorly on Test Datasets on HiLens Studio?

If the built-in algorithms of ModelArts or algorithms in the AI Gallery are used, possible causes are as follows:

  • Preprocessing: For example, the RGB format is used during model training, but the BGR format is used during HiLens inference. The model input is proportional scaling plus padding (especially for the 416 x 416 square input), while the HiLens input is direct scaling.

    You can find the correct model pre processing procedure in customize_service.py in the ModelArts training output directory.

  • Parameters: For example, the yolo3 model depends on anchors during decoding. The anchors must be the same as those during training. The same parameters can be found in customize_service.py in the ModelArts training output directory.
  • Class sequence: The class sequence in the output result must be the same as that in the template. If the output sequence of your model is different, make a simple mapping. For example, the speed_limited class is the 0th one in the template but the 3rd one in your model. When you obtain the detection frame of class 3 through inference, change the class to 0 during output. You can find the model class sequence in the index file in the ModelArts training output directory.