INNER CODE UNIT · Python

_ensure_yolo_worker

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

    def _ensure_yolo_worker(
        self,
        configs: list[StreamConfig] | None = None,
    ) -> bool:
        """Maintain native shared-memory YOLO workers for camera shards.

        A dead worker is replaced with its existing queues. A topology change
        rebuilds the queue set before restarting its associated stream clients.
        """
        (
            worker_count,
            worker_slots,
            topology_signature,
        ) = self._yolo_worker_topology(configs)
        if worker_count == 0:
            return False
        devices = _csv_env('YOLO_WORKER_DEVICES', 'cuda:0')
        if self._has_yolo_worker_broker(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…