MCPcopy
hub / github.com/sml2h3/ddddocr / __init__

Method __init__

ddddocr/core/detection_engine.py:23–32  ·  view source on GitHub ↗

初始化检测引擎 Args: use_gpu: 是否使用GPU device_id: GPU设备ID

(self, use_gpu: bool = False, device_id: int = 0)

Source from the content-addressed store, hash-verified

21 """目标检测引擎"""
22
23 def __init__(self, use_gpu: bool = False, device_id: int = 0):
24 """
25 初始化检测引擎
26
27 Args:
28 use_gpu: 是否使用GPU
29 device_id: GPU设备ID
30 """
31 super().__init__(use_gpu, device_id)
32 self.initialize()
33
34 def initialize(self, **kwargs) -> None:
35 """

Callers

nothing calls this directly

Calls 1

initializeMethod · 0.95

Tested by

no test coverage detected