Get Started with Amazon SageMaker Data Wrangler Image Preparation
Learn how to use Amazon SageMaker Data Wrangler's image preparation feature to process image data while writing minimal code.
Set Up Your Amazon SageMaker Studio Domain & Dataset
Import Data into a SageMaker Data Wrangler Flow
Image Preparation Step: Corrupt Images
Image Preparation Step: Enhance Contrast & Resize Images
Image Preparation Step: Custom Transform
Export the Prepared Image Data to Another S3 Bucket
About | |
---|---|
✅ AWS Level | 200 - intermediate |
⏱ Time to complete | 120 minutes |
💰 Cost to complete | Free when using the AWS Free Tier or USD 1.84 |
🧩 Prerequisites | - AWS Account - CodeCatalyst Account |
📢 Feedback | Any feedback, issues, or just a 👍 / 👎 ? |
⏰ Last Updated | 2023-06-15 |
car_creash_detection_data.flow
.1
2
3
4
5
6
7
8
9
10
# A table with your image data is stored in the 'df' variable
import cv2
import numpy as np
from pyspark.sql.functions import column
def my_transform(image: np.ndarray) -> np.ndarray:
# To use the code snippet on your image data, modify the following lines within the function
HYST_THRLD_1, HYST_THRLD_2 = 100, 200
edges = cv2.Canny(image,HYST_THRLD_1,HYST_THRLD_2)
return edges
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.