async def METHOD_NAME(self, image: scrypted_sdk.Image, detection_session: ObjectDetectionSession) -> ObjectsDetected:
    settings = detection_session and detection_session.get('settings')
    iw, ih = image.width, image.height
    w, h = self.get_input_size()
    resize = None
    xs = w / iw
    ys = h / ih
    def cvss(point):
        return point[0] / xs, point[1] / ys
    if iw != w or ih != h:
        resize = {
            'width': w,
            'height': h,
        }
    b = await image.toBuffer({
        'resize': resize,
        'format': image.format or 'rgb',
    })
    data = await ensureRGBData(b, (w, h), image.format)
    try:
        ret = await self.safe_detect_once(data, settings, (iw, ih), cvss)
        return ret
    finally:
        data.close()