如何直接从Amazon S3存储桶读取图像到google -colaboratory,而无需在google-colaboratory中下载图像

我想直接从Amazon s3存储桶中读取图像而无需下载图像

我尝试了一种方法get方法,但是它下载了图像

import boto
from boto.s3.key import Key
keyId ="your_aws_key_id"
sKeyId="your_aws_secret_key_id"
srcfileName="abc.txt"
destFileName="s3_abc.txt"
bucketName="mybucket001"
conn = boto.connect_s3(keyId,sKeyId)
bucket = conn.get_bucket(bucketName)
#Get the Key object of the given key,in the bucket
k = Key(bucket,srcfileName)
#Get the contents of the key into a file 
k.get_contents_to_filename(destFileName)
pldljf 回答:如何直接从Amazon S3存储桶读取图像到google -colaboratory,而无需在google-colaboratory中下载图像

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3161701.html

大家都在问