Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

deephdc/DEEP-OC-dogs_breed_det

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


The Repository is ARCHIVED!


DEEP-OC-dogs_breed_det

DEEP-Hybrid-DataCloud logo

Build Status

This is a container that will simply run the DEEP as a Service API component DEEPaaS API V2,

with the application 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 (watch out for tags for CPU and GPU versions):

$ 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.

N.B. For either CPU-based or GPU-based images you can also use udocker.

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:

    $ git clone https://github.com/deephdc/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 with local images

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