SlideShare uma empresa Scribd logo
1 de 89
Baixar para ler offline
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• 

•
•
•
•
•
model = Sequential()
model.add(Dense(1, activation='sigmoid', input_dim=100))
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Dense
import numpy as np
model.compile(optimizer='adam',
loss='binary_crossentropy',
metrics=['accuracy'])
data = np.random.random((1000, 100))
labels = np.random.randint(2, size=(1000, 1))
model.fit(data, labels, epochs=10, batch_size=32)
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
• 

•
from tensorflow.python.keras.applications.xception import Xception
model = Xception(weights='imagenet')
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


• ç
•
•
•
•
•
from tensorflow.python.keras.applications.xception import Xception
from tensorflow.python.keras.preprocessing import image
from tensorflow.python.keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np
model = Xception(weights='imagenet')
img_path = 'elephant.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
preds = model.predict(x)
print('Predicted:', decode_predictions(preds, top=3)[0])
•
•
•
• 

•
• 



• 



•
• 



• 



© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
•
from tensorflow.python.keras.applications.xception import Xception
model = Xception(include_top=False, weights='imagenet')








def train(train_data_dir, validation_data_dir, model_path):
base_model = Xception(weights='imagenet', include_top=False)
x = base_model.output
x = GlobalAveragePooling2D()(x)
predictions = Dense(nb_classes, activation='softmax')(x)
model = Model(base_model.input, predictions)
transformation_ratio = .05
train_datagen = ImageDataGenerator(rescale=1. / 255,
rotation_range=transformation_ratio,
shear_range=transformation_ratio,
zoom_range=transformation_ratio,
cval=transformation_ratio,
horizontal_flip=True,
vertical_flip=True)
def train(train_data_dir, validation_data_dir, model_path):
...( )...
train_generator = train_datagen.flow_from_directory(train_data_dir,
batch_size=32,
class_mode='categorical')
validation_generator = validation_datagen.flow_from_directory(validation_data_dir,
batch_size=32,
class_mode='categorical')
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
top_weights_path = os.path.join(os.path.abspath(model_path), 'top_model_weights.h5')
callbacks_list = [
ModelCheckpoint(top_weights_path, monitor='val_acc', verbose=1, save_best_only=True),
EarlyStopping(monitor='val_acc', patience=5, verbose=0)
]
model.fit_generator(train_generator,
samples_per_epoch=train_generator.nb_sample,
nb_epoch=nb_epoch / 5,
validation_data=validation_generator,
nb_val_samples=validation_generator.nb_sample,
callbacks=callbacks_list)
• 

• 

final_weights_path = os.path.join(os.path.abspath(model_path), 'model_weights.h5')
model.save_weights(final_weights_path)
model_json = model.to_json()
json_file = open(os.path.join(os.path.abspath(model_path), 'model.json'), 'w')
json_file.write(model_json)
def inference(trained_model_dir, test_data_dir, results_path):
# load json and create model
json_file = open(os.path.join(trained_model_dir, model_name), 'r')
loaded_model_json = json_file.read()
json_file.close()
model = model_from_json(loaded_model_json)
model.load_weights(os.path.join(trained_model_dir, model_weights))
# Read Data
test_datagen = ImageDataGenerator(rescale=1. / 255)
test_generator = test_datagen.flow_from_directory(test_data_dir,
batch_size=batch_size,
shuffle=False)
# Calculate class posteriors probabilities
y_probabilities = model.predict_generator(test_generator,
val_samples=test_generator.nb_sample)
# Calculate class labels
y_classes = probas_to_classes(y_probabilities)
filenames = [filename.split('/')[1] for filename in test_generator.filenames]
ids = [filename.split('.')[0] for filename in filenames]
•
•
• 

© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
•
• 



© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• 

• 

•
• 







• 

• 

• 

• 

• 



• 

• 



• 



• 

© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
# event
{
'Records': [
{
'eventVersion': '2.0',
'eventSource': 'aws:s3',
'awsRegion': 'ap-northeast-2', #
'eventTime': '2017-12-13T03:28:13.528Z', #
'eventName': 'ObjectCreated:Put',
'userIdentity': {'principalId': 'AFK2RA1O3ML1F'},
'requestParameters': {'sourceIPAddress': '123.24.137.5'},
'responseElements': {
'x-amz-request-id': '1214K424C14C384D',
'x-amz-id-2': 'BOTBfAoB/gKBbn412ITN4t2psTW499iMRKZDK/CQTsjrkeSSzSdsDUMGabcdnvHeYNtbTDHoHKs='
},
's3': {
's3SchemaVersion': '1.0', 'configurationId': 'b249eeda-3d48-4319-a7e2-853f964c1a25',
'bucket': {
'name': 'aws-summit-kr-2018', #
'ownerIdentity': {
'principalId': 'AFK2RA1O3ML1F'
},
'arn': 'arn:aws:s3:::aws-summit-kr-2018'
},
'object': {
'key': 'img/test_img.png', #
'size': 11733, #
'eTag': 'f2d12d123aebda1cc1fk17479207e838',
'sequencer': '125B119E4D7B2A0A48'
}
}
}
]
}
•
•
•
•
#
def handler(event, context):
bucket_name = event['Records'][0]['s3']['bucket']['name']
file_path = event['Records'][0]['s3']['object']['key']
•
ACCESS_KEY = os.environ.get('ACCESS_KEY')
SECRET_KEY = os.environ.get('SECRET_KEY')
def downloadFromS3(strBucket, s3_path, local_path):
s3_client = boto3.client('s3',
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY)
s3_client.download_file(strBucket, s3_path, local_path)
def uploadToS3(bucket, s3_path, local_path):
s3_client = boto3.client('s3',
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY)
s3_client.upload_file(local_path, bucket, s3_path)
•
• 

def handler(event, context):
bucket_name = event['Records'][0]['s3']['bucket']['name']
file_path = event['Records'][0]['s3']['object']['key']
file_name = file_path.split('/')[-1]
downloadFromS3(bucket_name, file_path, '/tmp/'+file_name)


•
def handler(event, context):
bucket_name = event['Records'][0]['s3']['bucket']['name']
file_path = event['Records'][0]['s3']['object']['key']
file_name = file_path.split('/')[-1]
downloadFromS3(bucket_name, file_path, '/tmp/'+file_name)
downloadFromS3(
'aws-summit-kr-2018',
'xception_weights_tf_dim_ordering_tf_kernels.h5',
'/tmp/.keras/xception_weights_tf_dim_ordering_tf_kernels.h5'
)
•
from tensorflow.python.keras.applications.xception import Xception
from tensorflow.python.keras.preprocessing import image
from tensorflow.python.keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np
def predict(img_path):
model = Xception(weights='imagenet')
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
preds = model.predict(x)
return decode_predictions(preds, top=3)[0]
•
def handler(event, context):
bucket_name = event['Records'][0]['s3']['bucket']['name']
file_path = event['Records'][0]['s3']['object']['key']
file_name = file_path.split('/')[-1]
downloadFromS3(bucket_name, file_path, '/tmp/'+file_name)
downloadFromS3(
'aws-summit-kr-2018',
'xception_weights_tf_dim_ordering_tf_kernels.h5',
'/tmp/.keras/xception_weights_tf_dim_ordering_tf_kernels.h5'
)
result = predict('/tmp/'+file_name)
return result
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
•
• 

•


• 

• 





• 

• 

•
•
•
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
• 



• 

•
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• 

• 

• 

docker run -v $(pwd):/outputs --name lambdapack -d amazonlinux:latest tail -f /dev/null
•
•
• 

•
• 

