@@ -251,7 +251,7 @@ def run_net(net, imgi, batch_size=8, augment=False, tile_overlap=0.1, bsize=224,
251251 # pad image for net so Ly and Lx are divisible by 4
252252 imgb = transforms .resize_image (imgi [b ], rsz = rsz ) if rsz is not None else imgi [b ].copy ()
253253 imgb = np .pad (imgb .transpose (2 ,0 ,1 ), pads , mode = "constant" )
254- IMG , ysub , xsub , Ly , Lx = transforms .make_tiles (
254+ IMG , ysub , xsub , Lyt , Lxt = transforms .make_tiles (
255255 imgb , bsize = bsize , augment = augment ,
256256 tile_overlap = tile_overlap )
257257 IMGa [i * ntiles : (i + 1 ) * ntiles ] = np .reshape (IMG ,
@@ -268,7 +268,7 @@ def run_net(net, imgi, batch_size=8, augment=False, tile_overlap=0.1, bsize=224,
268268 y = np .reshape (y , (ny , nx , 3 , ly , lx ))
269269 y = transforms .unaugment_tiles (y )
270270 y = np .reshape (y , (- 1 , 3 , ly , lx ))
271- yfi = transforms .average_tiles (y , ysub , xsub , Ly , Lx )
271+ yfi = transforms .average_tiles (y , ysub , xsub , Lyt , Lxt )
272272 yf [b ] = yfi [:, :imgb .shape [- 2 ], :imgb .shape [- 1 ]]
273273 stylei = stylea [i * ntiles :(i + 1 ) * ntiles ].sum (axis = 0 )
274274 stylei /= (stylei ** 2 ).sum ()** 0.5
0 commit comments