MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / __call__

Method __call__

python/paddle_serving_app/reader/image_reader.py:1064–1074  ·  view source on GitHub ↗
(self, dt_boxes)

Source from the content-addressed store, hash-verified

1062 pass
1063
1064 def __call__(self, dt_boxes):
1065 num_boxes = dt_boxes.shape[0]
1066 sorted_boxes = sorted(dt_boxes, key=lambda x: (x[0][1], x[0][0]))
1067 _boxes = list(sorted_boxes)
1068 for i in range(num_boxes - 1):
1069 if abs(_boxes[i+1][0][1] - _boxes[i][0][1]) < 10 and \
1070 (_boxes[i + 1][0][0] < _boxes[i][0][0]):
1071 tmp = _boxes[i]
1072 _boxes[i] = _boxes[i + 1]
1073 _boxes[i + 1] = tmp
1074 return _boxes
1075
1076
1077class GetRotateCropImage(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected