Skip to content

Commit b3c4a6b

Browse files
SowmyaDhanapalvera121
authored andcommitted
Fix type issue for SSD inference detection file(.json) dump (#4)
1 parent 135cf80 commit b3c4a6b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/caffe/layers/detection_output_layer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ void DetectionOutputLayer<Dtype>::Forward_cpu(
393393
}
394394
string image_name = pt.get<string>("image_id");
395395
float score = pt.get<float>("score");
396-
vector<int> bbox;
396+
vector<float> bbox;
397397
BOOST_FOREACH(ptree::value_type &elem, pt.get_child("bbox")) {
398-
bbox.push_back(static_cast<int>(elem.second.get_value<float>()));
398+
bbox.push_back(static_cast<float>(elem.second.get_value<float>()));
399399
}
400400
*(outfiles[label_name]) << image_name;
401401
*(outfiles[label_name]) << " " << score;

src/caffe/layers/detection_output_layer.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ void DetectionOutputLayer<Dtype>::Forward_gpu(
225225
}
226226
string image_name = pt.get<string>("image_id");
227227
float score = pt.get<float>("score");
228-
vector<int> bbox;
228+
vector<float> bbox;
229229
BOOST_FOREACH(ptree::value_type &elem, pt.get_child("bbox")) {
230-
bbox.push_back(static_cast<int>(elem.second.get_value<float>()));
230+
bbox.push_back(static_cast<float>(elem.second.get_value<float>()));
231231
}
232232
*(outfiles[label_name]) << image_name;
233233
*(outfiles[label_name]) << " " << score;

0 commit comments

Comments
 (0)