CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Image Reader - sliding window

Open Arminea opened this issue 10 years ago • 6 comments

Hi, I have a trained model. Now I would like to test it on a dataset of different-sized images. I have a binary classification. I'm trying to find boobs in images :D For academic purposes, of course. My problem is that the target part could be very small in big images. If I use a transformation that makes, for example, 3000x3000 image to 224x224, the boobs will be gone. Can ImageReader do some sort of 'sliding window'?

Tereza

Arminea avatar Oct 14 '16 18:10 Arminea

IMO Object detection is not very handy in CTNK (please prove me wrong :P) You can check how they implement FastRCNN

jotarun avatar Oct 17 '16 09:10 jotarun

I think the best approach here would be to use the C++/C# evaluation interface and write the sliding window scheme yourself. It shouldn't be to difficult to crop out sub parts of an image using a standard image processing toolkit such as OpenCV or ITK. Having that said, I think sliding a 224x224 window over a 3000x3000 image will be painfully slow no matter how you do it.

e-thereal avatar Oct 18 '16 14:10 e-thereal

hello I have a similar question. ¿ It's possible to apply the convolutional layers and pooling layers to an image with different scale than the scale of the training images?. if not ¿ what files i have to consult to see the concolution and pooling code?

rodrigoalor avatar Oct 24 '16 05:10 rodrigoalor

As @jotarun mentioned you should look at the FastRCNN example. Sliding window is not efficient, as you will be computing the convolutions repeatedly. Instead, you could use the FastRCNN's evaluation code, send in a large number of ROIs (you specify yourself). Fast R-CNN will share the bottom convolution computations.

cha-zhang avatar Oct 26 '16 03:10 cha-zhang

These are the links to the Fast R-CNN example and the Tutorial on Object Detection using Fast R-CNN.

pkranen avatar Oct 26 '16 08:10 pkranen

Closing.

n17s avatar Nov 03 '16 05:11 n17s