INNER CODE UNIT · Python

_yolo_worker_slot

yihong1120/Construction-Hazard-Detection · main.py:694

    def _yolo_worker_slot(
        self,
        cfg: StreamConfig,
    ) -> tuple[object | None, object | None]:
        """Return the worker and dedicated result queue assigned to a camera.

        Sharded mode pins up to the configured number of same-model cameras to
        one engine worker.
        """
        if not self.yolo_request_queues:
            return None, None
        result_queue = self._yolo_worker_result_queue(cfg)
        if result_queue is None:
            return None, None
        source_url = str(cfg['video_url'])
        slot_index = self.yolo_worker_slots.get(source_url)
        if slot_index is not None:
            return (

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…