tf.raw_ops.GenerateBoundingBoxProposals
Эта операция создаёт области интереса из заданных ограничивающих рамок (bbox_deltas), закодированных относительно якорей согласно уравнению 2 в arXiv:1506.01497
tf.raw_ops.GenerateBoundingBoxProposals(
scores,
bbox_deltas,
image_info,
anchors,
nms_threshold,
pre_nms_topn,
min_size,
post_nms_topn=300,
name=None
)
The op selects top `pre_nms_topn` scoring boxes, decodes them with respect to anchors, applies non-maximal suppression on overlapping boxes with higher than `nms_threshold` intersection-over-union (iou) value, discarding boxes where shorter side is less than `min_size`. Inputs: `scores`: A 4D tensor of shape [Batch, Height, Width, Num Anchors] containing the scores per anchor at given position `bbox_deltas`: is a tensor of shape [Batch, Height, Width, 4 x Num Anchors] boxes encoded to each anchor `anchors`: A 1D tensor of shape [4 x Num Anchors], representing the anchors. Outputs: `rois`: output RoIs, a 3D tensor of shape [Batch, post_nms_topn, 4], padded by 0 if less than post_nms_topn candidates found. `roi_probabilities`: probability scores of each roi in 'rois', a 2D tensor of shape [Batch,post_nms_topn], padded with 0 if needed, sorted by scores.
| Аргументы | |
|---|---|
scores | Tensor типа float32. Тензор float размерности 4 с формой [num_images, height, width, num_achors], содержащий оценки ограничивающих рамок для заданных якорей; рамки могут быть не отсортированы. |
bbox_deltas | Tensor типа float32. Тензор float размерности 4 с формой [num_images, height, width, 4 x num_anchors], кодирующий рамки относительно каждого якоря. Координаты задаются в виде [dy, dx, dh, dw]. |
image_info | Tensor типа float32. Тензор float размерности 2 с формой [num_images, 5], содержащий сведения об изображении: высоту, ширину и масштаб. |
anchors | Tensor типа float32. Тензор float размерности 2 с формой [num_anchors, 4], описывающий рамки якорей. Координаты рамок задаются в виде [y1, x1, y2, x2]. |
nms_threshold | Tensor типа float32. Скалярный тензор float, задающий порог подавления немаксимумов. |
pre_nms_topn | Tensor типа int32. Скалярный тензор int, задающий количество рамок с наивысшими оценками, используемых в качестве входных данных. |
min_size | Tensor типа float32. Скалярный тензор float. Все рамки, размер которых меньше min_size, будут отброшены. |
post_nms_topn | Необязательный int. По умолчанию — 300. Целое число. Максимальное количество областей интереса в выходных данных. |
name | Имя операции (необязательно). |
| Возвращаемые значения | |
|---|---|
Кортеж из объектов Tensor (rois, roi_probabilities). | |
rois | Tensor типа float32. |
roi_probabilities | Tensor типа float32. |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/raw_ops/GenerateBoundingBoxProposals