Chen Xin 0ce7c83c63
mmrotate sdk module (#450)
* support mmrotate

* fix name

* windows default link to cudart_static.lib, which is not compatible with static build && python_api

* python api

* fix ci

* fix type & remove unused meta info

* fix doxygen, add [out] to @param

* fix mmrotate-c-api

* refactor naming

* refactor naming

* fix lint

* fix lint

* move replace_RResize -> get_preprocess

* Update cuda.cmake

On windows, make static lib and python api build success.

* fix ptr

* Use unique ptr to prevent memory leaks

* move unique_ptr

* remove deleter

Co-authored-by: chenxin2 <chenxin2@sensetime.com>
Co-authored-by: cx <cx@ubuntu20.04>
2022-05-17 23:37:32 +08:00

33 lines
692 B
C++

// Copyright (c) OpenMMLab. All rights reserved.
#ifndef MMDEPLOY_MMROTATE_H
#define MMDEPLOY_MMROTATE_H
#include <array>
#include "codebase/common.h"
#include "core/device.h"
#include "core/module.h"
namespace mmdeploy {
namespace mmrotate {
struct RotatedDetectorOutput {
struct Detection {
int label_id;
float score;
std::array<float, 5> rbbox; // cx,cy,w,h,ag
MMDEPLOY_ARCHIVE_MEMBERS(label_id, score, rbbox);
};
std::vector<Detection> detections;
MMDEPLOY_ARCHIVE_MEMBERS(detections);
};
DECLARE_CODEBASE(MMRotate, mmrotate);
} // namespace mmrotate
MMDEPLOY_DECLARE_REGISTRY(mmrotate::MMRotate);
} // namespace mmdeploy
#endif // MMDEPLOY_MMROTATE_H