Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]Error in example notebook Amazon_Tensorflow_Object_Detection #4760

Open
duane-edgington opened this issue Sep 30, 2024 · 1 comment

Comments

@duane-edgington
Copy link

Link to the notebook
amazon-sagemaker-examples/ archived
/Amazon_Tensorflow_Object_Detection.ipynb
Describe the bug
TypeError: the JSON object must be str, bytes or bytearray, not dict
thrown using default parameters/selections
Screenshot 2024-09-30 at 1 59 55 PM

at
normalized_boxes, classes_names, confidences = parse_response(query_response)

To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
open notebook
tensorflow-od1-ssd-resnet50-v1-fpn-1024x1024-coco17-tpu-8-SDK.ipynb
step through the notebook executing each line

Logs
If applicable, add logs to help explain your problem.
You may also attach an .ipynb file to this issue if it includes relevant logs or output.
tensorflow-od1-ssd-resnet50-v1-fpn-1024x1024-coco17-tpu-8-SDK.ipynb.txt

@duane-edgington
Copy link
Author

I fixed the bug in my notebook with the following code

query_response = query(model_predictor, NAXOS_TAVERNA)
json_string = json.dumps(query_response)
encoded_bytes = json_string.encode('utf-8')
final_query_response = bytearray(encoded_bytes)
normalized_boxes, classes_names, confidences = parse_response(final_query_response)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant