Package: deepsea-ai
DeepSeaAIis a Python package to simplify processing deep sea video inAWSfrom 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:TrainingYOLOv5object detectionmodels with up to 8 GPUs using the best available instances in AWSProcessing video withYOLOv5detection and tracking pipeline usingStrongSorttrackingScaling processing withAWS Elastic Container Service[click image below to see larger example]The cost to process a video is typically less than$1.25per 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-$600to 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 atMBARI deepsea-ai.ProcessingThe processing technology uses theAWS Elastic Container Servicewith 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 StartedInstallThere are two main requirements to use this:An account with AWS Amazon Web Services.An account with Docker.Install and update usingpipin a Python>=3.8.0 environment:After you have setup your AWS account, configure it using the awscli toolpip install awscli
aws configure
aws --versionThen install the modulepipinstall-Udeepsea-aiSetting 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
fromDocker Hubto your ECR Elastic Container Registry.Be patient - this takes a while, but only needs to be run once.deepsea-aisetup--mirrorTutorialsFathomNet✨ Recommended first step to learn more about how to train a YOLOv5 object detection model using freely available FathomNet dataCreate the Anaconda environmentThe fastest way to get started is to use the Anaconda environment.  This will create a conda environment calleddeepsea-aiand make that available in your local jupyter notebook as the kernel nameddeepsea-aicondaenvcreatecondaactivatedeepsea-ai
pipinstallipykernel
python-mipykernelinstall--user--name=deepsea-aiLaunch jupytercd docs/notebooks
jupyter notebookCommandsdeepsea-ai setup --help- Setup the AWS environment. Must run this once before any other commands.deepsea-ai train --help- Train a YOLOv5 model and save the model to a bucketdeepsea-ai process --help- Process one or more videos and save the results to  a bucketdeepsea-ai ecsprocess --help- Process one or more videos using the Elastic Container Service and save the results to a bucketdeepsea-ai split --help- Split your training data. This is required before the train command.deepsea-ai monitor --help- Monitor processing. Use this after the ecsprocess train command.deepsea-ai -h- Print help message and exit.Setting up an Elastic Container Service (ECS) clusterTo process videos in bulk, you can setup an ECS cluster to process videos in parallel.
See theECS setup documentationfor more details.Source code is available atgithub.com/mbari-org/deepsea-ai.For more details, see theofficial documentation.