Skip to content

Commit 7d9c0f8

Browse files
committed
Remove image.crop
Indices in image.crop starts at zero.
1 parent abc4176 commit 7d9c0f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

RCNN.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ function RCNN:getCrop(im_idx,bbox,flip)
9999
------
100100

101101
--local patch = image.crop(I,bbox[1],bbox[2],bbox[3],bbox[4]);
102-
local patch = image.crop(I,bbox[1],bbox[2],bbox[3],bbox[4]):float();
102+
--local patch = image.crop(I,bbox[1],bbox[2],bbox[3],bbox[4]):float();
103+
local patch = I[{{},{bbox[2],bbox[4]},{bbox[1],bbox[3]}}]:float()
103104
local tmp = image.scale(patch,crop_width,crop_height,'bilinear');
104105

105106
if image_mean then

0 commit comments

Comments
 (0)