From 022db5ed1c9193aa0a60698d0535dda09ec5cf53 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 5 Nov 2021 21:55:58 +0800 Subject: [PATCH] update citation (#4464) * update citation * update citation --- deploy/cpp/include/lapjv.h | 4 ++++ deploy/cpp/include/tracker.h | 5 +++++ deploy/cpp/include/trajectory.h | 5 +++++ deploy/cpp/src/lapjv.cpp | 5 +++++ deploy/cpp/src/tracker.cc | 5 +++++ deploy/cpp/src/trajectory.cc | 5 +++++ deploy/pptracking/include/lapjv.h | 4 ++++ deploy/pptracking/include/tracker.h | 5 +++++ deploy/pptracking/include/trajectory.h | 5 +++++ deploy/pptracking/src/lapjv.cpp | 5 +++++ deploy/pptracking/src/tracker.cc | 5 +++++ deploy/pptracking/src/trajectory.cc | 5 +++++ ppdet/data/transform/gridmask_utils.py | 3 +++ ppdet/modeling/post_process.py | 7 +++++++ .../proposal_generator/anchor_generator.py | 3 +++ ppdet/modeling/proposal_generator/target.py | 5 ++++- ppdet/modeling/shape_spec.py | 14 +++----------- static/ppdet/data/transform/gridmask_utils.py | 3 +++ static/ppdet/utils/post_process.py | 11 ++++++++++- 19 files changed, 91 insertions(+), 13 deletions(-) diff --git a/deploy/cpp/include/lapjv.h b/deploy/cpp/include/lapjv.h index b3fc28745..331defc42 100644 --- a/deploy/cpp/include/lapjv.h +++ b/deploy/cpp/include/lapjv.h @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/gatagat/lap/blob/master/lap/lapjv.h +// Ths copyright of gatagat/lap is as follows: +// MIT License #ifndef LAPJV_H #define LAPJV_H diff --git a/deploy/cpp/include/tracker.h b/deploy/cpp/include/tracker.h index 281898604..903c3b304 100644 --- a/deploy/cpp/include/tracker.h +++ b/deploy/cpp/include/tracker.h @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/jdetracker.h +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #pragma once #include diff --git a/deploy/cpp/include/trajectory.h b/deploy/cpp/include/trajectory.h index 1e89abc7d..d801e2800 100644 --- a/deploy/cpp/include/trajectory.h +++ b/deploy/cpp/include/trajectory.h @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/trajectory.h +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #pragma once #include diff --git a/deploy/cpp/src/lapjv.cpp b/deploy/cpp/src/lapjv.cpp index 417249e04..e8a7b58d5 100644 --- a/deploy/cpp/src/lapjv.cpp +++ b/deploy/cpp/src/lapjv.cpp @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/gatagat/lap/blob/master/lap/lapjv.cpp +// Ths copyright of gatagat/lap is as follows: +// MIT License + #include #include #include diff --git a/deploy/cpp/src/tracker.cc b/deploy/cpp/src/tracker.cc index 90232e995..b00e31c4e 100644 --- a/deploy/cpp/src/tracker.cc +++ b/deploy/cpp/src/tracker.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/jdetracker.cpp +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #include #include #include diff --git a/deploy/cpp/src/trajectory.cc b/deploy/cpp/src/trajectory.cc index a923e1af2..6e69b350f 100644 --- a/deploy/cpp/src/trajectory.cc +++ b/deploy/cpp/src/trajectory.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/trajectory.cpp +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #include #include "include/trajectory.h" diff --git a/deploy/pptracking/include/lapjv.h b/deploy/pptracking/include/lapjv.h index b3fc28745..331defc42 100644 --- a/deploy/pptracking/include/lapjv.h +++ b/deploy/pptracking/include/lapjv.h @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/gatagat/lap/blob/master/lap/lapjv.h +// Ths copyright of gatagat/lap is as follows: +// MIT License #ifndef LAPJV_H #define LAPJV_H diff --git a/deploy/pptracking/include/tracker.h b/deploy/pptracking/include/tracker.h index 281898604..903c3b304 100644 --- a/deploy/pptracking/include/tracker.h +++ b/deploy/pptracking/include/tracker.h @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/jdetracker.h +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #pragma once #include diff --git a/deploy/pptracking/include/trajectory.h b/deploy/pptracking/include/trajectory.h index 1e89abc7d..d801e2800 100644 --- a/deploy/pptracking/include/trajectory.h +++ b/deploy/pptracking/include/trajectory.h @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/trajectory.h +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #pragma once #include diff --git a/deploy/pptracking/src/lapjv.cpp b/deploy/pptracking/src/lapjv.cpp index 417249e04..e8a7b58d5 100644 --- a/deploy/pptracking/src/lapjv.cpp +++ b/deploy/pptracking/src/lapjv.cpp @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/gatagat/lap/blob/master/lap/lapjv.cpp +// Ths copyright of gatagat/lap is as follows: +// MIT License + #include #include #include diff --git a/deploy/pptracking/src/tracker.cc b/deploy/pptracking/src/tracker.cc index 90232e995..b00e31c4e 100644 --- a/deploy/pptracking/src/tracker.cc +++ b/deploy/pptracking/src/tracker.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/jdetracker.cpp +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #include #include #include diff --git a/deploy/pptracking/src/trajectory.cc b/deploy/pptracking/src/trajectory.cc index a923e1af2..6e69b350f 100644 --- a/deploy/pptracking/src/trajectory.cc +++ b/deploy/pptracking/src/trajectory.cc @@ -12,6 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +// The code is based on: +// https://github.com/CnybTseng/JDE/blob/master/platforms/common/trajectory.cpp +// Ths copyright of CnybTseng/JDE is as follows: +// MIT License + #include #include "include/trajectory.h" diff --git a/ppdet/data/transform/gridmask_utils.py b/ppdet/data/transform/gridmask_utils.py index b0a27f015..c18701556 100644 --- a/ppdet/data/transform/gridmask_utils.py +++ b/ppdet/data/transform/gridmask_utils.py @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# The code is based on: +# https://github.com/dvlab-research/GridMask/blob/master/detection_grid/maskrcnn_benchmark/data/transforms/grid.py + from __future__ import absolute_import from __future__ import print_function from __future__ import division diff --git a/ppdet/modeling/post_process.py b/ppdet/modeling/post_process.py index dfc1dfdd4..86dbaf9c0 100644 --- a/ppdet/modeling/post_process.py +++ b/ppdet/modeling/post_process.py @@ -141,6 +141,13 @@ class BBoxPostProcess(nn.Layer): @register class MaskPostProcess(object): + """ + refer to: + https://github.com/facebookresearch/detectron2/layers/mask_ops.py + + Get Mask output according to the output from model + """ + def __init__(self, binary_thresh=0.5): super(MaskPostProcess, self).__init__() self.binary_thresh = binary_thresh diff --git a/ppdet/modeling/proposal_generator/anchor_generator.py b/ppdet/modeling/proposal_generator/anchor_generator.py index 869367601..34f03c0ef 100644 --- a/ppdet/modeling/proposal_generator/anchor_generator.py +++ b/ppdet/modeling/proposal_generator/anchor_generator.py @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# The code is based on +# https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/anchor_generator.py + import math import paddle diff --git a/ppdet/modeling/proposal_generator/target.py b/ppdet/modeling/proposal_generator/target.py index e7f3d90d2..af83cfdb8 100644 --- a/ppdet/modeling/proposal_generator/target.py +++ b/ppdet/modeling/proposal_generator/target.py @@ -279,9 +279,12 @@ def sample_bbox(matches, def polygons_to_mask(polygons, height, width): """ + Convert the polygons to mask format + Args: polygons (list[ndarray]): each array has shape (Nx2,) - height, width (int) + height (int): mask height + width (int): mask width Returns: ndarray: a bool mask of shape (height, width) """ diff --git a/ppdet/modeling/shape_spec.py b/ppdet/modeling/shape_spec.py index a4d4a2fea..81601fd64 100644 --- a/ppdet/modeling/shape_spec.py +++ b/ppdet/modeling/shape_spec.py @@ -12,22 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +# The code is based on: +# https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/shape_spec.py + from collections import namedtuple class ShapeSpec( namedtuple("_ShapeSpec", ["channels", "height", "width", "stride"])): - """ - A simple structure that contains basic shape specification about a tensor. - It is often used as the auxiliary inputs/outputs of models, - to complement the lack of shape inference ability among paddle modules. - Attributes: - channels: - height: - width: - stride: - """ - def __new__(cls, channels=None, height=None, width=None, stride=None): return super(ShapeSpec, cls).__new__(cls, channels, height, width, stride) diff --git a/static/ppdet/data/transform/gridmask_utils.py b/static/ppdet/data/transform/gridmask_utils.py index af1f8d56f..9bd671aec 100644 --- a/static/ppdet/data/transform/gridmask_utils.py +++ b/static/ppdet/data/transform/gridmask_utils.py @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# The code is based on: +# https://github.com/dvlab-research/GridMask/blob/master/detection_grid/maskrcnn_benchmark/data/transforms/grid.py + from __future__ import absolute_import from __future__ import print_function from __future__ import division diff --git a/static/ppdet/utils/post_process.py b/static/ppdet/utils/post_process.py index ad8f2f233..ff43986af 100644 --- a/static/ppdet/utils/post_process.py +++ b/static/ppdet/utils/post_process.py @@ -35,7 +35,12 @@ def box_flip(boxes, im_shape): def nms(dets, thresh): - """Apply classic DPM-style greedy NMS.""" + """ + refer to: + https://github.com/facebookresearch/Detectron/blob/main/detectron/utils/cython_nms.pyx + + Apply classic DPM-style greedy NMS. + """ if dets.shape[0] == 0: return dets[[], :] scores = dets[:, 0] @@ -91,6 +96,10 @@ def nms(dets, thresh): def soft_nms(dets, sigma, thres): + """ + refer to: + https://github.com/facebookresearch/Detectron/blob/main/detectron/utils/cython_nms.pyx + """ dets_final = [] while len(dets) > 0: maxpos = np.argmax(dets[:, 0]) -- GitLab