Skip to content

Commit

Permalink
crop_wとcrop_hが違う値の時にTTAをやると出力がおかしくなるバグを修正 #43
Browse files Browse the repository at this point in the history
  • Loading branch information
lltcggie committed Sep 11, 2016
1 parent bb13740 commit c7b4a6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/waifu2x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,10 @@ Waifu2x::eWaifu2xError Waifu2x::ReconstructByNet(std::shared_ptr<cNet> net, cons
if (i >= 4)
cv::flip(in, in, 1); // 垂直軸反転

ret = ProcessNet(net, crop_w, crop_h, use_tta, batch_size, in);
const int cw = (rotateNum % 2 == 0) ? crop_w : crop_h;
const int ch = (rotateNum % 2 == 0) ? crop_h : crop_w;

ret = ProcessNet(net, cw, ch, use_tta, batch_size, in);
if (ret != Waifu2x::eWaifu2xError_OK)
return ret;

Expand Down

0 comments on commit c7b4a6d

Please sign in to comment.