Giter Site home page Giter Site logo

amazon-sagemaker-multiple-object-tracking's Introduction

Train and Deploy Multiple Object Tracking Model with Amazon SageMaker

Multiple Object Tracking or MOT estimates a bounding box and ID for each pre-defined object in videos or consecutive frames, which has been used in tasks such as live sports, manufacturing, surveillance, and traffic monitoring. In the past, the high latency caused by the limitation of hardware and complexity of ML-based tracking algorithm is a major obstacle for its application in the industry. The state-of art algorithm FairMOT has reached the speed of about 30FPS on the MOT challenge datasets, which helps MOT find its way in many industrial scenarios.

This post shows how to train and deploy the state-of-art MOT algorithm FairMOT model with Amazon SageMaker.

Prerequisites

Running Costs

  • one SageMaker notebook on ml.t3.medium in us-east-1 region: $0.05 per hour, (250 hours free Tier usage per month for the first 2 months)
  • one training job on ml.p3.16xlarge in us-east-1 region takes 3 hours, total training cost for each training job:$85
  • one endpoint on ml.p3.2xlarge in us-east-1 region: $3.825 per hour
  • one SageMaker processing job on ml.p3.2xlarge in us-east-1 region: $3.825 per hour
  • Assuming you run one training job with the default parameters, test the real time inference and batch inference with the default test data, and delete inference endpoint once finishing test, totally it costs less than $95.

Training

To tune hyperparameters with Amazon SageMaker Hyperparameter Jobs, we modified the original training script to validate the model during training and set the validation loss as the objective metric. Currently our project only supports model training on a single instance.

Open fairmot-training.ipynb and run the cells step by step. It will take 3 hours to complete one training job. When performing hyperparameter tuning job, total run time will be about: Maximum total number of training jobs x Time on one training job / Maximum number of parallel training jobs.

Serving

We provide two ways of deploying the trained model: real time inference with endpoint and batch inference.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

amazon-sagemaker-multiple-object-tracking's People

Contributors

amazon-auto avatar guanghui0607 avatar mullue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amazon-sagemaker-multiple-object-tracking's Issues

Instance count > 1

Hi, is there any way that this supports endpoints scaling out beyond an instance count of 1? If there’s more than 1, how can you ensure that the frame goes to the same instance that processed your previous frames?

Sagemaker Neo compatible

Hello! I'd like to use this model for panorama service.
Can we get compiled model using sagemaker neo ?

IMAGE_NAME in set_env.sh should be changed from fairmot-sagemaker to sagemaker-fairmot

Hi,

There is an error in running fairmot-training.ipynb
Because AmazonSageMakerServiceCatalogProductsUseRole can create ECR repository under the resource condition that "arn:aws:ecr:::repository/sagemaker-*"
So, environment value IMAGE_NAME in container-dp/build_tools/set_env.sh should follow the condition.

However, the value IMAGE_NAME is fairmot-sagemaker and it makes error.

Therefore, IMAGE_NAME in set_env.sh should be changed from fairmot-sagemaker to sagemaker-fairmot
Also, training_image name should be changed as follows
training_image = f"{account}.dkr.ecr.{region}.amazonaws.com/sagemaker-fairmot:pytorch1.8-{version_name}"

It solves the problem.
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.