Some code snippets
Python code for cutting object from image from Custom Object Detection Service:
from ximilar.client import DetectionClient
# get Detection Task
client = DetectionClient("__API_TOKEN__")
detection_task, status = client.get_task("__DETECTION_TASK_ID__")
# Getting Detection Result:
result = detection_task.detect([{"_file": "__LOCAL_PATH__", "noresize": True}])
image = cv2.imread("__LOCAL_PATH__")
bbox = result["record"]["_objects"][0]["bound_box"]
first_object = image[bbox[1] : bbox[3], bbox[0] : bbox[2]]