Skip to content

About

deepsea-yolov5 runs the YOLOv5 model in the cloud in AWS Sagemaker. This runs on 1-8 GPUS.

Based on the repository https://github.com/ultralytics/yolov5.

Powered by AWS Cloud Computing

Data

Assuming your data is organized as:

│   └── data
│       └── images/*.png,jpg,etc.
│       └── labels/*.txt
│   

You need to split it first into minimally training and validation sets and compress it. The deepsea-ai utility has a split function to help with this, e.g.

pip install deepsea-ai
deepsea-ai split -i data -o splitdata

Data will now be split and compressed, e.g.

│   └── splitdata
│       └── images.tar.gz
│       └── labels.tar.gz

Class name file example

A simple text files with the names of your class labels is needed for mapping the indexes in the

Example names.txt:

fish
urchin
rock

Running the cloud

Setup

Install AWS Command Line Interface (cli) if not already done and confirm setup:

aws --version
aws s3 ls 

Train

Train a yolov5x model on a ml.p3.xlarge instance type:

deepsea-ai train --model yolov5x --instance-type ml.p3.xlarge \
--labels $PWD/splitdata/labels.tar.gz \
--images $PWD/splitdata/images.tar.gz \
--label-map yolo.names \
--input-s3 s3://benthic-dive-training \
--output-s3 s3://benthic-dive-checkpoints

License