postprocess.h 818 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _RKNN_PPYOLOE_DEMO_POSTPROCESS_H_
  2. #define _RKNN_PPYOLOE_DEMO_POSTPROCESS_H_
  3. #include <stdint.h>
  4. #include <vector>
  5. #include "rknn_api.h"
  6. #include "PPYOLOE.hpp"
  7. // class rknn_app_context_t;
  8. typedef struct
  9. {
  10. int left;
  11. int top;
  12. int right;
  13. int bottom;
  14. } image_rect_t;
  15. typedef struct
  16. {
  17. image_rect_t box;
  18. float prop;
  19. int cls_id;
  20. } object_detect_result;
  21. typedef struct
  22. {
  23. int id;
  24. int count;
  25. object_detect_result results[128];
  26. } object_detect_result_list;
  27. int init_post_process();
  28. void deinit_post_process();
  29. char *coco_cls_to_name(int cls_id);
  30. int post_process(PPYOLOE *app_ctx, rknn_output *outputs, float conf_threshold, float nms_threshold, object_detect_result_list *od_results, int OBJ_CLASS_NUM);
  31. void deinitPostProcess();
  32. #endif //_RKNN_PPYOLOE_DEMO_POSTPROCESS_H_