How to do an inference
Do an inference
#Do a tagging inference
predictions = tagging("name_given_to_spec", image)
#Do a classification inference
predictions = classification("name_given_to_spec", image)
#Do a detection inference
predictions = detection("name_given_to_spec", image)Helpers
# Get all the predictions above threshold
predictions.get_predictions(threshold=0.3)
# Get the highest prediction
predictions.get_top_prediction(threshold=0.3)
# Get the highest prediction of a specific concept
# If a list is passed, it will return the first item with a concept in the list.
predictions.get_top_prediction_for_concept('concept_name', threshold=0.3)
# Get all the predictions of a specific concept
# If a list is passed, it will return the first item with a concept in the list.
predictions.get_predictions_for_concept('concept_name', threshold=0.3)
# Get the top prediction that have a concept name containing the given string
# If a list is passed, it will return the first item with a concept in the list.
predictions.get_top_prediction_for_similar_concepts ('compared_string', threshold=0)
# Get all the predictions that have a concept name containing the given string
# If a list is passed, it will return the first item with a concept in the list.
predictions.get_predictions_for_similar_concepts('compared_string', threshold=0)
# Get you a list of the different concepts that are predicted with a score above given threshold.
predictions.get_concept_list(threshold=0.3)Was this helpful?