Sign inSign up

deephdc/deep-oc-dogs_breed_det

By deephdc

Updated about 6 years ago

Dogs breed detector based on deep learning, uses DEEPaaS API.

Image
3

500K+

deephdc/deep-oc-dogs_breed_det repository overview

logo

DEEP-OC-dogs_breed_det

Build Status

This is a container that will simply run the DEEP as a Service API component, with the test example to identify Dog's breed, "Dogs breed detector" (src: deephdc/dogs_breed_det).

Running the container

Directly from Docker Hub

To run the Docker container directly from Docker Hub and start using the API simply run the following command:

$ docker run -ti -p 5000:5000 deephdc/deep-oc-dogs_breed_det

This command will pull the Docker container from the Docker Hub deephdc organization.

Building the container

If you want to build the container directly in your machine (because you want to modify the Dockerfile for instance) follow the following instructions:

Building the container:

  1. Get the DEEP-OC-dogs_breed_det repository (this repo):

    $ git clone https://github.com/indigo-dc/DEEP-OC-dogs_breed_det
    
  2. Build the container:

    $ cd DEEP-OC-dogs_breed_det
    $ docker build -t deephdc/deep-oc-dogs_breed_det .
    

These two steps will download the repository from GitHub and will build the Docker container locally on your machine. You can inspect and modify the Dockerfile in order to check what is going on. For instance, you can pass the --debug=True flag to the deepaas-run command, in order to enable the debug mode.

Connect to the API

Once the container is up and running, browse to http://localhost:5000 to get the OpenAPI (Swagger) documentation page.

Expected data location

The deephdc/dogs_breed_det application expects data for training, validation, and test located in the following directories inside the container:

  • /srv/dogs_breed_det/data/dogImages/train
  • /srv/dogs_breed_det/data/dogImages/valid
  • /srv/dogs_breed_det/data/dogImages/test

Original dataset with dog images for training can be found at udacity-aind/dogImages.zip

Trained model is stored inside the container in /srv/dogs_breed_det/models

Running the container

In the following example we suppose that dog images are located in $HOME/dogImages directory at your host machine. Then to run the Docker container for training execute:

$ docker run -ti -p 5000:5000 -v $HOME/dogImages:/srv/dogs_breed_det/data/dogImages deephdc/deep-oc-dogs_breed_det deepaas-run --listen-ip=0.0.0.0

Once the model is trained, you can use it for classifying dog's breeds.

docker-compose

docker-compose.yml allows you to run the application with various configurations via docker-compose.

N.B! docker-compose.yml is of version '2.3', one needs docker 17.06.0+ and docker-compose ver.1.16.0+, see https://docs.docker.com/compose/install/

If you want to use Nvidia GPU (dogs-gpu), you need nvidia-docker and docker-compose ver1.19.0+ , see nvidia/FAQ

Tag summary

Content type

Image

Digest

Size

494.5 MB

Last updated

about 6 years ago

docker pull deephdc/deep-oc-dogs_breed_det