All Projects → IBM → Max Object Detector

IBM / Max Object Detector

Licence: apache-2.0
Localize and identify multiple objects in a single image.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Max Object Detector

Docker Galaxy Stable
🐳📊📚 Docker Images tracking the stable Galaxy releases.
Stars: ✭ 179 (-13.94%)
Mutual labels:  docker-image
Docker Php Fpm
Devilbox's PHP-FPM Docker Images
Stars: ✭ 188 (-9.62%)
Mutual labels:  docker-image
Tenseal
A library for doing homomorphic encryption operations on tensors
Stars: ✭ 197 (-5.29%)
Mutual labels:  docker-image
Ansible Silo
Ansible in a self-contained environment via Docker.
Stars: ✭ 183 (-12.02%)
Mutual labels:  docker-image
Choochoo
Training Diary
Stars: ✭ 186 (-10.58%)
Mutual labels:  docker-image
Docker Ubuntu Vnc Desktop
A Docker image to provide web VNC interface to access Ubuntu LXDE/LxQT desktop environment.
Stars: ✭ 2,617 (+1158.17%)
Mutual labels:  docker-image
Activemq Artemis Docker
Dockerfile for the ActiveMQ Artemis Project
Stars: ✭ 172 (-17.31%)
Mutual labels:  docker-image
Werf
The CLI tool gluing Git, Docker, Helm, and Kubernetes with any CI system to implement CI/CD and Giterminism
Stars: ✭ 2,814 (+1252.88%)
Mutual labels:  docker-image
Rest980
REST interface to control your iRobot Roomba 980 via local server on your lan.
Stars: ✭ 186 (-10.58%)
Mutual labels:  docker-image
Bitnami Docker Nginx
Bitnami nginx Docker Image
Stars: ✭ 198 (-4.81%)
Mutual labels:  docker-image
Containerregistry
A set of Python libraries and tools for interacting with a Docker Registry.
Stars: ✭ 183 (-12.02%)
Mutual labels:  docker-image
Arch Rtorrentvpn
Docker build script for Arch Linux base with ruTorrent, rTorrent, autodl-irssi, Privoxy and OpenVPN
Stars: ✭ 185 (-11.06%)
Mutual labels:  docker-image
Hands On Devops
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7...
Stars: ✭ 196 (-5.77%)
Mutual labels:  docker-image
Lumen Microservice
Lumen on Docker - Skeleton project with Nginx, MySQL & PHP 7 | Aws ECS, Google Kubernates, Azure Container Engine
Stars: ✭ 183 (-12.02%)
Mutual labels:  docker-image
Graylog Docker
Official Graylog Docker image
Stars: ✭ 200 (-3.85%)
Mutual labels:  docker-image
Docker Openvpn
🔐 Out of the box stateless openvpn-server docker image which starts in less than 2 seconds
Stars: ✭ 174 (-16.35%)
Mutual labels:  docker-image
Bitnami Docker Moodle
Bitnami Docker Image for Moodle
Stars: ✭ 188 (-9.62%)
Mutual labels:  docker-image
My Bloody Jenkins
Self Configured Jenkins Docker image based on Jenkins-LTS
Stars: ✭ 205 (-1.44%)
Mutual labels:  docker-image
Traefik Library Image
Stars: ✭ 200 (-3.85%)
Mutual labels:  docker-image
Godev
Golang development tool that supports project bootstrap, live-reload (tests + application), and auto dependency retrieval based on Go Modules
Stars: ✭ 196 (-5.77%)
Mutual labels:  docker-image

Build Status Website Status

IBM Developer Model Asset Exchange: Object Detector

This repository contains code to instantiate and deploy an object detection model. 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 and Faster RCNN ResNet101 object detection model for TensorFlow. The model files are hosted on IBM Cloud Object Storage: ssd_mobilenet_v1.tar.gz and faster_rcnn_resnet101.tar.gz. The code in this repository deploys the model as a web service in a Docker container. This repository was developed as part of the IBM Developer Model Asset Exchange and the public API is powered by IBM Cloud.

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
This repository Apache 2.0 LICENSE
Model Weights Apache 2.0 TensorFlow Models Repo
Model Code (3rd party) Apache 2.0 TensorFlow Models Repo
Test Samples Various Samples README

Pre-requisites:

  • docker: The Docker command-line interface. Follow the installation instructions for your system.
  • The minimum recommended resources for this model is 2GB Memory and 2 CPUs.
  • If you are on x86-64/AMD64, your CPU must support AVX at the minimum.

Deployment options

Deploy from Quay

