mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-27 02:20:31 +08:00
[Functions] Add quantile function (#700)
* Add sort function * Add isfinite function * upgrade isinf isnan * Add Scalar to FDTensor * Add floor, ceil function * add cast functions * Update out_tmp * Update quantile * add gather scatter along axis * finish quantile function * Add quantile unittest * refresh code style for test source code * Add comments * Add full function * Add scalar to fd tensor * Add full unittest * Add functions headers * move fdtensor operators to fastdeploy namespace
This commit is contained in:
@@ -37,13 +37,13 @@ void SortBoxes(std::vector<std::array<int, 8>>* boxes) {
|
||||
}
|
||||
|
||||
for (int i = 0; i < boxes->size() - 1; i++) {
|
||||
if (abs((*boxes)[i + 1][1] - (*boxes)[i][1]) < 10 &&
|
||||
if (std::abs((*boxes)[i + 1][1] - (*boxes)[i][1]) < 10 &&
|
||||
((*boxes)[i + 1][0] < (*boxes)[i][0])) {
|
||||
std::swap((*boxes)[i], (*boxes)[i + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namesoace ocr
|
||||
} // namespace ocr
|
||||
} // namespace vision
|
||||
} // namespace fastdeploy
|
||||
|
||||
Reference in New Issue
Block a user