CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Testing the resNet models

Open rashee182 opened this issue 10 years ago • 2 comments

I am looking at the config files provided for resNet example here : https://github.com/Microsoft/CNTK/tree/master/Examples/Image/Miscellaneous/ImageNet/ResNet

I plan to use the pre trained models available for download at the above link. For that, it seems I just need to use the test command mentioned in one of the config files eg ResNet_152.cntk However, I can not find the file (val_map.txt) mentioned in the reader section of the test command module in the config file ResNet_152.cntk

reader=[ readerType="ImageReader" file="$DataDir$/val_map.txt" randomize="None" features=[ width=224 height=224 channels=3 cropType="Center" meanFile="$ConfigDir$/ImageNet1K_mean.xml" ] labels=[ labelDim=1000 ]

  1. Its not clear how we are providing the label info here. (Also the file val_map.txt is missing)
  2. How is the test input provided to ImageReader? Is there any corresponding test data available for use with cntk

rashee182 avatar May 25 '16 02:05 rashee182

@Alexey-Kamenev - I am referring to the Alexnet example here CNTK-master\ Tests\ EndToEndTests\ Image\AlexNet I see the train_map.txt and val_map.txt . Do you know from where I can get the corresponding image database? Also if I have an image databse already available how are the labels calculated for each image.

rashee182 avatar Jun 23 '16 19:06 rashee182

Hello, These files, train_map.txt and val_map.txt are very simple text files that contain mapping between image path and a 0-based label. For example, a line in such file can look like this:

/home/data/1.jpeg<tab>0

You can create your own mapping file using whatever method you like (e.g. a couple of lines of Python code). You can also use reader chaining feature to provide features (images) using ImageReader and labels using other type of reader (e.g. text reader). Please refer to CNTK wiki for more info. The data itself is a standard training and validation sets from ILSVRC 2012. You can find more details as well as download the data at ImageNet website

Alexey-Kamenev avatar Jun 24 '16 01:06 Alexey-Kamenev