tostaylo / object-detection-to-speech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Detection API using Flask and Object Detection Libraries

Docker (preferred)

with Docker Compose

docker-compose up --build

or CLI commands

# Build
docker build -t object-detection .
# Run
docker run -e PORT=8080 -p 8080:8080 object-detection:latest

then visit http://localhost:8080/ in your browser:

Test

Good for testing models without restarting/relying on Flask server.

  1. Run Docker container using steps above
  2. In new command line window run
   docker container ls # (get running docker container name)
   docker exec [running docker container name] python3 tests/[test file name]

Run & Develop with Local Python Environment (alternative to Docker)

python3 -m venv venv
source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python3 webapp.py --port 8080

then visit http://localhost:8080/ in your browser:

Google Cloud Run

Live Web Application

gcloud services enable containerregistry.googleapis.com
docker pull <docker-id>/<image-name>
docker tag <docker-id>/<image-name> gcr.io/<project-id>/<image-name>
docker push gcr.io/<project-id>/<image-name>

Architecture

architecture

Google Colab

https://colab.research.google.com/drive/1dBh5onisO2XdNzwVmCosnYGTca_eFaVW?usp=sharing

Reference

About


Languages

Language:Jupyter Notebook 91.2%Language:Python 4.6%Language:JavaScript 1.6%Language:HTML 1.2%Language:CSS 1.2%Language:Dockerfile 0.3%