Skip to content

Commit

Permalink
Merge pull request jolibrain#558 from fantes/ncnn_imgconn_fix
Browse files Browse the repository at this point in the history
apply mean only if it exists in parameters
  • Loading branch information
beniz authored Apr 5, 2019
2 parents 8e435a6 + f4f444e commit 0ecc5a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backends/ncnn/ncnninputconns.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ namespace dd
_width = bgr.cols;

_in = ncnn::Mat::from_pixels(bgr.data, ncnn::Mat::PIXEL_BGR, bgr.cols, bgr.rows);
_in.substract_mean_normalize(&_mean[0], 0);
if (_has_mean_scalar)
_in.substract_mean_normalize(&_mean[0], 0);
_ids.push_back(this->_uris.at(0));
}

Expand Down

0 comments on commit 0ecc5a8

Please sign in to comment.