dev_install() {
yum -y update
yum -y upgrade
yum install -y 
wget 
gcc 
gcc-c++ 
cmake 
python36-devel 
python36-virtualenv 
python36-pip 
findutils 
zlib-devel 
zip 
unzip 
blas-devel lapack-devel atlas-devel
}
mkvirtualenv() {
cd /home/
rm -rf env
python3 -m virtualenv env --python=python3
source env/bin/activate
}
pip_install() {
source /home/env/bin/activate
pip install -U pip wheel
pip install --use-wheel tensorflow==1.7.0 --no-deps
pip install protobuf html5lib bleach --no-deps
pip install --use-wheel pillow==4.0.0
pip install h5py
}
gather_pack() {
cd /home/ && rm -rf pack && mkdir pack && cd pack
cp -R /home/env/lib/python3.6/site-packages/* .
cp -R /home/env/lib64/python3.6/site-packages/* .
cp /outputs/index.py /home/pack/index.py
find . -type d -name "test" -exec rm -rf {} +
find -name "*.so" | xargs strip
find -name "*.so.*" | xargs strip
rm -r pip && rm -r pip-* && rm -r wheel && rm -r wheel-*
find . | grep -E "(__pycache__|.pyc$)" | xargs rm -rf
echo "stripped size $(du -sh /home/pack | cut -f1)"
zip -FS -r1 /outputs/pack.zip * > /dev/null
echo "compressed size $(du -sh /outputs/pack.zip | cut -f1)"
}
•
•
•
•
•
•
• 

• 

•
import boto3
def upload_to_s3(bucket, s3_path, local_path):
client = boto3.client('s3',
aws_access_key_id=ACCESS_KEY,aws_secret_access_key=SECRET_KEY)
client.upload_file(local_path, bucket, s3_path)
def update_lambda(function_name, bucket, s3_path):
client = boto3.client('lambda',
aws_access_key_id=ACCESS_KEY,aws_secret_access_key=SECRET_KEY)
client.update_function_code(
FunctionName=function_name,
S3Bucket=bucket,
S3Key=s3_path,
)
uploadToS3(' ', ' /pack.zip', './pack.zip')
update_lambda(' ', ' ', ' /pack.zip')
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


•
• 



•
•
•
•
def download_s3_object(strBucket, s3_path):
import io
file_obj = io.BytesIO()
s3_client = boto3.client(
's3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY
)
s3_client.download_fileobj(strBucket, s3_path, file_obj)
return file_obj
pack2 = download_s3_object('bucket-name', 'pack2.zip')
import zipfile
zip_ref = zipfile.ZipFile(pack2)
zip_ref.extractall('/tmp')
zip_ref.close()
import sys
sys.path.append("/tmp")
•
• 

• 



• 

© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• 

•
• 

• 

© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• 

• 

• 

• 



© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 my_module.my_handler
docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6
my_module.my_handler '{"some": "event"}'
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.


© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Lambda Python Keras Image Classification

Mais conteúdo relacionado

Mais procurados

AWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAmazon Web Services Japan
 
Amazon Web Services 101 (Korean)
Amazon Web Services 101 (Korean)Amazon Web Services 101 (Korean)
Amazon Web Services 101 (Korean)Amazon Web Services
 
20200812 AWS Black Belt Online Seminar Amazon Macie
20200812 AWS Black Belt Online Seminar Amazon Macie20200812 AWS Black Belt Online Seminar Amazon Macie
20200812 AWS Black Belt Online Seminar Amazon MacieAmazon Web Services Japan
 
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나 AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나 Amazon Web Services Korea
 
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021Amazon Web Services Korea
 
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...Amazon Web Services Korea
 
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel AvivElastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel AvivAmazon Web Services
 
AWSとOCIを比べてみた
AWSとOCIを比べてみたAWSとOCIを比べてみた
AWSとOCIを比べてみたk otsuka
 
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017Yusuke Suzuki
 
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021Amazon Web Services Korea
 
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンス
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンスAWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンス
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンスAmazon Web Services Japan
 
[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴Shuji Kikuchi
 
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018 금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018 Amazon Web Services Korea
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture PatternsAmazon Web Services
 
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저Amazon Web Services Korea
 
AWS Black Belt Techシリーズ Amazon Kinesis
AWS Black Belt Techシリーズ  Amazon KinesisAWS Black Belt Techシリーズ  Amazon Kinesis
AWS Black Belt Techシリーズ Amazon KinesisAmazon Web Services Japan
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatchAmazon Web Services Japan
 
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...Amazon Web Services Korea
 
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018Amazon Web Services Korea
 
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018Amazon Web Services Korea
 

Mais procurados (20)

AWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon KinesisAWS Black Belt Online Seminar 2016 Amazon Kinesis
AWS Black Belt Online Seminar 2016 Amazon Kinesis
 
Amazon Web Services 101 (Korean)
Amazon Web Services 101 (Korean)Amazon Web Services 101 (Korean)
Amazon Web Services 101 (Korean)
 
20200812 AWS Black Belt Online Seminar Amazon Macie
20200812 AWS Black Belt Online Seminar Amazon Macie20200812 AWS Black Belt Online Seminar Amazon Macie
20200812 AWS Black Belt Online Seminar Amazon Macie
 
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나 AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나
AWS 기반 소프트웨어 서비스(SaaS) -김용우 솔루션즈 아키텍트 :: AWS 파트너 테크시프트 세미나
 
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
컴퓨팅 분야 신규 서비스 - 조상만, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
 
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...
대용량 데이터레이크 마이그레이션 사례 공유 [카카오게임즈 - 레벨 200] - 조은희, 팀장, 카카오게임즈 ::: Games on AWS ...
 
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel AvivElastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
Elastic Load Balancing Deep Dive and Best Practices - Pop-up Loft Tel Aviv
 
AWSとOCIを比べてみた
AWSとOCIを比べてみたAWSとOCIを比べてみた
AWSとOCIを比べてみた
 
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
 
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
내 서비스에는 어떤 데이터베이스가 맞는걸까? - 이혁 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
 
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンス
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンスAWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンス
AWS Black Belt Techシリーズ リザーブドインスタンス & スポットインスタンス
 
[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴[JAWS-UG Tokyo 32] AWS Client VPNの特徴
[JAWS-UG Tokyo 32] AWS Client VPNの特徴
 
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018 금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018
금융사의 AWS기반 Digital Transformation 사례::고종원::AWS Summit Seoul 2018
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저
데이터 마이그레이션 및 전송을 위한 AWS 스토리지 서비스 활용방안 - 박용선, 메가존 클라우드 매니저
 
AWS Black Belt Techシリーズ Amazon Kinesis
AWS Black Belt Techシリーズ  Amazon KinesisAWS Black Belt Techシリーズ  Amazon Kinesis
AWS Black Belt Techシリーズ Amazon Kinesis
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
 
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
 
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018
모놀리스에서 마이크로서비스 아키텍처로의 전환 전략::박선용::AWS Summit Seoul 2018
 
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018
AWS Support에서 제안하는 멋진 클라우드 아키텍처 디자인::조성열:: AWS Summit Seoul 2018
 

Semelhante a AWS Lambda Python Keras Image Classification

Build, Train & Deploy Your ML Application on Amazon SageMaker
Build, Train & Deploy Your ML Application on Amazon SageMakerBuild, Train & Deploy Your ML Application on Amazon SageMaker
Build, Train & Deploy Your ML Application on Amazon SageMakerAmazon Web Services
 
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...Amazon Web Services
 
Build, train and deploy your ML models with Amazon Sage Maker
Build, train and deploy your ML models with Amazon Sage MakerBuild, train and deploy your ML models with Amazon Sage Maker
Build, train and deploy your ML models with Amazon Sage MakerAWS User Group Bengaluru
 
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...Amazon Web Services
 
Game Playing RL Agent
Game Playing RL AgentGame Playing RL Agent
Game Playing RL AgentApache MXNet
 
Building Applications with Apache MXNet
Building Applications with Apache MXNetBuilding Applications with Apache MXNet
Building Applications with Apache MXNetApache MXNet
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Amazon Web Services
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...Amazon Web Services
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Julien SIMON
 
Machine Learning Fundamentals
Machine Learning FundamentalsMachine Learning Fundamentals
Machine Learning FundamentalsSigOpt
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Amazon Web Services
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Amazon Web Services
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Amazon Web Services
 
Keynote - Adrian Hornsby on Chaos Engineering
Keynote - Adrian Hornsby on Chaos EngineeringKeynote - Adrian Hornsby on Chaos Engineering
Keynote - Adrian Hornsby on Chaos EngineeringAmazon Web Services
 
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...Amazon Web Services
 
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Amazon Web Services
 
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018Amazon Web Services
 
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAmazon Web Services
 
Building Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet GluonBuilding Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet GluonApache MXNet
 
Building a Recommender System on AWS
Building a Recommender System on AWSBuilding a Recommender System on AWS
Building a Recommender System on AWSAmazon Web Services
 

Semelhante a AWS Lambda Python Keras Image Classification (20)

Build, Train & Deploy Your ML Application on Amazon SageMaker
Build, Train & Deploy Your ML Application on Amazon SageMakerBuild, Train & Deploy Your ML Application on Amazon SageMaker
Build, Train & Deploy Your ML Application on Amazon SageMaker
 
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...
Building Deep Learning Applications with TensorFlow and SageMaker on AWS - Te...
 
Build, train and deploy your ML models with Amazon Sage Maker
Build, train and deploy your ML models with Amazon Sage MakerBuild, train and deploy your ML models with Amazon Sage Maker
Build, train and deploy your ML models with Amazon Sage Maker
 
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...
[NEW LAUNCH!] Introducing Amazon Elastic Inference: Reduce Deep Learning Infe...
 
Game Playing RL Agent
Game Playing RL AgentGame Playing RL Agent
Game Playing RL Agent
 
Building Applications with Apache MXNet
Building Applications with Apache MXNetBuilding Applications with Apache MXNet
Building Applications with Apache MXNet
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
Machine Learning Fundamentals
Machine Learning FundamentalsMachine Learning Fundamentals
Machine Learning Fundamentals
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
 
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
Build, Train, and Deploy ML Models Quickly and Easily with Amazon SageMaker, ...
 
Keynote - Adrian Hornsby on Chaos Engineering
Keynote - Adrian Hornsby on Chaos EngineeringKeynote - Adrian Hornsby on Chaos Engineering
Keynote - Adrian Hornsby on Chaos Engineering
 
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
 
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
 
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018
Advanced Container Automation, Security, and Monitoring - AWS Summit Sydney 2018
 
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the CloudAWS Neptune - A Fast and reliable Graph Database Built for the Cloud
AWS Neptune - A Fast and reliable Graph Database Built for the Cloud
 
Building Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet GluonBuilding Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet Gluon
 
Building a Recommender System on AWS
Building a Recommender System on AWSBuilding a Recommender System on AWS
Building a Recommender System on AWS
 

Mais de Amazon Web Services Korea

AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1Amazon Web Services Korea
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...Amazon Web Services Korea
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon Web Services Korea
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Web Services Korea
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Amazon Web Services Korea
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...Amazon Web Services Korea
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Amazon Web Services Korea
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon Web Services Korea
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon Web Services Korea
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Amazon Web Services Korea
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Web Services Korea
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...Amazon Web Services Korea
 
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...Amazon Web Services Korea
 
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...Amazon Web Services Korea
 
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...Amazon Web Services Korea
 
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...Amazon Web Services Korea
 
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...Amazon Web Services Korea
 
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...Amazon Web Services Korea
 
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...Amazon Web Services Korea
 

Mais de Amazon Web Services Korea (20)

AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...
 
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
 
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
 
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
 
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
 
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
SK Telecom - 망관리 프로젝트 TANGO의 오픈소스 데이터베이스 전환 여정 - 발표자 : 박승전, Project Manager, ...
 
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
코리안리 - 데이터 분석 플랫폼 구축 여정, 그 시작과 과제 - 발표자: 김석기 그룹장, 데이터비즈니스센터, 메가존클라우드 ::: AWS ...
 
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
LG 이노텍 - Amazon Redshift Serverless를 활용한 데이터 분석 플랫폼 혁신 과정 - 발표자: 유재상 선임, LG이노...
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

AWS Lambda Python Keras Image Classification

  • 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 

  • 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 8. • model = Sequential() model.add(Dense(1, activation='sigmoid', input_dim=100)) from tensorflow.python.keras.models import Sequential from tensorflow.python.keras.layers import Dense import numpy as np model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) data = np.random.random((1000, 100)) labels = np.random.randint(2, size=(1000, 1)) model.fit(data, labels, epochs=10, batch_size=32)
  • 11. • • 
 • from tensorflow.python.keras.applications.xception import Xception model = Xception(weights='imagenet')
  • 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 

  • 14. • from tensorflow.python.keras.applications.xception import Xception from tensorflow.python.keras.preprocessing import image from tensorflow.python.keras.applications.resnet50 import preprocess_input, decode_predictions import numpy as np model = Xception(weights='imagenet') img_path = 'elephant.jpg' img = image.load_img(img_path, target_size=(224, 224)) x = image.img_to_array(img) x = np.expand_dims(x, axis=0) x = preprocess_input(x) preds = model.predict(x) print('Predicted:', decode_predictions(preds, top=3)[0])
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 19. • • • from tensorflow.python.keras.applications.xception import Xception model = Xception(include_top=False, weights='imagenet')
  • 21. def train(train_data_dir, validation_data_dir, model_path): base_model = Xception(weights='imagenet', include_top=False) x = base_model.output x = GlobalAveragePooling2D()(x) predictions = Dense(nb_classes, activation='softmax')(x) model = Model(base_model.input, predictions) transformation_ratio = .05 train_datagen = ImageDataGenerator(rescale=1. / 255, rotation_range=transformation_ratio, shear_range=transformation_ratio, zoom_range=transformation_ratio, cval=transformation_ratio, horizontal_flip=True, vertical_flip=True)
  • 22. def train(train_data_dir, validation_data_dir, model_path): ...( )... train_generator = train_datagen.flow_from_directory(train_data_dir, batch_size=32, class_mode='categorical') validation_generator = validation_datagen.flow_from_directory(validation_data_dir, batch_size=32, class_mode='categorical') model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) top_weights_path = os.path.join(os.path.abspath(model_path), 'top_model_weights.h5') callbacks_list = [ ModelCheckpoint(top_weights_path, monitor='val_acc', verbose=1, save_best_only=True), EarlyStopping(monitor='val_acc', patience=5, verbose=0) ] model.fit_generator(train_generator, samples_per_epoch=train_generator.nb_sample, nb_epoch=nb_epoch / 5, validation_data=validation_generator, nb_val_samples=validation_generator.nb_sample, callbacks=callbacks_list)
  • 23. • 
 • 
 final_weights_path = os.path.join(os.path.abspath(model_path), 'model_weights.h5') model.save_weights(final_weights_path) model_json = model.to_json() json_file = open(os.path.join(os.path.abspath(model_path), 'model.json'), 'w') json_file.write(model_json)
  • 24. def inference(trained_model_dir, test_data_dir, results_path): # load json and create model json_file = open(os.path.join(trained_model_dir, model_name), 'r') loaded_model_json = json_file.read() json_file.close() model = model_from_json(loaded_model_json) model.load_weights(os.path.join(trained_model_dir, model_weights)) # Read Data test_datagen = ImageDataGenerator(rescale=1. / 255) test_generator = test_datagen.flow_from_directory(test_data_dir, batch_size=batch_size, shuffle=False) # Calculate class posteriors probabilities y_probabilities = model.predict_generator(test_generator, val_samples=test_generator.nb_sample) # Calculate class labels y_classes = probas_to_classes(y_probabilities) filenames = [filename.split('/')[1] for filename in test_generator.filenames] ids = [filename.split('.')[0] for filename in filenames]
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 

  • 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 30. • 
 • 
 • • 
 
 
 

  • 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 36. # event { 'Records': [ { 'eventVersion': '2.0', 'eventSource': 'aws:s3', 'awsRegion': 'ap-northeast-2', # 'eventTime': '2017-12-13T03:28:13.528Z', # 'eventName': 'ObjectCreated:Put', 'userIdentity': {'principalId': 'AFK2RA1O3ML1F'}, 'requestParameters': {'sourceIPAddress': '123.24.137.5'}, 'responseElements': { 'x-amz-request-id': '1214K424C14C384D', 'x-amz-id-2': 'BOTBfAoB/gKBbn412ITN4t2psTW499iMRKZDK/CQTsjrkeSSzSdsDUMGabcdnvHeYNtbTDHoHKs=' }, 's3': { 's3SchemaVersion': '1.0', 'configurationId': 'b249eeda-3d48-4319-a7e2-853f964c1a25', 'bucket': { 'name': 'aws-summit-kr-2018', # 'ownerIdentity': { 'principalId': 'AFK2RA1O3ML1F' }, 'arn': 'arn:aws:s3:::aws-summit-kr-2018' }, 'object': { 'key': 'img/test_img.png', # 'size': 11733, # 'eTag': 'f2d12d123aebda1cc1fk17479207e838', 'sequencer': '125B119E4D7B2A0A48' } } } ] }
  • 37. • • • • # def handler(event, context): bucket_name = event['Records'][0]['s3']['bucket']['name'] file_path = event['Records'][0]['s3']['object']['key']
  • 38. • ACCESS_KEY = os.environ.get('ACCESS_KEY') SECRET_KEY = os.environ.get('SECRET_KEY') def downloadFromS3(strBucket, s3_path, local_path): s3_client = boto3.client('s3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY) s3_client.download_file(strBucket, s3_path, local_path) def uploadToS3(bucket, s3_path, local_path): s3_client = boto3.client('s3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY) s3_client.upload_file(local_path, bucket, s3_path)
  • 39. • • 
 def handler(event, context): bucket_name = event['Records'][0]['s3']['bucket']['name'] file_path = event['Records'][0]['s3']['object']['key'] file_name = file_path.split('/')[-1] downloadFromS3(bucket_name, file_path, '/tmp/'+file_name) 

  • 40. • def handler(event, context): bucket_name = event['Records'][0]['s3']['bucket']['name'] file_path = event['Records'][0]['s3']['object']['key'] file_name = file_path.split('/')[-1] downloadFromS3(bucket_name, file_path, '/tmp/'+file_name) downloadFromS3( 'aws-summit-kr-2018', 'xception_weights_tf_dim_ordering_tf_kernels.h5', '/tmp/.keras/xception_weights_tf_dim_ordering_tf_kernels.h5' )
  • 41. • from tensorflow.python.keras.applications.xception import Xception from tensorflow.python.keras.preprocessing import image from tensorflow.python.keras.applications.resnet50 import preprocess_input, decode_predictions import numpy as np def predict(img_path): model = Xception(weights='imagenet') img = image.load_img(img_path, target_size=(224, 224)) x = image.img_to_array(img) x = np.expand_dims(x, axis=0) x = preprocess_input(x) preds = model.predict(x) return decode_predictions(preds, top=3)[0]
  • 42. • def handler(event, context): bucket_name = event['Records'][0]['s3']['bucket']['name'] file_path = event['Records'][0]['s3']['object']['key'] file_name = file_path.split('/')[-1] downloadFromS3(bucket_name, file_path, '/tmp/'+file_name) downloadFromS3( 'aws-summit-kr-2018', 'xception_weights_tf_dim_ordering_tf_kernels.h5', '/tmp/.keras/xception_weights_tf_dim_ordering_tf_kernels.h5' ) result = predict('/tmp/'+file_name) return result
  • 43. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 44. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 45. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 46. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 47. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 48. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 52. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 55. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 56. • 
 • 
 • 
 docker run -v $(pwd):/outputs --name lambdapack -d amazonlinux:latest tail -f /dev/null
  • 58. dev_install() { yum -y update yum -y upgrade yum install -y wget gcc gcc-c++ cmake python36-devel python36-virtualenv python36-pip findutils zlib-devel zip unzip blas-devel lapack-devel atlas-devel }
  • 59. mkvirtualenv() { cd /home/ rm -rf env python3 -m virtualenv env --python=python3 source env/bin/activate } pip_install() { source /home/env/bin/activate pip install -U pip wheel pip install --use-wheel tensorflow==1.7.0 --no-deps pip install protobuf html5lib bleach --no-deps pip install --use-wheel pillow==4.0.0 pip install h5py }
  • 60. gather_pack() { cd /home/ && rm -rf pack && mkdir pack && cd pack cp -R /home/env/lib/python3.6/site-packages/* . cp -R /home/env/lib64/python3.6/site-packages/* . cp /outputs/index.py /home/pack/index.py find . -type d -name "test" -exec rm -rf {} + find -name "*.so" | xargs strip find -name "*.so.*" | xargs strip rm -r pip && rm -r pip-* && rm -r wheel && rm -r wheel-* find . | grep -E "(__pycache__|.pyc$)" | xargs rm -rf echo "stripped size $(du -sh /home/pack | cut -f1)" zip -FS -r1 /outputs/pack.zip * > /dev/null echo "compressed size $(du -sh /outputs/pack.zip | cut -f1)" }
  • 63. import boto3 def upload_to_s3(bucket, s3_path, local_path): client = boto3.client('s3', aws_access_key_id=ACCESS_KEY,aws_secret_access_key=SECRET_KEY) client.upload_file(local_path, bucket, s3_path) def update_lambda(function_name, bucket, s3_path): client = boto3.client('lambda', aws_access_key_id=ACCESS_KEY,aws_secret_access_key=SECRET_KEY) client.update_function_code( FunctionName=function_name, S3Bucket=bucket, S3Key=s3_path, ) uploadToS3(' ', ' /pack.zip', './pack.zip') update_lambda(' ', ' ', ' /pack.zip')
  • 64. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 

  • 66. def download_s3_object(strBucket, s3_path): import io file_obj = io.BytesIO() s3_client = boto3.client( 's3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY ) s3_client.download_fileobj(strBucket, s3_path, file_obj) return file_obj pack2 = download_s3_object('bucket-name', 'pack2.zip') import zipfile zip_ref = zipfile.ZipFile(pack2) zip_ref.extractall('/tmp') zip_ref.close() import sys sys.path.append("/tmp")
  • 68. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 

  • 69. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 71.
  • 72. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 73. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 74. • 
 • 
 • 
 • 

  • 75.
  • 76.
  • 77. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 78. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 79. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 my_module.my_handler docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6 my_module.my_handler '{"some": "event"}'
  • 80. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 81. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 82.
  • 83. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 84. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 85. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 86. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 87. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 88. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.