Skip to content

Sagemaker training

Train in AWS SageMaker with deepsea-ai 🚀

YOLOV5 can be trained with the deepsea-ai package. Keep in mind that you'll need an AWS account to use deepsea-ai.

Before you start training, make sure you've prepared your data correctly.

If you've scaled your training to 1280x1280, I recommend using yolov5x6:

!!! note "info" Make sure your --batch-size is a multiple of the available GPUs. For example, use --batch-size 4 for ml.p3.8xlarge, or --batch-size 16 for ml.p3.16xlarge.

shell deepsea-ai train --model yolov5x6 --instance-type ml.p3.16xlarge \ --config 901902_uavs.ini \ --labels $PWD/BaselineSplit/labels.tar.gz \ --images $PWD/BaselineSplit/images.tar.gz \ --label-map $PWD/Baseline/labels.txt \ --input-s3 s3://901902-new-starting-checkpoint/megafish_ROV_weights.pt \ --output-s3 s3://901902-new-model-checkpoints/ \ --resume True \ --epochs 60 \ --batch-size 16

!!! note "info" Before you hit run, check that there isn't already a yolov5x6 folder in your output-s3 bucket. The training job will overwrite anything there, so move any old runs to a different folder first.

!!! note "info" Also, double-check that there isn't a training folder in your input-s3 bucket, as the job uses that for images, labels, and text files.

🗓️ Updated: 2026-08-10