[ADD] pplcv area interpolation (#2153)
* ADD: area interpolation for PPL.CV (cuda) backend * ADD: "area" entry for unit testingpull/2139/head
parent
9db59240a4
commit
439f88b543
csrc/mmdeploy/operation/cuda
tests/test_csrc/preprocess
|
@ -78,6 +78,8 @@ static auto Create(const string_view& interp) {
|
|||
type = ppl::cv::InterpolationType::INTERPOLATION_LINEAR;
|
||||
} else if (interp == "nearest") {
|
||||
type = ppl::cv::InterpolationType::INTERPOLATION_NEAREST_POINT;
|
||||
} else if (interp == "area") {
|
||||
type = ppl::cv::InterpolationType::INTERPOLATION_AREA;
|
||||
} else {
|
||||
MMDEPLOY_ERROR("unsupported interpolation method: {}", interp);
|
||||
throw_exception(eNotSupported);
|
||||
|
|
|
@ -156,7 +156,7 @@ TEST_CASE("resize transform: size", "[resize]") {
|
|||
|
||||
vector<cv::Mat> mats{bgr_mat, gray_mat, bgr_float_mat, gray_float_mat};
|
||||
vector<string> interpolations{"bilinear", "nearest", "area", "bicubic", "lanczos"};
|
||||
set<string> cuda_interpolations{"bilinear", "nearest"};
|
||||
set<string> cuda_interpolations{"bilinear", "nearest", "area"};
|
||||
constexpr const char* kHost = "cpu";
|
||||
SECTION("tuple size with -1") {
|
||||
for (auto& mat : mats) {
|
||||
|
|
Loading…
Reference in New Issue