minor fixes for windows ,for release v0.6
This commit is contained in:
+13
-10
@@ -17,6 +17,7 @@ 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(){
|
||||
@@ -274,6 +275,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(){
|
||||
@@ -413,9 +416,9 @@ cv::Mat CenterTrack::transform_preds_with_trans(float x1, float x2){
|
||||
}
|
||||
|
||||
void CenterTrack::tracking(const int bi) {
|
||||
float item_size[countDet];
|
||||
int item_cl[countDet];
|
||||
float dets[2*countDet];
|
||||
std::vector<float> item_size(countDet);
|
||||
std::vector<int> item_cl(countDet);
|
||||
std::vector<float> dets(2*countDet);
|
||||
for(int i=0; i<countDet; i++){
|
||||
item_size[i] = (detRes[i].bb1.at<float>(0,0) - detRes[i].bb0.at<float>(0,0)) *
|
||||
(detRes[i].bb1.at<float>(0,1) - detRes[i].bb0.at<float>(0,1));
|
||||
@@ -424,9 +427,9 @@ void CenterTrack::tracking(const int bi) {
|
||||
dets[i*2+1] = detRes[i].ct.at<float>(0,1);
|
||||
}
|
||||
|
||||
float track_size[countTr[bi]];
|
||||
int track_cl[countTr[bi]];
|
||||
float tracks[2*countTr[bi]];
|
||||
std::vector<float> track_size(countTr[bi]);
|
||||
std::vector<int> track_cl(countTr[bi]);
|
||||
std::vector<float> tracks(2*countTr[bi]);
|
||||
for(int i=0; i<countTr[bi]; i++){
|
||||
track_size[i] = (trRes[bi][i].det_res.bb1.at<float>(0,0) - trRes[bi][i].det_res.bb0.at<float>(0,0)) *
|
||||
(trRes[bi][i].det_res.bb1.at<float>(0,1) - trRes[bi][i].det_res.bb0.at<float>(0,1));
|
||||
@@ -434,7 +437,7 @@ void CenterTrack::tracking(const int bi) {
|
||||
tracks[i*2] = trRes[bi][i].det_res.ct.at<float>(0,0);
|
||||
tracks[i*2+1] = trRes[bi][i].det_res.ct.at<float>(0,1);
|
||||
}
|
||||
float dist[countTr[bi]*countDet];
|
||||
std::vector<float> dist(countTr[bi]*countDet);
|
||||
bool invalid;
|
||||
for(int i=0; i<countTr[bi]; i++){
|
||||
for(int j=0; j<countDet; j++){
|
||||
@@ -446,7 +449,7 @@ void CenterTrack::tracking(const int bi) {
|
||||
dist[j*countTr[bi]+i] = dist[j*countTr[bi]+i] + invalid * (1 << 18);
|
||||
}
|
||||
}
|
||||
int matched_indices[2*countTr[bi]];
|
||||
std::vector<int> matched_indices(2*countTr[bi]);
|
||||
float min_tr;
|
||||
int min_idtr = -1;
|
||||
for(int i=0; i<countTr[bi]; i++) {
|
||||
@@ -469,10 +472,10 @@ void CenterTrack::tracking(const int bi) {
|
||||
}
|
||||
}
|
||||
|
||||
bool unmatched_dets[countDet];
|
||||
std::vector<bool> unmatched_dets(countDet);
|
||||
for(int i=0; i<countDet; i++)
|
||||
unmatched_dets[i] = false;
|
||||
bool unmatched_tracks[countTr[bi]];
|
||||
std::vector<bool> unmatched_tracks(countTr[bi]);
|
||||
for(int i=0; i<countTr[bi]; i++)
|
||||
unmatched_tracks[i] = false;
|
||||
for(int i=0; i<countTr[bi]; i++) {
|
||||
|
||||
Reference in New Issue
Block a user