forked from NVIDIA-AI-IOT/deepstream_python_apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbindtrackermeta.cpp
More file actions
120 lines (100 loc) · 5.19 KB
/
Copy pathbindtrackermeta.cpp
File metadata and controls
120 lines (100 loc) · 5.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
* SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
// NvDsTrackerMeta
#include "bind_string_property_definitions.h"
#include "bindtrackermeta.hpp"
namespace py = pybind11;
namespace pydeepstream {
void bindtrackermeta(py::module &m) {
/*Start of Bindings for nvds_tracker_meta.h*/
py::class_<NvDsPastFrameObj>(m, "NvDsPastFrameObj",
pydsdoc::trackerdoc::NvDsPastFrameObjDoc::descr)
.def(py::init<>())
.def_readwrite("frameNum", &NvDsPastFrameObj::frameNum)
.def_readwrite("tBbox", &NvDsPastFrameObj::tBbox)
.def_readwrite("confidence", &NvDsPastFrameObj::confidence)
.def_readwrite("age", &NvDsPastFrameObj::age)
.def("cast",
[](void *data) {
return (NvDsPastFrameObj *) data;
},
py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjDoc::cast);
py::class_<NvDsPastFrameObjList>(m, "NvDsPastFrameObjList",
pydsdoc::trackerdoc::NvDsPastFrameObjListDoc::descr)
.def(py::init<>())
.def_readwrite("numObj", &NvDsPastFrameObjList::numObj)
.def_readwrite("uniqueId", &NvDsPastFrameObjList::uniqueId)
.def_readwrite("classId", &NvDsPastFrameObjList::classId)
.def_property("objLabel",
STRING_CHAR_ARRAY(NvDsPastFrameObjList, objLabel))
.def("cast",
[](void *data) {
return (NvDsPastFrameObjList *) data;
},
py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjListDoc::cast)
.def("list",
[](NvDsPastFrameObjList &self) {
return py::make_iterator(self.list,
self.list + self.numObj);
},
py::keep_alive<0, 1>(), py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjListDoc::list);
py::class_<NvDsPastFrameObjStream>(m, "NvDsPastFrameObjStream",
pydsdoc::trackerdoc::NvDsPastFrameObjStreamDoc::descr)
.def(py::init<>())
.def_readwrite("streamID", &NvDsPastFrameObjStream::streamID)
.def_readwrite("surfaceStreamID",
&NvDsPastFrameObjStream::surfaceStreamID)
.def_readwrite("numAllocated",
&NvDsPastFrameObjStream::numAllocated)
.def_readwrite("numFilled", &NvDsPastFrameObjStream::numFilled)
.def("cast",
[](void *data) {
return (NvDsPastFrameObjStream *) data;
},
py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjStreamDoc::cast)
.def("list",
[](NvDsPastFrameObjStream &self) {
return py::make_iterator(self.list,
self.list + self.numFilled);
},
py::keep_alive<0, 1>(), py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjStreamDoc::list);
py::class_<NvDsPastFrameObjBatch>(m, "NvDsPastFrameObjBatch",
pydsdoc::trackerdoc::NvDsPastFrameObjBatchDoc::descr)
.def(py::init<>())
.def_readwrite("numAllocated",
&NvDsPastFrameObjBatch::numAllocated)
.def_readwrite("numFilled", &NvDsPastFrameObjBatch::numFilled)
.def("cast",
[](void *data) {
return (NvDsPastFrameObjBatch *) data;
},
py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjBatchDoc::cast)
.def("list",
[](NvDsPastFrameObjBatch &self) {
return py::make_iterator(self.list,
self.list + self.numFilled);
},
py::keep_alive<0, 1>(), py::return_value_policy::reference,
pydsdoc::trackerdoc::NvDsPastFrameObjBatchDoc::list);
}
}