Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (39 sloc) 1.78 KB

Object Recognition

This MLHub package, based on a deep learning kubernetes tutorial by Yan Zhang, Mathew Salvaris, and Fidan Boylu Uz of Microsoft, demonstrates the pre-built ResNet152 model using TensorFlow and available from tfhub to identify the main object of a photo. Sample images are provided within the package and the demonstration applies the pre-built model to each image. This pre-built model has been trained to recognise 1000 different kinds of classes/objects. These include goldfish, great white shark, tiger shark, sports car, etc.

Visit the github repository for the examples and code: https://Github.com/mlhubber/objects

Usage

  • To install mlhub

      $ pip3 install mlhub
    
  • To install and run the pre-built model:

      $ ml install   objects
      $ ml readme    objects
      $ ml configure objects
      $ ml demo      objects
      $ ml identify  objects
    

Examples

  • To identify the object in an image from a local file:

      $ ml identify objects ~/.mlhub/objects/images/lynx.jpg
    
  • To identify the object in images in a folder:

      $ ml identify objects ~/.mlhub/objects/images/
    
  • To identify the object in an image from the web (e.g. https://en.wikipedia.org/wiki/Aciagrion_occidentale) :

      $ ml identify objects https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Aciagrion_occidentale-Kadavoor-2017-05-08-002.jpg/440px-Aciagrion_occidentale-Kadavoor-2017-05-08-002.jpg
    
  • To interactively provide images without repeatedly reloading the model:

      $ ml identify objects
    
You can’t perform that action at this time.