You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

detection_post_process.h 1.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Copyright 2020 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MINDSPORE_LITE_NNACL_FP32_DETECTION_POST_PROCESS_H_
  17. #define MINDSPORE_LITE_NNACL_FP32_DETECTION_POST_PROCESS_H_
  18. #include "nnacl/op_base.h"
  19. #include "nnacl/detection_post_process_parameter.h"
  20. typedef struct {
  21. float y;
  22. float x;
  23. float h;
  24. float w;
  25. } BboxCenter;
  26. typedef struct {
  27. float ymin;
  28. float xmin;
  29. float ymax;
  30. float xmax;
  31. } BboxCorner;
  32. typedef struct {
  33. float score;
  34. int index;
  35. } ScoreWithIndex;
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. int DetectionPostProcess(const int num_boxes, const int num_classes_with_bg, float *input_boxes, float *input_scores,
  40. float *input_anchors, float *output_boxes, float *output_classes, float *output_scores,
  41. float *output_num, DetectionPostProcessParameter *param);
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif // MINDSPORE_LITE_NNACL_FP32_DETECTION_POST_PROCESS_H_