Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
656 views
in Technique[技术] by (71.8m points)

Google Cloud ML returns empty predictions with object detection model

I am deploying a model to Google Cloud ML for the first time. I have trained and tested the model locally and it still needs work but it works ok.

I have uploaded it to Cloud ML and tested with the same example images I test locally that I know get detections. (using this tutorial)

When I do this, I get no detections. At first I thought I had uploaded the wrong checkpoint but I tested and the same checkpoint works with these images offline, I don't know how to debug further.

When I look at the results the file

prediction.results-00000-of-00001

is just empty

and the file

prediction.errors_stats-00000-of-00001

contains the following text: ('No JSON object could be decoded', 1)

Is this a sign the detection has run and detected nothing, or is there some problem while running?

Maybe the problem is I am preparing the images wrong for uploading?

The logs show no errors at all

Thank you

EDIT:

I was doing more tests and tried to run the model locally using the command "gcloud ml-engine local predict" instead of the usual local code. I get the same result as online, no answer at all, but also no error message

EDIT 2: I am using a TF_Record file, so I don't understand the JSON response. Here is a copy of my command:

gcloud ml-engine jobs submit prediction ${JOB_ID} --data- format=tf_record --input-paths=gs://MY_BUCKET/data_dir/inputs.tfr --output-path=gs://MY_BUCKET/data_dir/version4 --region us-central1 --model="gcp_detector" --version="Version4"

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...