Best way to trigger image processing for object detection

I have the DOODS integration all setup and configured and it’s working great with my Ubiquiti cameras. I have simple template binary sensor to say whether or not a car is in our driveway:

- platform: template
  sensors:
    car_parked_in_driveway:
      friendly_name: "Car Parked in Driveway"
      value_template: "{{ states('image_processing.doods_driveway_high')|float(0) > 0 }}"

I’m using the camera’s motion detection to trigger the processing of the image:

alias: Doods - Scan When Driveway Motion Detected
description: Does image processing on the driveway camera when motion is detected
trigger:
  - platform: state
    entity_id:
      - binary_sensor.driveway_motion
    to: "on"
condition: []
action:
  - service: image_processing.scan
    data: {}
    target:
      entity_id: image_processing.doods_driveway_high
mode: single

The idea behind this is that when a car either enters or leaves the driveway, it will process the image and then update the car_parked_in_driveway binary sensor accordingly. The problem is that the processing will happen as soon as motion is detected and the car will most likely not have left yet. So it still thinks the car is there when it actually left sometime after the motion detection.

Any ideas on the best way to deal with this? The brute force way would be to just run an image scan every n minutes but I was hoping to deal with this a little more elegantly. Thanks!