To run the docker image, which automatically starts the model serving API, run:

Intel CPUs:

$ docker run -it -p 5000:5000 quay.io/codait/max-object-detector

ARM CPUs (eg Raspberry Pi):

$ docker run -it -p 5000:5000 quay.io/codait/max-object-detector:arm-arm32v7-latest

This will pull a pre-built image from the Quay.io container registry (or use an existing image if already cached locally) and run it. If you'd rather checkout and build the model locally you can follow the run locally steps below.

Deploy on Red Hat OpenShift

You can deploy the model-serving microservice on Red Hat OpenShift by following the instructions for the OpenShift web console or the OpenShift Container Platform CLI in this tutorial, specifying quay.io/codait/max-object-detector as the image name.

Deploy on Kubernetes

You can also deploy the model on Kubernetes using the latest docker image on Quay.

On your Kubernetes cluster, run the following commands:

$ kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Object-Detector/master/max-object-detector.yaml

The model will be available internally at port 5000, but can also be accessed externally through the NodePort.

A more elaborate tutorial on how to deploy this MAX model to production on IBM Cloud can be found here.

Run Locally

  1. Build the Model
  2. Deploy the Model
  3. Use the Model
  4. Run the Notebook
  5. Development
  6. Cleanup

1. Build the Model

Clone this repository locally. In a terminal, run the following command:

$ git clone https://github.com/IBM/MAX-Object-Detector.git

Change directory into the repository base folder:

$ cd MAX-Object-Detector

To build the docker image locally for Intel CPUs, run:

$ docker build -t max-object-detector .

To select a model, pass in the --build-arg model=<desired-model> switch:

$ docker build --build-arg model=faster_rcnn_resnet101 -t max-object-detector .

Currently we support two models, ssd_mobilenet_v1 (default) and faster_rcnn_resnet101.

For ARM CPUs (eg Raspberry Pi), run:

$ docker build -f Dockerfile.arm32v7 -t max-object-detector .

All required model assets will be downloaded during the build process. Note that currently this docker image is CPU only (we will add support for GPU images later).

2. Deploy the Model

To run the docker image, which automatically starts the model serving API, run:

$ docker run -it -p 5000:5000 max-object-detector

3. Use the Model

The API server automatically generates an interactive Swagger documentation page. Go to http://localhost:5000 to load it. From there you can explore the API and also create test requests.

Use the model/predict endpoint to load a test image (you can use one of the test images from the samples folder) and get predicted labels for the image from the API. The coordinates of the bounding box are returned in the detection_box field, and contain the array of normalized coordinates (ranging from 0 to 1) in the form [ymin, xmin, ymax, xmax].

Swagger Doc Screenshot

You can also test it on the command line, for example:

$ curl -F "[email protected]/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
          ]
      }
  ]
}

You can also control the probability threshold for what objects are returned using the threshold argument like below:

$ curl -F "[email protected]/dog-human.jpg" -XPOST http://127.0.0.1:5000/model/predict?threshold=0.5

The optional threshold parameter is the minimum probability value for predicted labels returned by the model. The default value for threshold is 0.7.

4. Run the Notebook

The demo notebook walks through how to use the model to detect objects in an image and visualize the results. By default, the notebook uses the hosted demo instance, but you can use a locally running instance (see the comments in Cell 3 for details). Note the demo requires jupyter, matplotlib, Pillow, and requests.

Run the following command from the model repo base folder, in a new terminal window:

$ jupyter notebook

This will start the notebook server. You can launch the demo notebook by clicking on demo.ipynb.

5. Development

To run the Flask API app in debug mode, edit config.py to set DEBUG = True under the application settings. You will then need to rebuild the docker image (see step 1).

6. Cleanup

To stop the Docker container, type CTRL + C in your terminal.

Object Detector Web App

The latest release of the MAX Object Detector Web App is included in the Object Detector docker image.

When the model API server is running, the web app can be accessed at http://localhost:5000/app and provides interactive visualization of the bounding boxes and their related labels returned by the model.

Mini Web App Screenshot

If you wish to disable the web app, start the model serving API by running:

$ docker run -it -p 5000:5000 -e DISABLE_WEB_APP=true quay.io/codait/max-object-detector

Train this Model on Watson Machine Learning

This model supports training from scratch on a custom dataset. Please follow the steps listed under the training README to retrain the model on Watson Machine Learning, a deep learning as a service offering of IBM Cloud.

Resources and Contributions

If you are interested in contributing to the Model Asset Exchange project or have any queries, please follow the instructions here.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].