Fix warnings, upgrade to C++14
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
+9
-1
@@ -17,6 +17,8 @@ bool CenterTrack::init(const std::string& tensor_path, const int n_classes, cons
|
||||
init_pre_inf();
|
||||
init_postprocessing();
|
||||
init_visualization(n_classes);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CenterTrack::init_preprocessing(){
|
||||
@@ -59,6 +61,8 @@ bool CenterTrack::init_preprocessing(){
|
||||
checkCuda( cudaMalloc(&input_d, sizeof(dnnType)*netRT->input_dim.tot() * nBatches));
|
||||
checkCuda( cudaMalloc(&input_pre_inf_d, sizeof(dnnType)*dim.tot()));
|
||||
checkCuda( cudaMalloc(&d_ptrs, dim.tot() * sizeof(float)) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CenterTrack::init_pre_inf(){
|
||||
@@ -202,6 +206,8 @@ bool CenterTrack::init_postprocessing(){
|
||||
trRes.resize(nBatches);
|
||||
countTr.resize(nBatches, 0);
|
||||
trackId.resize(nBatches, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CenterTrack::init_visualization(const int n_classes){
|
||||
@@ -274,6 +280,8 @@ bool CenterTrack::init_visualization(const int n_classes){
|
||||
faceId.push_back({3,0,4,7});
|
||||
faceId.push_back({2,3,7,6});
|
||||
// ([[0,1,5,4], [1,2,6, 5], [2,3,7,6], [3,0,4,7]]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CenterTrack::_get_additional_inputs(){
|
||||
@@ -308,7 +316,7 @@ void CenterTrack::preprocess(cv::Mat &frame, const int bi){
|
||||
}
|
||||
|
||||
float c[] = {new_width / 2.0f, new_height /2.0f};
|
||||
float s[] = {dim.w, dim.h};
|
||||
float s[] = {float(dim.w), float(dim.h)};
|
||||
// float s = new_width >= new_height ? new_width : new_height;
|
||||
// ----------- get_affine_transform
|
||||
// rot_rad = pi * 0 / 100 --> 0
|
||||
|
||||
@@ -119,6 +119,7 @@ bool CenternetDetection::init(const std::string& tensor_path, const int n_classe
|
||||
dst2.at<float>(2,0)=dst2.at<float>(1,0) + (-dst2.at<float>(0,1)+dst2.at<float>(1,1) );
|
||||
dst2.at<float>(2,1)=dst2.at<float>(1,1) + (dst2.at<float>(0,0)-dst2.at<float>(1,0) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -167,6 +167,8 @@ bool CenternetDetection3D::init(const std::string& tensor_path, const int n_clas
|
||||
faceId.push_back({2,3,7,6});
|
||||
faceId.push_back({3,0,4,7});
|
||||
// ([[0,1,5,4], [1,2,6, 5], [2,3,7,6], [3,0,4,7]]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CenternetDetection3D::preprocess(cv::Mat &frame, const int bi){
|
||||
|
||||
@@ -198,7 +198,7 @@ bool MobilenetDetection::init(const std::string& tensor_path, const int n_classe
|
||||
"bottle" , "wine glass" , "cup" , "fork" , "knife" , "spoon" , "bowl" , "banana" ,
|
||||
"apple" , "sandwich" , "orange" , "broccoli" , "carrot" , "hot dog" , "pizza" ,
|
||||
"donut" , "cake" , "chair" , "sofa" , "pottedplant" , "bed" , "diningtable" ,
|
||||
"toilet" , "tvmonitor" , "laptop" , "mouse" , "remote" , "keyboard" ,
|
||||
"toilet" , "tvmonitor" , "laptop" , "mouse" , "remote" , "keyboard" ,
|
||||
"cell phone" , "microwave" , "oven" , "toaster" , "sink" , "refrigerator" ,
|
||||
"book" , "clock" , "vase" , "scissors" , "teddy bear" , "hair drier" , "toothbrush"};
|
||||
classesNames = std::vector<std::string>(classes_names_, std::end(classes_names_));
|
||||
@@ -207,7 +207,7 @@ bool MobilenetDetection::init(const std::string& tensor_path, const int n_classe
|
||||
else{
|
||||
FatalError("Number of classes not supported for mobilenet");
|
||||
}
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void MobilenetDetection::preprocess(cv::Mat &frame, const int bi){
|
||||
|
||||
Reference in New Issue
Block a user