Performing object detection on constrained devices