Encampment detection API
Identify a camp setup or someone sleeping rough in camera images.
What it detects
Check monitored property for tents, bedding or belongings set up as a camp.
- Detection
- Bedding, a tent or belongings set up as a camp, or a person sleeping rough.
- Outside the definition
- No camp set up. Someone resting briefly on a bench, luggage being carried.
Send a camera image.
Set KIRKWOOD_API_KEY on your server. Save a frame as frame.jpg.
import base64
import json
import os
import urllib.request
with open("frame.jpg", "rb") as frame:
image = base64.b64encode(frame.read()).decode()
body = json.loads('''{
"images": [
"<BASE64_JPEG>"
],
"tags": [
"person_camping"
],
"detections": {
"return_boxes": true
}
}''')
body["images"] = [image]
request = urllib.request.Request(
"https://app.kirkwood.ai/v1/analyze",
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + os.environ["KIRKWOOD_API_KEY"],
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(request, timeout=120) as response:
print(json.dumps(json.load(response), indent=2))Read the result
Read tags.person_camping for its answer and probability. Pair it with cleanup detection when reviewing the condition of a monitored area.
Camera setup
Test bags being carried, people resting briefly and actual camp setups from similar camera angles.
Try it on your footage.
Upload an image and select “Person camping”. Run analysis.
Approved account required. Analysis uses credit. Images are retained for annotation and training.
Open the live PlaygroundBefore you integrate
The tag describes what appears in the image. It does not identify a person’s housing status or establish how long they have been there.
Does a suitcase count as an encampment?
Carried luggage or someone briefly resting on a bench is outside the positive definition. The tag looks for a camp setup or someone sleeping rough.