Object Detector

Get this modelTry the API Try the web app Try in a Node-RED flow Try in CodePen

Overview

This model recognizes the objects present in an image from the 80 different high-level classes of objects in the COCO Dataset. The model consists of a deep convolutional net base model for image feature extraction, together with additional convolutional layers specialized for the task of object detection, that was trained on the COCO data set. The input to the model is an image, and the output is a list of estimated class probabilities for the objects detected in the image. The model is based on the SSD Mobilenet V1 object detection model for TensorFlow.

Model Metadata

Domain Application Industry Framework Training Data Input Data Format
Vision Object Detection General TensorFlow COCO Dataset Image (RGB/HWC)

References

Licenses

Component License Link
Model GitHub Repository Apache 2.0 LICENSE
Model Weights Apache 2.0 TensorFlow Models Repo
Model Code (3rd party) Apache 2.0 TensorFlow Models Repo
Test Assets CC0 Samples README

Options available for deploying this model

This model can be deployed using the following mechanisms:

  • Deploy from Dockerhub:

    docker run -it -p 5000:5000 codait/max-object-detector
    
  • Deploy on Red Hat OpenShift:

    Follow the instructions for the OpenShift web console or the OpenShift Container Platform CLI in this tutorial and specify codait/max-object-detector as the image name.

  • Deploy on Kubernetes:

    kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Object-Detector/master/max-object-detector.yaml
    
  • Locally: follow the instructions in the model README on GitHub

Example Usage

You can test or use this model

Test the model using cURL

Once deployed, you can test the model from the command line. For example if running locally:

curl -F "image=@samples/dog-human.jpg" -XPOST http://127.0.0.1:5000/model/predict

You should see a JSON response like that below:

{
  "status": "ok",
  "predictions": [
      {
          "label_id": "1",
          "label": "person",
          "probability": 0.944034993648529,
          "detection_box": [
              0.1242099404335022,
              0.12507188320159912,
              0.8423267006874084,
              0.5974075794219971
          ]
      },
      {
          "label_id": "18",
          "label": "dog",
          "probability": 0.8645511865615845,
          "detection_box": [
              0.10447660088539124,
              0.17799153923988342,
              0.8422801494598389,
              0.732001781463623
          ]
      }
  ]
}

Test the model in a Node-RED flow

Complete the node-red-contrib-model-asset-exchange module setup instructions and import the object-detector getting started flow.

Test the model in CodePen

Learn how to send an image to the model and how to render the results in CodePen.

  • MAX Object Detector Web App: a demo application providing interactive visualization of the bounding boxes and their related labels returned by the model.

Options available for training this model

This model can be trained using the following mechanisms: