Object detection( Prediction ) AttributeError: 'CustomVisionPredictionClient' object has no attribute 'predict_image'
See original GitHub issueHello,
I´m trying to connect my object detection project to my host application, and I’ve already trained my Model, and I have the iteration id and project ID. I would just like to use the prediction code in my application, I tried to do the same code found here which is :
! pip install azure-cognitiveservices-vision-customvision
from azure.cognitiveservices.vision.customvision.prediction import CustomVisionPredictionClient
my_project_id = "Project Id from the settings page"
prediction_key = "Prediction Key from the settings page"
ENDPOINT = "https://southcentralus.api.cognitive.microsoft.com"
predictor = CustomVisionPredictionClient(prediction_key, endpoint=ENDPOINT)
my_iteration_id = "iteration id from portal"
with open("Swimming/14.jpg", mode="rb") as test_data:
results = predictor.predict_image(my_project_id, test_data, iteration_id=my_iteration_id)
but, I still receiving this error :
Traceback (most recent call last): File “cazurecloud.py”, line 22, in <module> results = predictor.predict_image(my_project_id, test_data, iteration_id=my_iteration_id) AttributeError: ‘CustomVisionPredictionClient’ object has no attribute ‘predict_image’
Any Help, please !
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
'TFLiteKerasModelConverterV2' object has no attribute 'predict'
You are creating a TFLiteConverter object from your weights file. The correct way to load the model weights is using load_weights link. Try:...
Read more >'Functional' object has no attribute 'predict_classes'' - Data ...
I was able to fix my issue by making the following changes. From: # Making prediction y_pred = (model.predict_classes(testX)) y_true ...
Read more >azure-cognitiveservices-vision-customvision 3.1.0 - PyPI
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. ... DetectImage and DetectImageUrl for object detection projects . Prediction...
Read more >Why am I getting AttributeError: Object has no attribute?
PYTHON : Why am I getting AttributeError : Object has no attribute ? [ Gift : Animated Search Engine ...
Read more >AttributeError: 'NoneType' object has no attribute 'shape' - Reddit
Hi, I am trying to train custom object detection to detect my company-logo, everything went well until this error, I also deleted and ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you - I will try to reproduce that and see what might cause it.
Hi @mrsalhaoui, thank you for the detailed screenshot and I am sorry to hear that didn’t resolve the issue. I will continue investigating and will try to reproduce those errors you are getting.