|
@@ -4,8 +4,6 @@ from doclayout_yolo import YOLOv10
|
|
|
class DocLayoutYOLOModel(object):
|
|
class DocLayoutYOLOModel(object):
|
|
|
def __init__(self, weight, device):
|
|
def __init__(self, weight, device):
|
|
|
self.model = YOLOv10(weight)
|
|
self.model = YOLOv10(weight)
|
|
|
- if not device.startswith("cpu"):
|
|
|
|
|
- self.model.half()
|
|
|
|
|
self.device = device
|
|
self.device = device
|
|
|
|
|
|
|
|
def predict(self, image):
|
|
def predict(self, image):
|