Food Detection using Roboflow

Code:

from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    api_url="https://outline.roboflow.com",
    api_key="dY93y6ohgGjkO5mHmJD2"
)

data = CLIENT.infer('orange.jpg', model_id="food-spoilage-status/2")

if data['predictions']:
    for prediction in data['predictions']:
        print(prediction['class'])
else:
    print("No predictions found")

Sample Images

Orange fruit with drop shadow on white background. Commercial image of citrus fruits in isolated with clipping path.
moldy orange

Python File