基于视觉和自然语言处理的模型构建与应用
一、视觉缺陷检测系统
1.1 上传TF模型到Vertex Model Registry
在模型保存后,下一步是将模型工件上传到Vertex AI Model Registry。上传后,可通过Google Cloud控制台UI或Python脚本轻松部署模型。
1.1.1 配置参数
PROJECT_ID='417812395597'
REGION='us-central1'
ARTIFACT_URI='gs://my-training-artifacts/tf_model/'
MODEL_DISPLAY_NAME='tf-bangle-defect-detector-v1'
SERVING_IMAGE='us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-11:latest'
1.1.2 上传模型代码
import aiplatform
aiplatform.init(project=PROJECT_ID, location=REGION)
model = aiplatform.Model.upload(
display_name=MODEL_DISPLAY_NAME,
artifact_uri=ARTIFACT_URI,
serving_container_image_uri=SERVING_IMAGE,
sync=True,
)
model.wait(
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



