{ "cells": [ { "cell_type": "markdown", "id": "24a132c1-3154-4896-8d93-c0ce836aff04", "metadata": {}, "source": [ "# SageMaker Ground Truth Labeling Job\n", "SageMaker Ground Truth is a data labeling service that makes it easy to label data in various formats and gives you the option to use human annotators through Amazon Mechanical Turk, third-party vendors, or your own private workforce. In our example, we are going to create a ground truth labeling job with private workforce to annotate the uploaded videos.\n", "\n", "## Quick Start\n", "\n", "1. Navigate to to AWS [SageMaker console](https://console.aws.amazon.com/sagemaker/home)\n", "2. Select Ground Truth and Create a labeling job:\n", "\n", "![gt-labeling-job-1](https://user-images.githubusercontent.com/22420800/225053556-c9999d00-94b4-49c8-b592-cf4738a0e81b.png)\n", "\n", "3. Fill in the detail for a new labeling job:\n", "\t* job name: A name for the labeling job.\n", "\t* S3 location for input datasets: S3 location where your video files are stored in S3.\n", "\t* S3 location for output datasets: Separate S3 location where your annotations are to be stored in S3.\n", "\t* Data Type: Video files.\n", "\t* Choose extract frames for object tracking and detection tasks.\n", "\t* Frame Extraction: Use all frames extracted from the video to create a labeling task.\n", "\t* IAM Role: Create a new IAM Role, provide the S3 bucket where the input/output datasets are stored. \n", " ![labeling-iam](https://user-images.githubusercontent.com/22420800/225055773-be367976-4f46-4454-b68c-b52e85b55f4f.png)\n", " * Complete data setup (**Note:** Click on this button to finish setting up the first part before the next section) \n", "\n", "![gt-labeling-job-2](https://user-images.githubusercontent.com/22420800/225056370-10cd32e8-6f9e-42a9-a553-3b9bca36bb01.png)\n", "\n", "![input-conn-success](https://user-images.githubusercontent.com/22420800/225056593-9c749987-dad8-4ac5-a29e-d43a5b1a6f22.png)\n", "\t\n", "4. Select the appropriate task type:\n", " * Task Category: Video - Object Tracking\n", " * Task Selection: Key Point\n", "\n", "![gt-labeling-job-3](https://user-images.githubusercontent.com/22420800/225056814-b0aa9b9e-5810-4d8f-9463-d1ddaf369ba6.png)\n", "\n", "4(a). Select workers and configuration tools:\n", "\n", "* Worker types: Private\n", "* Team name: A name of a team responsible for the labeling task\n", "* Invite private annotators: list of email addresses to be invited to the labeling task.\n", "* Task timeout: 10 days (maximum 30 days)\n", "* Task expiration time: 10 days (maximum 30 days)\n", "* Organization: name of the organization for the labeling job\n", "* Contact email: An email address for reporting issues related to the job.\n", "\n", "![gt-labeling-job-4](https://user-images.githubusercontent.com/22420800/225057197-0563a3d9-9a7a-4eba-b504-d244c9709db2.png)\n", "\n", "4(b). Video Object Tracking\n", "* Task Description: A brief description about the labeling task.\n", "* Instruction: Provide a detailed instruction to help the labeler provide accurate annotations.\n", "* Labels: ball\n", "* Click Create button to create the job. \n", "\n", "![gt-labeling-job-5](https://user-images.githubusercontent.com/22420800/225057398-d726c50b-a5d0-43ae-be57-9bc52abf88eb.png)\n", "\n", "Here's a screenshot of a successful job creation:\n", "\n", "![gt-labeling-job-6](https://user-images.githubusercontent.com/22420800/225057576-37932551-2ded-4a36-a66c-6eb97949bb7a.png)\n", "\n", "The labelers should receive an email invitation from SageMaker Ground Truth about joining the labeling task. Here's an example of the invitation email:\n", "\n", "![gt-email-confirm](https://user-images.githubusercontent.com/22420800/225057875-36b2fbf1-0946-4865-a3a8-18c654208d6e.png)\n" ] }, { "cell_type": "markdown", "id": "9bc10856-eb6b-47b4-a555-af52a75a64db", "metadata": {}, "source": [ "## Using Ground Truth Portal For Labeling\n", "\n", "1. Sign into the SageMaker Ground Truth Labeling portal\n", "\t* click on the login link in the invitation email\n", "\t* sign in by providing the username and temporary password provided in the email\n", " \n", " ![gt-labeling-signin](https://user-images.githubusercontent.com/22420800/225068635-3f0601da-46c0-48fc-9c3d-777ae0e7c0db.png)\n", "\t* After signing in, you'll be prompted to change the password immediately. Provide a new password.\n", " \n", " ![gt-labeling-change-passwd](https://user-images.githubusercontent.com/22420800/225068924-cb47dd02-3c22-4660-88e1-6919723b7135.png)\n", "\n", "You can also find the Labeling portal sign-in URL by going to SageMaker console -> Ground Truth -> Labeling Workforces. Here is an example: \n", "\n", "![labeling-portal](https://user-images.githubusercontent.com/22420800/225069201-b81bebc8-c50c-4667-a5df-cd2f663a06a2.png)\n", "\n", "2. Once signed in to the labeling task portal, you can begin work by clicking on the **Start Working** button.\n", "\n", "![gt-labeling-start-work](https://user-images.githubusercontent.com/22420800/225069862-918b5cf4-dd67-433b-b665-882399784b3c.png)\n", "\n", "3. The labeler is presented with a freezed video, starting from the first frame. Annotate the video frame by clicking on the ball in the frame. You can continue to next screen by clicking on the next frame button. You can save the progress at any point by selecting 'Save' button. You can also pause the current task by selecting 'Stop and Resume Later' button. Once all the frames have been annotated, click on 'Submit' button to complete the current video task.\n", "\n", "![gt-labeling-frames](https://user-images.githubusercontent.com/22420800/225070006-44144d10-e83b-4047-be8d-e3cfe0a70328.png)\n" ] }, { "cell_type": "markdown", "id": "5dc60261-78c8-4d12-bbf1-4e6bd1d45281", "metadata": {}, "source": [ "## Using Ground Truth Plus For Labeling\n", "\n", "Amazon SageMaker Ground Truth Plus enables you to easily create high-quality training datasets without having to build labeling applications and manage the labeling workforce on your own. You simply provide data along with labeling requirements and Ground Truth Plus sets up the data labeling workflows and manages them on your behalf in accordance with your requirements.\n", "\n", "There are five main components to the SageMaker Ground Truth Plus workflow.\n", "1. Requesting a project\n", "2. Creating a project team\n", "3. Accessing the project portal to monitor progress of training datasets and review labeled data\n", "4. Creating a batch\n", "5. Receiving the labeled data\n", "\n", "If you are a first-time user of SageMaker Ground Truth Plus, we recommend that you follow the procedures outlined in the [Getting Started with Amazon SageMaker Ground Truth Plus](https://docs.amazonaws.cn/en_us/sagemaker/latest/dg/gtp-getting-started.html)." ] }, { "cell_type": "code", "execution_count": null, "id": "88c03b7a-0983-45b3-a371-274629426e16", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "availableInstances": [ { "_defaultOrder": 0, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 4, "name": "ml.t3.medium", "vcpuNum": 2 }, { "_defaultOrder": 1, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.t3.large", "vcpuNum": 2 }, { "_defaultOrder": 2, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.t3.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 3, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.t3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 4, "_isFastLaunch": true, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5.large", "vcpuNum": 2 }, { "_defaultOrder": 5, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 6, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 7, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 8, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 9, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 10, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 11, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 12, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 8, "name": "ml.m5d.large", "vcpuNum": 2 }, { "_defaultOrder": 13, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 16, "name": "ml.m5d.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 14, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 32, "name": "ml.m5d.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 15, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 64, "name": "ml.m5d.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 16, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 128, "name": "ml.m5d.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 17, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 192, "name": "ml.m5d.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 18, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 256, "name": "ml.m5d.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 19, "_isFastLaunch": false, "category": "General purpose", "gpuNum": 0, "memoryGiB": 384, "name": "ml.m5d.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 20, "_isFastLaunch": true, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 4, "name": "ml.c5.large", "vcpuNum": 2 }, { "_defaultOrder": 21, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 8, "name": "ml.c5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 22, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.c5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 23, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.c5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 24, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 72, "name": "ml.c5.9xlarge", "vcpuNum": 36 }, { "_defaultOrder": 25, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 96, "name": "ml.c5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 26, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 144, "name": "ml.c5.18xlarge", "vcpuNum": 72 }, { "_defaultOrder": 27, "_isFastLaunch": false, "category": "Compute optimized", "gpuNum": 0, "memoryGiB": 192, "name": "ml.c5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 28, "_isFastLaunch": true, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g4dn.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 29, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g4dn.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 30, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g4dn.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 31, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g4dn.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 32, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g4dn.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 33, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g4dn.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 34, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 61, "name": "ml.p3.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 35, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 244, "name": "ml.p3.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 36, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 488, "name": "ml.p3.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 37, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.p3dn.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 38, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 16, "name": "ml.r5.large", "vcpuNum": 2 }, { "_defaultOrder": 39, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 32, "name": "ml.r5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 40, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 64, "name": "ml.r5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 41, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 128, "name": "ml.r5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 42, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 256, "name": "ml.r5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 43, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 384, "name": "ml.r5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 44, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 512, "name": "ml.r5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 45, "_isFastLaunch": false, "category": "Memory Optimized", "gpuNum": 0, "memoryGiB": 768, "name": "ml.r5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 46, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 16, "name": "ml.g5.xlarge", "vcpuNum": 4 }, { "_defaultOrder": 47, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 32, "name": "ml.g5.2xlarge", "vcpuNum": 8 }, { "_defaultOrder": 48, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 64, "name": "ml.g5.4xlarge", "vcpuNum": 16 }, { "_defaultOrder": 49, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 128, "name": "ml.g5.8xlarge", "vcpuNum": 32 }, { "_defaultOrder": 50, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 1, "memoryGiB": 256, "name": "ml.g5.16xlarge", "vcpuNum": 64 }, { "_defaultOrder": 51, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 192, "name": "ml.g5.12xlarge", "vcpuNum": 48 }, { "_defaultOrder": 52, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 4, "memoryGiB": 384, "name": "ml.g5.24xlarge", "vcpuNum": 96 }, { "_defaultOrder": 53, "_isFastLaunch": false, "category": "Accelerated computing", "gpuNum": 8, "memoryGiB": 768, "name": "ml.g5.48xlarge", "vcpuNum": 192 } ], "instance_type": "ml.t3.medium", "kernelspec": { "display_name": "conda_tensorflow2_p310", "language": "python", "name": "conda_tensorflow2_p310" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" } }, "nbformat": 4, "nbformat_minor": 5 }