function detect_objects(image, model):
   boxes = model.propose_regions(image) # candidate rectangles

   results = []
   for box in boxes:
      label, confidence = model.classify(image.crop(box))
      if confidence > threshold:
        results.append((box, label, confidence))

   return results
 # segmentation instead labels every pixel, not just a bounding box
