Giter Site home page Giter Site logo

lukaszkuczynski / amazon-sagemaker-tensorflow-object-detection-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-sagemaker-tensorflow-object-detection-api

0.0 1.0 0.0 8.37 MB

Train and deploy models using TensorFlow 2 with the Object Detection API on Amazon SageMaker

License: MIT No Attribution

Dockerfile 0.01% Shell 0.03% Python 0.67% Jupyter Notebook 99.28%

amazon-sagemaker-tensorflow-object-detection-api's Introduction

TensorFlow 2 Object Detection API SageMaker

Overview

In this repository, we use Amazon SageMaker to build, train, and deploy an EfficientDet model using the TensorFlow Object Detection API. It is built on top of TensorFlow 2 that makes it easy to construct, train and deploy object detection models. It also provides the TensorFlow 2 Detection Model Zoo which is a collection of pre-trained detection models we can use to accelerate our endeavour.

This implementation shows how to do the following:

  • Generate the dataset TFRecords and label map using SageMaker Processing
  • Fine-tune an EfficientDet model with TF2 on Amazon SageMaker
  • Monitor your model training with Tensorboard and SageMaker Debugger
  • Deploy your model on a SageMaker Endpoint and visualize predictions

Get started

Clone this repository into your Amazon SageMaker notebook instance:

git clone https://github.com/aws-samples/amazon-sagemaker-tensorflow-object-detection-api.git

Instructions

You will use an example dataset from the inaturalist.org and train a Tensorflow Object Detection model to recognise bees from RGB images. This dataset contains 500 images of bees that have been uploaded by inaturalist users for the purposes of recording the observation and identification. We only used images that their users have licensed under CC0 license.

Follow the step-by-step guide by executing the notebooks in the following folders:

  • 1_prepare_data/prepare_data.ipynb
  • 2_train_model/train_model.ipynb
  • 3_predict/deploy_endpoint.ipynb

Monitor model training jobs with Tensorboard

SageMaker debugger allows you to capture TensorBoard data into a chosen S3 location and monitor the training progress in real-time with TensorBoard.
See 2_train_model/train_model.ipynb for command details.

You can start the TensorBoard server from your notebook with the following command:

job_artifacts_path = estimator.latest_job_tensorboard_artifacts_path()
tensorboard_s3_output_path = f'{job_artifacts_path}/train'

!F_CPP_MIN_LOG_LEVEL=3 AWS_REGION=<ADD YOUR REGION HERE> tensorboard --logdir=$tensorboard_s3_output_path

TensorBoard server will run on your local notebook instance and you can open it by visiting the following url (the default port is typically 6006:

https://your-notebook-instance-name.notebook.your-region.sagemaker.aws/proxy/6006/

Security

See CONTRIBUTING for more information.

License

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

amazon-sagemaker-tensorflow-object-detection-api's People

Contributors

amazon-auto avatar lukaszkuczynski avatar michaelhoarau avatar othmane796 avatar sofianhamiti avatar

Watchers

 avatar

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.