Этот коммит содержится в:
Inga Ulusoy 2023-04-27 13:28:47 +02:00
родитель 0df2322774
Коммит 3cf6794d56
2 изменённых файлов: 0 добавлений и 5 удалений

Просмотреть файл

@ -52,12 +52,8 @@ class ObjectCVLib(ObjectsMethod):
image_path: The path to the local file.
"""
img = cv2.imread(image_path)
# preimg = Image.open(image_path).convert("RGB")
# preimg2 = np.asarray(preimg)
# img = cv2.cvtColor(preimg2, cv2.COLOR_BGR2RGB)
_, label, _ = cv.detect_common_objects(img)
# output_image = draw_bbox(im, bbox, label, conf)
objects = objects_from_cvlib(label)
return objects

Просмотреть файл

@ -28,7 +28,6 @@ class SummaryDetector(AnalysisMethod):
return summary_model, summary_vis_processors
def load_model(self, model_type):
# self.summary_device = device("cuda" if cuda.is_available() else "cpu")
select_model = {
"base": SummaryDetector.load_model_base,
"large": SummaryDetector.load_model_large,