nms_functor.h 1.25 KB
Newer Older
yanyan's avatar
yanyan committed
1
// Copyright 2019-2020 Yan Yan
2
//
traveller59's avatar
traveller59 committed
3
4
5
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
6
//
traveller59's avatar
traveller59 committed
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
traveller59's avatar
traveller59 committed
9
10
11
12
13
14
15
16
17
18
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef NMS_FUNCTOR_H_
#define NMS_FUNCTOR_H_
#include <tensorview/tensorview.h>

19
20
namespace spconv {
namespace functor {
traveller59's avatar
traveller59 committed
21
template <typename Device, typename T, typename Index>
22
23
24
struct NonMaxSupressionFunctor {
  Index operator()(const Device &d, tv::TensorView<Index> keep,
                   tv::TensorView<const T> boxes, T threshold, T eps);
traveller59's avatar
traveller59 committed
25
26
27
};

template <typename Device, typename T, typename Index>
28
29
30
31
struct rotateNonMaxSupressionFunctor {
  Index operator()(const Device &d, tv::TensorView<Index> keep,
                   tv::TensorView<const T> boxCorners,
                   tv::TensorView<const T> standupIoU, T threshold);
traveller59's avatar
traveller59 committed
32
33
34
35
36
37
};

} // namespace functor
} // namespace spconv

#endif