mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
Fix bug in ppyoloe (#47)
This commit is contained in:
@@ -130,8 +130,8 @@ bool PPYOLOE::Preprocess(Mat* mat, std::vector<FDTensor>* outputs) {
|
||||
|
||||
(*outputs)[1].Allocate({1, 2}, FDDataType::FP32, InputInfoOfRuntime(1).name);
|
||||
float* ptr = static_cast<float*>((*outputs)[1].MutableData());
|
||||
ptr[0] = mat->Height() * 1.0 / mat->Height();
|
||||
ptr[1] = mat->Width() * 1.0 / mat->Width();
|
||||
ptr[0] = mat->Height() * 1.0 / origin_h;
|
||||
ptr[1] = mat->Width() * 1.0 / origin_w;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
2
setup.py
2
setup.py
@@ -52,6 +52,8 @@ setup_configs["WITH_GPU"] = os.getenv("WITH_GPU", "OFF")
|
||||
setup_configs["TRT_DIRECTORY"] = os.getenv("TRT_DIRECTORY", "UNDEFINED")
|
||||
setup_configs["CUDA_DIRECTORY"] = os.getenv("CUDA_DIRECTORY",
|
||||
"/usr/local/cuda")
|
||||
if os.getenv("CMAKE_CXX_COMPILER", None) is not None:
|
||||
setup_configs["CMAKE_CXX_COMPILER"] = os.getenv("CMAKE_CXX_COMPILER")
|
||||
|
||||
TOP_DIR = os.path.realpath(os.path.dirname(__file__))
|
||||
SRC_DIR = os.path.join(TOP_DIR, "fastdeploy")
|
||||
|
||||
Reference in New Issue
Block a user