Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request NVIDIA#216 from lukeyeager/nvidia/detectnet-resize…
Browse files Browse the repository at this point in the history
…-method

[DetectNetTransformation] Use bicubic interpolation
  • Loading branch information
lukeyeager authored Aug 30, 2016
2 parents de43181 + a53707b commit 06651e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/caffe/layers/detectnet_transform_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void DetectNetTransformationLayer<Dtype>::retrieveMeanImage(Size dimensions) {

// resize, if dimensions were defined:
if (dimensions.area() > 0) {
resize(data_mean_, data_mean_, dimensions, cv::INTER_CUBIC);
cv::resize(data_mean_, data_mean_, dimensions, 0, 0, cv::INTER_CUBIC);
}
// scale from 0..255 to 0..1:
data_mean_ /= Dtype(UINT8_MAX);
Expand Down Expand Up @@ -438,9 +438,7 @@ void DetectNetTransformationLayer<Dtype>::transform_scale(
if (size.height != img.rows || size.width != img.cols) {
Dtype scale_x = (Dtype)size.width / img.cols;
Dtype scale_y = (Dtype)size.height / img.rows;

resize(img, *img_temp, size, cv::INTER_CUBIC);

cv::resize(img, *img_temp, size, 0, 0, cv::INTER_CUBIC);
vector<BboxLabel > bboxList_aug;
foreach_(BboxLabel label, bboxList) { // for every bbox:
// resize by scale
Expand Down

0 comments on commit 06651e8

Please # to comment.