python - How to crop a batch of images at different places in tensorflow? -


i have batch of images in shape [batchsize,h,w,channel]. , batch of topleft points in shape [batchsize,2].

i need crop each image bounding box (let's in size of [10,10]), corresponding topleft point.

could 1 have idea how other loop around batch size?

things checked:

- tf.image.resize_image_with_crop_or_pad 

however image must in [h,w,channel]

- tf.slice 

however beginning position must int


Comments