Skip to main content

DeepSeaAI is a Python package to simplify processing deep sea video in AWS from a command line.

Project description

MBARI semantic-release License Python

DeepSeaAI is a Python package to simplify processing deep sea video in AWS from a command line.

It includes reasonable defaults that have been optimized for deep sea video. The goal is to simplify running these algorithms in AWS.

DeepSea-AI currently supports:

  • Training YOLOv5 object detection models with up to 8 GPUs using the best available instances in AWS
  • Processing video with YOLOv5 detection and tracking pipeline using
  • Scaling processing with AWS Elastic Container Service [click image below to see larger example]  Image link

The cost to process a video is typically less than $1.25 per 1-hour video using a model designed for a 640 pixel size.

The cost to train a YOLOv5 model depends on your data size and the number of GPUs you use.A large collection with 30K images and 300K localizations may cost $300-$600 to process, depending on the instance you choose to train on. This is reasonably small for a research project, and small in comparison to purchasing your own GPU hardware.

See the full documentation at MBARI deepsea-ai.

Processing

The processing technology uses the AWS Elastic Container Service with an architecture that includes a SQS messaging queue to start the processing. Simply upload a video to an S3 bucket then submit a job with the location of that video to the queue to start processing. The result is returned to a S3 bucket and the video is optionally removed to reduce storage cost.

Getting Started

Install

There are two main requirements to use this:

  1. An account with AWS Amazon Web Services.
  2. An account with Docker.
  3. Install and update using pip in a Python>=3.8.0 environment:

After you have setup your AWS account, configure it using the awscli tool

pip install awscli
aws configure
aws --version

Then install the module

pip install -U deepsea-ai

Setting up the AWS environment is done with the setup mirror command. This only needs to be done once, or when you upgrade the module. This command will setup the appropriate AWS permissions and mirror the images used in the commands from Docker Hub to your ECR Elastic Container Registry.

Be patient - this takes a while, but only needs to be run once.

deepsea-ai setup --mirror

Tutorials

  • FathomNet ✨ Recommended first step to learn more about how to train a YOLOv5 object detection model using freely available FathomNet data

Create the Anaconda environment

The fastest way to get started is to use the Anaconda environment. This will create a conda environment called deepsea-ai and make that available in your local jupyter notebook as the kernel named deepsea-ai

conda env create 
conda activate deepsea-ai
pip install ipykernel
python -m ipykernel install --user --name=deepsea-ai

Launch jupyter

cd docs/notebooks
jupyter notebook

Commands

Setting up an Elastic Container Service (ECS) cluster

To process videos in bulk, you can setup an ECS cluster to process videos in parallel. See the ECS setup documentation for more details.


Source code is available at github.com/mbari-org/deepsea-ai.

For more details, see the official documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepsea_ai-1.25.0.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

deepsea_ai-1.25.0-py3-none-any.whl (81.0 kB view details)

Uploaded Python 3

File details

Details for the file deepsea_ai-1.25.0.tar.gz.

File metadata

  • Download URL: deepsea_ai-1.25.0.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.14 Linux/6.5.0-1018-azure

File hashes

Hashes for deepsea_ai-1.25.0.tar.gz
Algorithm Hash digest
SHA256 d4d039bbad5a0b71996060a3d5887e340ccb21054cd87e452ef77e25c45fc9d1
MD5 f55c6de621e69e838045ee251d3a567d
BLAKE2b-256 7774f9a2b8f7ccfeb3cef21875e294f7844fc9856eedea86f8c14c4fce0fa055

See more details on using hashes here.

File details

Details for the file deepsea_ai-1.25.0-py3-none-any.whl.

File metadata

  • Download URL: deepsea_ai-1.25.0-py3-none-any.whl
  • Upload date:
  • Size: 81.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.14 Linux/6.5.0-1018-azure

File hashes

Hashes for deepsea_ai-1.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95da8bb61d5eb0f3f0497a051372200c077d56552366e984fba9cbd53e2f91ef
MD5 9c0b648da30caac542a3986c1a425f68
BLAKE2b-256 4fbf6df45923fab33e0f25ed00420435578d09149563e8f59c9df0e7e714e5f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page