Search code examples
machine-learningcntk

Consuming CNTK Model


I'm new to ML and have been playing around with the CNTK tutorials. I've trained a couple of models successfully.

I completed the Transfer Learning tutorial (https://github.com/Microsoft/CNTK/blob/v2.1/Tutorials/CNTK_301_Image_Recognition_with_Deep_Transfer_Learning.ipynb) and created a flower recognition model.

When I import this model into the CNTKAzureTutorial01 API tutorial (https://github.com/Microsoft/CNTK/tree/master/Examples/Evaluation/CNTKAzureTutorial01/CNTKAzureTutorial01) it successfully outputs a dense output.

The dense output is made up of and array of 102 decimal numbers which I assume it relates to the weighting of my 102 flower categories? I cant workout where I can map these values in the array to the flower categories. E.g Array[1] = Roses, Array[2] = Tulips.

I've been on data owners site and while it lists categories (http://www.robots.ox.ac.uk/~vgg/data/flowers/102/categories.html) I can't see how these categories map to my model output. Thought might be alphabetical but that stops half way down... There are 2 .mat files which ive outputted in python which don't explain anything either.

Any pointers?


Solution

  • You need to do some detective work on the internet to find this. Here's the list of names that correspond to the classes:

    ['pink primrose', 'hard-leaved pocket orchid', 'canterbury bells', 'sweet pea', 'english marigold', 'tiger lily', 'moon orchid', 'bird of paradise', 'monkshood', 'globe thistle', 'snapdragon', "colt's foot", 'king protea', 'spear thistle', 'yellow iris', 'globe-flower', 'purple coneflower', 'peruvian lily', 'balloon flower', 'giant white arum lily', 'fire lily', 'pincushion flower', 'fritillary', 'red ginger', 'grape hyacinth', 'corn poppy', 'prince of wales feathers', 'stemless gentian', 'artichoke', 'sweet william', 'carnation', 'garden phlox', 'love in the mist', 'mexican aster', 'alpine sea holly', 'ruby-lipped cattleya', 'cape flower', 'great masterwort', 'siam tulip', 'lenten rose', 'barbeton daisy', 'daffodil', 'sword lily', 'poinsettia', 'bolero deep blue', 'wallflower', 'marigold', 'buttercup', 'oxeye daisy', 'common dandelion', 'petunia', 'wild pansy', 'primula', 'sunflower', 'pelargonium', 'bishop of llandaff', 'gaura', 'geranium', 'orange dahlia', 'pink-yellow dahlia?', 'cautleya spicata', 'japanese anemone', 'black-eyed susan', 'silverbush', 'californian poppy', 'osteospermum', 'spring crocus', 'bearded iris', 'windflower', 'tree poppy', 'gazania', 'azalea', 'water lily', 'rose', 'thorn apple', 'morning glory', 'passion flower', 'lotus', 'toad lily', 'anthurium', 'frangipani', 'clematis', 'hibiscus', 'columbine', 'desert-rose', 'tree mallow', 'magnolia', 'cyclamen ', 'watercress', 'canna lily', 'hippeastrum ', 'bee balm', 'ball moss', 'foxglove', 'bougainvillea', 'camellia', 'mallow', 'mexican petunia', 'bromelia', 'blanket flower', 'trumpet creeper', 'blackberry lily']

    courtesy of this page