Image processing is made easy with platforms like landing.ai
As an example, the following is an application that counts cars in drone images. The dataset is based on 512x512 resolution images of highways and is annotated in the Pascal VoC format. The model is hosted and usable with a sample web-request as follows:
from PIL import Image
from landingai.predict import Predictor
# Enter your API Key
endpoint_id = "11cb6c44-3b6a-4b47-bac9-031826bc80ea"
api_key = "YOUR_API_KEY"
# Load your image
image = Image.open("image.png")
# Run inference
predictor = Predictor(endpoint_id, api_key=api_key)
predictions = predictor.predict(image)
And it can even be requested with agentic ai framework as follows:
import requests
url = "https://api.va.landing.ai/v1/tools/agentic-object-detection"
files = {
"image": open("{{path_to_image}}", "rb")
}
data = {
"prompts": "{{prompt}}",
"model": "agentic"
}
headers = {
"Authorization": "Basic {{your_api_key}}"
}
response = requests.post(url, files=files, data=data, headers=headers)
print(response.json())
For context on DFCS drone video sensing platform, please check the references.
No comments:
Post a Comment